From 363ed152632bec690475afc102521c56f47dc89b Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Mon, 26 Feb 2024 07:31:53 +0100 Subject: [PATCH] examples: add missing files --- examples/cfg/tests.yml | 5 +++++ examples/tests/xcorev/cv_abs.test.c | 9 +++++++++ examples/tests/xcorev/cv_mac.test.c | 9 +++++++++ 3 files changed, 23 insertions(+) create mode 100644 examples/cfg/tests.yml create mode 100644 examples/tests/xcorev/cv_abs.test.c create mode 100644 examples/tests/xcorev/cv_mac.test.c diff --git a/examples/cfg/tests.yml b/examples/cfg/tests.yml new file mode 100644 index 00000000..7ce61004 --- /dev/null +++ b/examples/cfg/tests.yml @@ -0,0 +1,5 @@ +--- +test: + paths: [] + # - MC/RISCV + # - CodeGen/RISCV diff --git a/examples/tests/xcorev/cv_abs.test.c b/examples/tests/xcorev/cv_abs.test.c new file mode 100644 index 00000000..0a48c221 --- /dev/null +++ b/examples/tests/xcorev/cv_abs.test.c @@ -0,0 +1,9 @@ +// RUN: %clang --target=riscv32 -march=rv32ixs4emac -c -o %t.o %s +// RUN: llvm-objdump --disassembler-options=numeric -d %t.o | FileCheck %s + +int main() { + // CHECK: 0b 90 1a 01 cv.abs x1, x2 + asm("cv.abs x1, x2"); + + return 0; +} diff --git a/examples/tests/xcorev/cv_mac.test.c b/examples/tests/xcorev/cv_mac.test.c new file mode 100644 index 00000000..0505648e --- /dev/null +++ b/examples/tests/xcorev/cv_mac.test.c @@ -0,0 +1,9 @@ +// RUN: %clang --target=riscv32 -march=rv32ixs4emac -c -o %t.o %s +// RUN: llvm-objdump --disassembler-options=numeric -d %t.o | FileCheck %s + +int main() { + // CHECK: 0b 90 1a 01 cv.mac x1, x2, x3 + asm("cv.mac x1, x2, x3"); + + return 0; +}