target-xtensa: add tests for LOOPNEZ and LOOPGTZ

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Max Filippov 2012-04-16 01:47:07 +04:00 committed by Blue Swirl
parent b18b37f7c5
commit 536a98d4d6

View File

@ -124,4 +124,40 @@ test lend_invalidation
assert eqi, a2, 7
test_end
test loopnez
movi a2, 0
movi a3, 5
loopnez a3, 1f
addi a2, a2, 1
1:
assert eqi, a2, 5
movi a2, 0
movi a3, 0
loopnez a3, 1f
test_fail
1:
test_end
test loopgtz
movi a2, 0
movi a3, 5
loopgtz a3, 1f
addi a2, a2, 1
1:
assert eqi, a2, 5
movi a2, 0
movi a3, 0
loopgtz a3, 1f
test_fail
1:
movi a2, 0
movi a3, 0x80000000
loopgtz a3, 1f
test_fail
1:
test_end
test_suite_end