diff options
author | fishsoupisgood <github@madingley.org> | 2019-04-29 01:17:54 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2019-05-27 03:43:43 +0100 |
commit | 3f2546b2ef55b661fd8dd69682b38992225e86f6 (patch) | |
tree | 65ca85f13617aee1dce474596800950f266a456c /tests/tcg/cris/check_xarith.s | |
download | qemu-master.tar.gz qemu-master.tar.bz2 qemu-master.zip |
Diffstat (limited to 'tests/tcg/cris/check_xarith.s')
-rw-r--r-- | tests/tcg/cris/check_xarith.s | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/tcg/cris/check_xarith.s b/tests/tcg/cris/check_xarith.s new file mode 100644 index 00000000..80038b2a --- /dev/null +++ b/tests/tcg/cris/check_xarith.s @@ -0,0 +1,72 @@ + +.include "testutils.inc" + + start + + moveq -1, $r0 + moveq 0, $r1 + addq 1, $r0 + ax + addq 0, $r1 + + move.d $r0, $r3 + checkr3 0 + move.d $r1, $r3 + checkr3 1 + + move.d 0, $r0 + moveq -1, $r1 + subq 1, $r0 + ax + subq 0, $r1 + + move.d $r0, $r3 + checkr3 ffffffff + move.d $r1, $r3 + checkr3 fffffffe + + + moveq -1, $r0 + moveq -1, $r1 + cmpq -1, $r0 + ax + cmpq -1, $r1 + beq 1f + nop + fail +1: + cmpq 0, $r0 + ax + cmpq -1, $r1 + bne 1f + nop + fail +1: + + ;; test for broken X sequence, run it several times. + moveq 8, $r0 +1: + moveq 0, $r3 + move.d $r0, $r1 + andq 1, $r1 + lslq 4, $r1 + moveq 1, $r2 + or.d $r1, $r2 + ba 2f + move $r2, $ccs +2: + addq 0, $r3 + move.d $r0, $r4 + move.d $r1, $r5 + move.d $r2, $r6 + move.d $r3, $r7 + lsrq 4, $r1 + move.d $r1, $r8 + xor $r1, $r3 + checkr3 0 + subq 1, $r0 + bne 1b + nop + + pass + quit |