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