Add addi, slti, sltiu tests.

This commit is contained in:
Hans-Kristian Arntzen 2020-01-31 14:00:16 +01:00
parent aed2fda115
commit bf67247864
5 changed files with 33 additions and 1 deletions

View File

@ -111,4 +111,7 @@ if (PARALLEL_RSP_TESTS)
rsp_add_test(nor) rsp_add_test(nor)
rsp_add_test(slt) rsp_add_test(slt)
rsp_add_test(sltu) rsp_add_test(sltu)
rsp_add_test(addi)
rsp_add_test(slti)
rsp_add_test(sltiu)
endif() endif()

9
debug-toolchain/addi.s Normal file
View File

@ -0,0 +1,9 @@
.text
.global main
main:
li $a0, 17
addi $t0, $a0, -8
addi $t1, $a0, 8
addiu $t2, $a0, -8
addiu $t3, $a0, 8
break

10
debug-toolchain/slti.s Normal file
View File

@ -0,0 +1,10 @@
.text
.global main
main:
li $a0, 100000
li $a1, -100000
slti $t0, $a0, -40
slti $t1, $a0, 40
slti $t2, $a1, -40
slti $t3, $a1, 40
break

10
debug-toolchain/sltiu.s Normal file
View File

@ -0,0 +1,10 @@
.text
.global main
main:
li $a0, 100000
li $a1, -100000
sltiu $t0, $a0, -40
sltiu $t1, $a0, 40
sltiu $t2, $a1, -40
sltiu $t3, $a1, 40
break

View File

@ -1088,7 +1088,7 @@ void CPU::jit_instruction(jit_state_t *_jit, uint32_t pc, uint32_t instr,
case 013: // SLTIU case 013: // SLTIU
{ {
TWO_REG_IMM_OP(lti_u, sltiu, int16_t); TWO_REG_IMM_OP(lti_u, sltiu, uint16_t);
break; break;
} }