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_ba.s | |
download | qemu-master.tar.gz qemu-master.tar.bz2 qemu-master.zip |
Diffstat (limited to 'tests/tcg/cris/check_ba.s')
-rw-r--r-- | tests/tcg/cris/check_ba.s | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/tests/tcg/cris/check_ba.s b/tests/tcg/cris/check_ba.s new file mode 100644 index 00000000..873a4086 --- /dev/null +++ b/tests/tcg/cris/check_ba.s @@ -0,0 +1,93 @@ +# mach: crisv0 crisv3 crisv8 crisv10 crisv32 +# output: a\n + + + .set smalloffset,0 + .set largeoffset,0 + + + .macro fail + jump _fail + .endm + + .global main +main: + moveq 0,$r3 + +; Short forward branch. + ba 0f + addq 1,$r3 + fail + +; Max short forward branch. +1: + ba 2f + addq 1,$r3 + fail + +; Short backward branch. +0: + ba 1b + addq 1,$r3 + fail + + .space 254-2+smalloffset+1b-.,0 + moveq 0,$r3 + +2: +; Transit branch (long). + ba 3f + addq 1,$r3 + fail + + moveq 0,$r3 +4: +; Long forward branch. + ba 5f + addq 1,$r3 + fail + + .space 256-2-smalloffset+4b-.,0 + + moveq 0,$r3 + +; Max short backward branch. +3: + ba 4b + addq 1,$r3 + fail + +5: +; Max long forward branch. + ba 6f + addq 1,$r3 + fail + + .space 32766+largeoffset-2+5b-.,0 + + moveq 0,$r3 +6: +; Transit branch. + ba 7f + addq 1,$r3 + fail + + moveq 0,$r3 +9: + jsr pass + nop + +; Transit branch. + moveq 0,$r3 +7: + ba 8f + addq 1,$r3 + fail + + .space 32768-largeoffset+9b-.,0 + +8: +; Max long backward branch. + ba 9b + addq 1,$r3 + fail |