tests: tcg: lm32: add more test cases

Esp. for testing zero/sign extend in compare operations.

Signed-off-by: Michael Walle <michael@walle.cc>
This commit is contained in:
Michael Walle 2012-12-14 18:13:06 +01:00
parent 608a03c1df
commit 6036e9d87e
4 changed files with 61 additions and 1 deletions

View File

@ -52,4 +52,19 @@ mvi r3, 0
cmpgei r3, r3, 0 cmpgei r3, r3, 0
check_r3 1 check_r3 1
test_name CMPGEI_11
mvi r1, 0
cmpgei r3, r1, -32768
check_r3 1
test_name CMPGEI_12
mvi r1, -1
cmpgei r3, r1, -32768
check_r3 1
test_name CMPGEI_13
mvi r1, -32768
cmpgei r3, r1, -32768
check_r3 1
end end

View File

@ -52,4 +52,19 @@ mvi r3, 0
cmpgeui r3, r3, 0 cmpgeui r3, r3, 0
check_r3 1 check_r3 1
test_name CMPGEUI_11
mvi r1, 0
cmpgeui r3, r1, 0x8000
check_r3 0
test_name CMPGEUI_12
mvi r1, -1
cmpgeui r3, r1, 0x8000
check_r3 1
test_name CMPGEUI_13
ori r1, r0, 0x8000
cmpgeui r3, r1, 0x8000
check_r3 1
end end

View File

@ -52,4 +52,19 @@ mvi r3, 0
cmpgi r3, r3, 0 cmpgi r3, r3, 0
check_r3 0 check_r3 0
test_name CMPGI_11
mvi r1, 0
cmpgi r3, r1, -32768
check_r3 1
test_name CMPGI_12
mvi r1, -1
cmpgi r3, r1, -32768
check_r3 1
test_name CMPGI_13
mvi r1, -32768
cmpgi r3, r1, -32768
check_r3 0
end end

View File

@ -35,7 +35,7 @@ check_r3 1
test_name CMPGUI_7 test_name CMPGUI_7
mvi r1, -1 mvi r1, -1
cmpgui r3, r1, 0xffff cmpgui r3, r1, 0xffff
check_r3 0 check_r3 1
test_name CMPGUI_8 test_name CMPGUI_8
mvi r3, 0 mvi r3, 0
@ -52,4 +52,19 @@ mvi r3, 0
cmpgui r3, r3, 0 cmpgui r3, r3, 0
check_r3 0 check_r3 0
test_name CMPGUI_11
mvi r1, 0
cmpgui r3, r1, 0x8000
check_r3 0
test_name CMPGUI_12
mvi r1, -1
cmpgui r3, r1, 0x8000
check_r3 1
test_name CMPGUI_13
ori r1, r0, 0x8000
cmpgui r3, r1, 0x8000
check_r3 0
end end