aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-04-16 01:47:07 +0400
committerBlue Swirl <blauwirbel@gmail.com>2012-04-21 13:24:50 +0000
commit536a98d4d66444437e01ff2920df1a554df15efb (patch)
tree5bd0e8e482999727e53e8aa248de41864ecde12d /tests
parentb18b37f7c5bc96dabdb08bcfb699b339a76104bf (diff)
downloadqemu-536a98d4d66444437e01ff2920df1a554df15efb.zip
qemu-536a98d4d66444437e01ff2920df1a554df15efb.tar.gz
qemu-536a98d4d66444437e01ff2920df1a554df15efb.tar.bz2
target-xtensa: add tests for LOOPNEZ and LOOPGTZ
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/tcg/xtensa/test_loop.S36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/tcg/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S
index 5cead47..1c240e8 100644
--- a/tests/tcg/xtensa/test_loop.S
+++ b/tests/tcg/xtensa/test_loop.S
@@ -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