root / tests / cris / check_ba.s @ f97572e5
History | View | Annotate | Download (937 Bytes)
1 | dd43edf4 | ths | # mach: crisv0 crisv3 crisv8 crisv10 crisv32 |
---|---|---|---|
2 | dd43edf4 | ths | # output: a\n |
3 | dd43edf4 | ths | |
4 | dd43edf4 | ths | |
5 | dd43edf4 | ths | .set smalloffset,0 |
6 | dd43edf4 | ths | .set largeoffset,0 |
7 | dd43edf4 | ths | |
8 | dd43edf4 | ths | |
9 | dd43edf4 | ths | .macro fail |
10 | dd43edf4 | ths | jump _fail |
11 | dd43edf4 | ths | .endm |
12 | dd43edf4 | ths | |
13 | dd43edf4 | ths | .global main |
14 | dd43edf4 | ths | main: |
15 | dd43edf4 | ths | moveq 0,$r3 |
16 | dd43edf4 | ths | |
17 | dd43edf4 | ths | ; Short forward branch. |
18 | dd43edf4 | ths | ba 0f |
19 | dd43edf4 | ths | addq 1,$r3 |
20 | dd43edf4 | ths | fail |
21 | dd43edf4 | ths | |
22 | dd43edf4 | ths | ; Max short forward branch. |
23 | dd43edf4 | ths | 1: |
24 | dd43edf4 | ths | ba 2f |
25 | dd43edf4 | ths | addq 1,$r3 |
26 | dd43edf4 | ths | fail |
27 | dd43edf4 | ths | |
28 | dd43edf4 | ths | ; Short backward branch. |
29 | dd43edf4 | ths | 0: |
30 | dd43edf4 | ths | ba 1b |
31 | dd43edf4 | ths | addq 1,$r3 |
32 | dd43edf4 | ths | fail |
33 | dd43edf4 | ths | |
34 | dd43edf4 | ths | .space 254-2+smalloffset+1b-.,0 |
35 | dd43edf4 | ths | moveq 0,$r3 |
36 | dd43edf4 | ths | |
37 | dd43edf4 | ths | 2: |
38 | dd43edf4 | ths | ; Transit branch (long). |
39 | dd43edf4 | ths | ba 3f |
40 | dd43edf4 | ths | addq 1,$r3 |
41 | dd43edf4 | ths | fail |
42 | dd43edf4 | ths | |
43 | dd43edf4 | ths | moveq 0,$r3 |
44 | dd43edf4 | ths | 4: |
45 | dd43edf4 | ths | ; Long forward branch. |
46 | dd43edf4 | ths | ba 5f |
47 | dd43edf4 | ths | addq 1,$r3 |
48 | dd43edf4 | ths | fail |
49 | dd43edf4 | ths | |
50 | dd43edf4 | ths | .space 256-2-smalloffset+4b-.,0 |
51 | dd43edf4 | ths | |
52 | dd43edf4 | ths | moveq 0,$r3 |
53 | dd43edf4 | ths | |
54 | dd43edf4 | ths | ; Max short backward branch. |
55 | dd43edf4 | ths | 3: |
56 | dd43edf4 | ths | ba 4b |
57 | dd43edf4 | ths | addq 1,$r3 |
58 | dd43edf4 | ths | fail |
59 | dd43edf4 | ths | |
60 | dd43edf4 | ths | 5: |
61 | dd43edf4 | ths | ; Max long forward branch. |
62 | dd43edf4 | ths | ba 6f |
63 | dd43edf4 | ths | addq 1,$r3 |
64 | dd43edf4 | ths | fail |
65 | dd43edf4 | ths | |
66 | dd43edf4 | ths | .space 32766+largeoffset-2+5b-.,0 |
67 | dd43edf4 | ths | |
68 | dd43edf4 | ths | moveq 0,$r3 |
69 | dd43edf4 | ths | 6: |
70 | dd43edf4 | ths | ; Transit branch. |
71 | dd43edf4 | ths | ba 7f |
72 | dd43edf4 | ths | addq 1,$r3 |
73 | dd43edf4 | ths | fail |
74 | dd43edf4 | ths | |
75 | dd43edf4 | ths | moveq 0,$r3 |
76 | dd43edf4 | ths | 9: |
77 | dd43edf4 | ths | jsr pass |
78 | dd43edf4 | ths | nop |
79 | dd43edf4 | ths | |
80 | dd43edf4 | ths | ; Transit branch. |
81 | dd43edf4 | ths | moveq 0,$r3 |
82 | dd43edf4 | ths | 7: |
83 | dd43edf4 | ths | ba 8f |
84 | dd43edf4 | ths | addq 1,$r3 |
85 | dd43edf4 | ths | fail |
86 | dd43edf4 | ths | |
87 | dd43edf4 | ths | .space 32768-largeoffset+9b-.,0 |
88 | dd43edf4 | ths | |
89 | dd43edf4 | ths | 8: |
90 | dd43edf4 | ths | ; Max long backward branch. |
91 | dd43edf4 | ths | ba 9b |
92 | dd43edf4 | ths | addq 1,$r3 |
93 | dd43edf4 | ths | fail |