passes quick test: bne, bge, bgeu

This commit is contained in:
Brendan Haines 2020-11-09 20:22:18 -07:00
parent 6e0d9c96a1
commit 21883dbd84

View File

@ -155,7 +155,7 @@ test2:
j fail j fail
test3: test3:
#blt # blt
addi x30, x0, 3 # x30 = 3 addi x30, x0, 3 # x30 = 3
blt x8, x9, fail # x8 == x9 blt x8, x9, fail # x8 == x9
blt x7, x8, fail # x7 > x8 blt x7, x8, fail # x7 > x8
@ -164,14 +164,48 @@ test3:
j fail j fail
test4: test4:
#bltu # bltu
addi x30, x0, 4 # x30 = 4 addi x30, x0, 4 # x30 = 4
bltu x8, x9, fail # x8 == x9 bltu x8, x9, fail # x8 == x9
bltu x8, x7, fail # x8 < x7 bltu x7, x8, fail # x7 > x8
bltu x30, x8, test5 # x30 < x8 unsigned bltu x30, x8, test5 # x30 < x8 unsigned
j fail
test5: test5:
addi x30, x0, 5 # x30 = 5 addi x30, x0, 5 # x30 = 5
bltu x8, x7, test6 # x8 < x7
j fail
test6:
# bne
addi x30, x0, 6 # x30 = 6
bne x0, x0, fail # 0 == 0
bne x8, x9, fail # 0 == 0
bne x8, x0, test7 # x8 != 0
j fail
test7:
# bge
addi x30, x0, 7 # x30 = 7
bge x8, x7, fail # x8 < x7
bge x7, x7, test8 # x7 == x7
j fail
test8:
addi x30, x0, 8 # x30 = 8
bge x8, x0, fail # x8 < 0
bge x7, x8, test9 # x7 > x8
j fail
test9:
# bgeu
addi x30, x0, 9 # x30 = 9
bgeu x8, x7, fail # x8 < x7
bgeu x0, x8, fail # 0 < x8 unsigned
bgeu x8, x0, test10 # x8 > 0 unsigned
j fail
test10:
# set registers to known values before loop # set registers to known values before loop