Update reference.txt

Fixed branch instruction test case in ref.txt
This commit is contained in:
theexecutor13 2020-12-10 00:41:19 +08:00 committed by GitHub
parent b17158489f
commit 315e5af32c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,9 +5,7 @@ Hex code
Reference Output Reference Output
================ ================
== ADDIU Add immediate unsigned (no overflow) == ADDIU Add immediate unsigned (no overflow)
== ADDU Add unsigned (no overflow) == == ADDU Add unsigned (no overflow) ==
@ -27,142 +25,152 @@ JR $0
register_v0 = 8 register_v0 = 8
AND Bitwise and
== AND Bitwise and ==
ANDI Bitwise and immediate ANDI Bitwise and immediate
==BEQ Branch on equal== ==BEQ Branch on equal==
ORI $4,$0,5 ORI $4,$0,5
ORI $5,$0,5 ORI $5,$0,5
BEQ $4,$5,2 BEQ $4,$5,3
ADDIU $6,$6,0 NOP
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $0 JR $0
50004043 34040005
50005043 34050005
20005801 1085FFFF
00006C42 00000000
80000000 00000008
10002043 00000000
80000000 34020001
00000008
register_v0 = 1 register_v0 = 1
==BGEZ Branch on greater than or equal to zero== ==BGEZ Branch on greater than or equal to zero==
ORI $4,$0,3 ORI $4,$0,3
BGEZ $4,2 BGEZ $4,3
ADDIU $6,$6,0 NOP
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $0 JR $0
30004043 34040003
20001840 04810003
00006C42 00000000
80000000 00000008
10002043 00000000
80000000 34020001
00000008
register_v0 = 1 register_v0 = 1
==BGEZAL Branch on non-negative (>=0) and link== ==BGEZAL Branch on non-negative (>=0) and link==
ORI $4,$0,3 ORI $4,$0,3
BGEZAL $4,3 BGEZAL $4,4
ADDIU $6,$6,0 NOP
ADDIU $2,$2,1 ADDIU $2,$2,1
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $31 JR $31
30004043 34040003
30001940 04910004
00006C42 00000000
10002442 24420001
80000000 00000008
10002043 00000000
80000000 34020001
03E00008
register_v0 = 2 register_v0 = 2
==BGTZ Branch on greater than zero== ==BGTZ Branch on greater than zero==
ORI $4,$0,3 ORI $4,$0,3
BGTZ $4,2 BGTZ $4,3
ADDIU $6,$6,0 NOP
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $0 JR $0
30004043 34040003
200008C1 1C800003
00006C42 00000000
80000000 00000008
10002043 00000000
80000000 34020001
00000008
register_v0 = 1 register_v0 = 1
==BLEZ Branch on less than or equal to zero== ==BLEZ Branch on less than or equal to zero==
ORI $4,$0,-1 ORI $4,$0,-1
BLEZ $4,2 BLEZ $4,3
ADDIU $6,$6,0 NOP
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $0 JR $0
FFFF4043 3404FFFF
20000881 18800003
00006C42 00000000
80000000 00000008
10002043 00000000
80000000 34020001
00000008
register_v0 = 1 register_v0 = 1
==BLTZ Branch on less than zero== ==BLTZ Branch on less than zero==
ORI $4,$0,-1 ORI $4,$0,-1
BLTZ $4,2 BLTZ $4,3
ADDIU $6,$6,0 NOP
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $0 JR $0
FFFF4043 3404FFFF
20000840 04800003
00006C42 00000000
80000000 00000008
10002043 00000000
80000000 34020001
00000008
register_v0 = 1 register_v0 = 1
==BLTZAL Branch on less than zero and link== ==BLTZAL Branch on less than zero and link==
ORI $4,$0,-1 ORI $4,$0,-1
BLTZAL $4,3 BLTZAL $4,4
ADDIU $6,$6,0 NOP
ADDIU $2,$2,1 ADDIU $2,$2,1
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $31 JR $31
FFFF4043 3404FFFF
20000940 04900004
00006C42 00000000
10002442 24420001
80000000 00000000
10002043 00000008
80000000 34020001
03E00008
register_v0 = 2 register_v0 = 2
@ -170,19 +178,21 @@ register_v0 = 2
ORI $4,$0,3 ORI $4,$0,3
ORI $5,$0,5 ORI $5,$0,5
BNE $4,$5,2 BNE $4,$5,3
ADDIU $6, $6, 0 NOP
JR $0 JR $0
NOP
ORI $2,$0,1 ORI $2,$0,1
JR $ JR $0
30004043 34040003
50005043 34040005
20005841 14850003
00006C42 00000000
80000000 00000008
10002043 00000000
80000000 34020001
00000008
register_v0 = 1 register_v0 = 1