diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-03-21 16:46:43 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-03-21 16:46:43 -0700 |
commit | 96ef658f1fce0f1b4cce468ad7fa3ff453b9ebac (patch) | |
tree | ef6d18dbf4119755c469ed90948839ac6af28bbf /isa/macros/scalar/test_macros.h | |
parent | 33a1beb24e65c32aa8e2f2547da27eb3e24c4cc9 (diff) | |
download | riscv-tests-96ef658f1fce0f1b4cce468ad7fa3ff453b9ebac.zip riscv-tests-96ef658f1fce0f1b4cce468ad7fa3ff453b9ebac.tar.gz riscv-tests-96ef658f1fce0f1b4cce468ad7fa3ff453b9ebac.tar.bz2 |
Avoid x3 (gp), which is now TESTNUM
Diffstat (limited to 'isa/macros/scalar/test_macros.h')
-rw-r--r-- | isa/macros/scalar/test_macros.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/isa/macros/scalar/test_macros.h b/isa/macros/scalar/test_macros.h index 006f419..6650fa8 100644 --- a/isa/macros/scalar/test_macros.h +++ b/isa/macros/scalar/test_macros.h @@ -44,9 +44,9 @@ test_ ## testnum: \ #define SEXT_IMM(x) ((x) | (-(((x) >> 11) & 1) << 11)) #define TEST_IMM_OP( testnum, inst, result, val1, imm ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ li x1, MASK_XLEN(val1); \ - inst x3, x1, SEXT_IMM(imm); \ + inst x30, x1, SEXT_IMM(imm); \ ) #define TEST_IMM_SRC1_EQ_DEST( testnum, inst, result, val1, imm ) \ @@ -59,20 +59,20 @@ test_ ## testnum: \ TEST_CASE( testnum, x6, result, \ li x4, 0; \ 1: li x1, MASK_XLEN(val1); \ - inst x3, x1, SEXT_IMM(imm); \ + inst x30, x1, SEXT_IMM(imm); \ TEST_INSERT_NOPS_ ## nop_cycles \ - addi x6, x3, 0; \ + addi x6, x30, 0; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ ) #define TEST_IMM_SRC1_BYPASS( testnum, nop_cycles, inst, result, val1, imm ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ li x4, 0; \ 1: li x1, MASK_XLEN(val1); \ TEST_INSERT_NOPS_ ## nop_cycles \ - inst x3, x1, SEXT_IMM(imm); \ + inst x30, x1, SEXT_IMM(imm); \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ @@ -94,9 +94,9 @@ test_ ## testnum: \ #----------------------------------------------------------------------- #define TEST_R_OP( testnum, inst, result, val1 ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ li x1, val1; \ - inst x3, x1; \ + inst x30, x1; \ ) #define TEST_R_SRC1_EQ_DEST( testnum, inst, result, val1 ) \ @@ -109,9 +109,9 @@ test_ ## testnum: \ TEST_CASE( testnum, x6, result, \ li x4, 0; \ 1: li x1, val1; \ - inst x3, x1; \ + inst x30, x1; \ TEST_INSERT_NOPS_ ## nop_cycles \ - addi x6, x3, 0; \ + addi x6, x30, 0; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ @@ -122,10 +122,10 @@ test_ ## testnum: \ #----------------------------------------------------------------------- #define TEST_RR_OP( testnum, inst, result, val1, val2 ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ li x1, MASK_XLEN(val1); \ li x2, MASK_XLEN(val2); \ - inst x3, x1, x2; \ + inst x30, x1, x2; \ ) #define TEST_RR_SRC1_EQ_DEST( testnum, inst, result, val1, val2 ) \ @@ -153,35 +153,35 @@ test_ ## testnum: \ li x4, 0; \ 1: li x1, MASK_XLEN(val1); \ li x2, MASK_XLEN(val2); \ - inst x3, x1, x2; \ + inst x30, x1, x2; \ TEST_INSERT_NOPS_ ## nop_cycles \ - addi x6, x3, 0; \ + addi x6, x30, 0; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ ) #define TEST_RR_SRC12_BYPASS( testnum, src1_nops, src2_nops, inst, result, val1, val2 ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ li x4, 0; \ 1: li x1, MASK_XLEN(val1); \ TEST_INSERT_NOPS_ ## src1_nops \ li x2, MASK_XLEN(val2); \ TEST_INSERT_NOPS_ ## src2_nops \ - inst x3, x1, x2; \ + inst x30, x1, x2; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ ) #define TEST_RR_SRC21_BYPASS( testnum, src1_nops, src2_nops, inst, result, val1, val2 ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ li x4, 0; \ 1: li x2, MASK_XLEN(val2); \ TEST_INSERT_NOPS_ ## src1_nops \ li x1, MASK_XLEN(val1); \ TEST_INSERT_NOPS_ ## src2_nops \ - inst x3, x1, x2; \ + inst x30, x1, x2; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ @@ -216,17 +216,17 @@ test_ ## testnum: \ #----------------------------------------------------------------------- #define TEST_LD_OP( testnum, inst, result, offset, base ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ la x1, base; \ - inst x3, offset(x1); \ + inst x30, offset(x1); \ ) #define TEST_ST_OP( testnum, load_inst, store_inst, result, offset, base ) \ - TEST_CASE( testnum, x3, result, \ + TEST_CASE( testnum, x30, result, \ la x1, base; \ li x2, result; \ store_inst x2, offset(x1); \ - load_inst x3, offset(x1); \ + load_inst x30, offset(x1); \ ) #define TEST_LD_DEST_BYPASS( testnum, nop_cycles, inst, result, offset, base ) \ @@ -234,9 +234,9 @@ test_ ## testnum: \ li TESTNUM, testnum; \ li x4, 0; \ 1: la x1, base; \ - inst x3, offset(x1); \ + inst x30, offset(x1); \ TEST_INSERT_NOPS_ ## nop_cycles \ - addi x6, x3, 0; \ + addi x6, x30, 0; \ li x29, result; \ bne x6, x29, fail; \ addi x4, x4, 1; \ @@ -249,9 +249,9 @@ test_ ## testnum: \ li x4, 0; \ 1: la x1, base; \ TEST_INSERT_NOPS_ ## nop_cycles \ - inst x3, offset(x1); \ + inst x30, offset(x1); \ li x29, result; \ - bne x3, x29, fail; \ + bne x30, x29, fail; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ @@ -265,9 +265,9 @@ test_ ## testnum: \ la x2, base; \ TEST_INSERT_NOPS_ ## src2_nops \ store_inst x1, offset(x2); \ - load_inst x3, offset(x2); \ + load_inst x30, offset(x2); \ li x29, result; \ - bne x3, x29, fail; \ + bne x30, x29, fail; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ @@ -281,9 +281,9 @@ test_ ## testnum: \ li x1, result; \ TEST_INSERT_NOPS_ ## src2_nops \ store_inst x1, offset(x2); \ - load_inst x3, offset(x2); \ + load_inst x30, offset(x2); \ li x29, result; \ - bne x3, x29, fail; \ + bne x30, x29, fail; \ addi x4, x4, 1; \ li x5, 2; \ bne x4, x5, 1b \ |