From f69acb8c7b1523a07659bfffe7f4a66f5993a997 Mon Sep 17 00:00:00 2001 From: Borainan <116897546+Borainan@users.noreply.github.com> Date: Tue, 21 Feb 2023 17:56:00 +0300 Subject: [PATCH] Add files via upload test files for rotate right immediate (rori) are added --- test/rori.c | 12 ++++++++++++ test/rori.s | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test/rori.c create mode 100644 test/rori.s 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