diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2011-09-06 03:55:57 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-09-10 16:57:40 +0000 |
commit | 7d890b4074a415d39f02d3b01e7c40ece1b57087 (patch) | |
tree | c5fca41c0763dfb3a7475c4b59dfaf9872d7d46e /tests/xtensa/test_max.S | |
parent | 16e7caae53f6143d0d4d2cb1dadb048b4de790a5 (diff) | |
download | qemu-7d890b4074a415d39f02d3b01e7c40ece1b57087.zip qemu-7d890b4074a415d39f02d3b01e7c40ece1b57087.tar.gz qemu-7d890b4074a415d39f02d3b01e7c40ece1b57087.tar.bz2 |
target-xtensa: add regression testsuite
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tests/xtensa/test_max.S')
-rw-r--r-- | tests/xtensa/test_max.S | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/tests/xtensa/test_max.S b/tests/xtensa/test_max.S new file mode 100644 index 0000000..2534c9d --- /dev/null +++ b/tests/xtensa/test_max.S @@ -0,0 +1,81 @@ +.include "macros.inc" + +test_suite max + +test max + movi a2, 0xffffffff + movi a3, 1 + movi a4, 1 + max a5, a2, a3 + assert eq, a5, a4 + + movi a2, 1 + movi a3, 0xffffffff + movi a4, 1 + max a5, a2, a3 + assert eq, a5, a4 + + movi a2, 0xffffffff + movi a3, 1 + movi a4, 1 + max a2, a2, a3 + assert eq, a2, a4 + + movi a2, 0xffffffff + movi a3, 1 + movi a4, 1 + max a3, a2, a3 + assert eq, a3, a4 + + movi a2, 1 + movi a3, 0xffffffff + movi a4, 1 + max a2, a2, a3 + assert eq, a2, a4 + + movi a2, 1 + movi a3, 0xffffffff + movi a4, 1 + max a3, a2, a3 + assert eq, a3, a4 +test_end + +test maxu + movi a2, 0xffffffff + movi a3, 1 + movi a4, 0xffffffff + maxu a5, a2, a3 + assert eq, a5, a4 + + movi a2, 1 + movi a3, 0xffffffff + movi a4, 0xffffffff + maxu a5, a2, a3 + assert eq, a5, a4 + + movi a2, 0xffffffff + movi a3, 1 + movi a4, 0xffffffff + maxu a2, a2, a3 + assert eq, a2, a4 + + movi a2, 0xffffffff + movi a3, 1 + movi a4, 0xffffffff + maxu a3, a2, a3 + assert eq, a3, a4 + + movi a2, 1 + movi a3, 0xffffffff + movi a4, 0xffffffff + maxu a2, a2, a3 + assert eq, a2, a4 + + movi a2, 1 + movi a3, 0xffffffff + movi a4, 0xffffffff + maxu a3, a2, a3 + assert eq, a3, a4 +test_end + +test_suite_end |