Skip to content

Commit

Permalink
enable rv32e compatability by replacing reg x29 with reg x7 (riscv-so…
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-orban authored Mar 3, 2020
1 parent a46bbcf commit fb0510f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions isa/macros/scalar/test_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#define TEST_CASE( testnum, testreg, correctval, code... ) \
test_ ## testnum: \
code; \
li x29, MASK_XLEN(correctval); \
li x7, MASK_XLEN(correctval); \
li TESTNUM, testnum; \
bne testreg, x29, fail;
bne testreg, x7, fail;

# We use a macro hack to simpify code generation for various numbers
# of bubble cycles.
Expand Down Expand Up @@ -237,8 +237,8 @@ test_ ## testnum: \
inst x14, offset(x1); \
TEST_INSERT_NOPS_ ## nop_cycles \
addi x6, x14, 0; \
li x29, result; \
bne x6, x29, fail; \
li x7, result; \
bne x6, x7, fail; \
addi x4, x4, 1; \
li x5, 2; \
bne x4, x5, 1b; \
Expand All @@ -250,8 +250,8 @@ test_ ## testnum: \
1: la x1, base; \
TEST_INSERT_NOPS_ ## nop_cycles \
inst x14, offset(x1); \
li x29, result; \
bne x14, x29, fail; \
li x7, result; \
bne x14, x7, fail; \
addi x4, x4, 1; \
li x5, 2; \
bne x4, x5, 1b \
Expand All @@ -266,8 +266,8 @@ test_ ## testnum: \
TEST_INSERT_NOPS_ ## src2_nops \
store_inst x1, offset(x2); \
load_inst x14, offset(x2); \
li x29, result; \
bne x14, x29, fail; \
li x7, result; \
bne x14, x7, fail; \
addi x4, x4, 1; \
li x5, 2; \
bne x4, x5, 1b \
Expand All @@ -282,8 +282,8 @@ test_ ## testnum: \
TEST_INSERT_NOPS_ ## src2_nops \
store_inst x1, offset(x2); \
load_inst x14, offset(x2); \
li x29, result; \
bne x14, x29, fail; \
li x7, result; \
bne x14, x7, fail; \
addi x4, x4, 1; \
li x5, 2; \
bne x4, x5, 1b \
Expand Down Expand Up @@ -615,10 +615,10 @@ test_ ## testnum: \
test_ ## testnum: \
code; \
la x15, test_ ## testnum ## _data ; \
lw x29, 0(x15); \
lw x7, 0(x15); \
lw x15, 4(x15); \
li TESTNUM, testnum; \
bne testreg1, x29, fail;\
bne testreg1, x7, fail;\
bne testreg2, x15, fail;\
.pushsection .data; \
.align 3; \
Expand Down

0 comments on commit fb0510f

Please sign in to comment.