Fix 32-bit overflow in parallels image support
[qemu-kvm/fedora.git] / tests / cris / check_ba.s
blob873a4086c5f97d5f6191716581191eb67fdcbfd6
1 # mach: crisv0 crisv3 crisv8 crisv10 crisv32
2 # output: a\n
5 .set smalloffset,0
6 .set largeoffset,0
9 .macro fail
10 jump _fail
11 .endm
13 .global main
14 main:
15 moveq 0,$r3
17 ; Short forward branch.
18 ba 0f
19 addq 1,$r3
20 fail
22 ; Max short forward branch.
24 ba 2f
25 addq 1,$r3
26 fail
28 ; Short backward branch.
30 ba 1b
31 addq 1,$r3
32 fail
34 .space 254-2+smalloffset+1b-.,0
35 moveq 0,$r3
38 ; Transit branch (long).
39 ba 3f
40 addq 1,$r3
41 fail
43 moveq 0,$r3
45 ; Long forward branch.
46 ba 5f
47 addq 1,$r3
48 fail
50 .space 256-2-smalloffset+4b-.,0
52 moveq 0,$r3
54 ; Max short backward branch.
56 ba 4b
57 addq 1,$r3
58 fail
61 ; Max long forward branch.
62 ba 6f
63 addq 1,$r3
64 fail
66 .space 32766+largeoffset-2+5b-.,0
68 moveq 0,$r3
70 ; Transit branch.
71 ba 7f
72 addq 1,$r3
73 fail
75 moveq 0,$r3
77 jsr pass
78 nop
80 ; Transit branch.
81 moveq 0,$r3
83 ba 8f
84 addq 1,$r3
85 fail
87 .space 32768-largeoffset+9b-.,0
90 ; Max long backward branch.
91 ba 9b
92 addq 1,$r3
93 fail