diff --git a/test/rori.c b/test/rori.c new file mode 100644 index 0000000..0b6ef9e --- /dev/null +++ b/test/rori.c @@ -0,0 +1,12 @@ + + +#define XLEN 32 +#include +#define uint_xlen_t uint32_t + +uint_xlen_t rotimm(uint_xlen_t rs1) +{ +uint_xlen_t a = 0; +a = ((rs1>>2) | (rs1<<(XLEN-2))); +return a; +} diff --git a/test/rori.s b/test/rori.s new file mode 100644 index 0000000..f7f3fae --- /dev/null +++ b/test/rori.s @@ -0,0 +1,16 @@ + .text + .attribute 4, 16 + .attribute 5, "rv32i2p0_m2p0_a2p0_c2p0_zbb1p0" + .file "rori.c" + .globl rotimm + .p2align 1 + .type rotimm,@function +rotimm: + rori a0, a0, 2 + ret +.Lfunc_end0: + .size rotimm, .Lfunc_end0-rotimm + + .ident "Ubuntu clang version 14.0.0-1ubuntu1" + .section ".note.GNU-stack","",@progbits + .addrsig