Commit | Line | Data |
---|---|---|
c84e5117 HPN |
1 | ; Test border-cases for relaxation of pc-relative expressions. |
2 | ||
3 | .macro relaxcode | |
4 | .endm | |
5 | ||
6 | .text | |
0465aa2f | 7 | .syntax no_register_prefix |
c84e5117 HPN |
8 | ; Region of relaxation is after insn, same segment |
9 | z: | |
10 | move.d [pc-(x1-x+128-4)],r8 ; 4 | |
11 | move.d [pc-(x2-x+129-8)],r8 ; 6 | |
12 | move.d [pc+x3-x+127-14],r8 ; 4 | |
13 | move.d [pc+x4-x+128-18],r8 ; 6 | |
14 | move.d [pc-(x5-x+32768-26)],r8 ; 6 | |
15 | move.d [pc-(x6-x+32769-32)],r8 ; 8 | |
16 | move.d [pc+x7-x+32767-40],r8 ; 6 | |
17 | move.d [pc+x8-x+32768-46],r8 ; 8 | |
18 | ||
19 | .p2align 1 | |
20 | ||
21 | ; Region of relaxation is around insn, same segment | |
22 | x: | |
23 | move.d [pc-(x1-x+128-4)],r8 ; 4 | |
24 | x1: | |
25 | move.d [pc-(x2-x+129-8)],r8 ; 6 | |
26 | x2: | |
27 | move.d [pc+x3-x+127-14],r8 ; 4 | |
28 | x3: | |
29 | move.d [pc+x4-x+128-18],r8 ; 6 | |
30 | x4: | |
31 | move.d [pc-(x5-x+32768-26)],r8 ; 6 | |
32 | x5: | |
33 | move.d [pc-(x6-x+32769-32)],r8 ; 8 | |
34 | x6: | |
35 | move.d [pc+x7-x+32767-40],r8 ; 6 | |
36 | x7: | |
37 | move.d [pc+x8-x+32768-46],r8 ; 8 | |
38 | x8: | |
39 | ||
40 | ; Region of relaxation is before insn, same segment. | |
41 | move.d [pc-(x1-x+128-4)],r8 ; 4 | |
42 | move.d [pc-(x2-x+129-8)],r8 ; 6 | |
43 | move.d [pc+x3-x+127-14],r8 ; 4 | |
44 | move.d [pc+x4-x+128-18],r8 ; 6 | |
45 | move.d [pc-(x5-x+32768-26)],r8 ; 6 | |
46 | move.d [pc-(x6-x+32769-32)],r8 ; 8 | |
47 | move.d [pc+x7-x+32767-40],r8 ; 6 | |
48 | move.d [pc+x8-x+32768-46],r8 ; 8 | |
49 | ||
50 | ; Region of relaxation is in other segment. | |
51 | .section .text.other | |
52 | y: | |
53 | move.d [pc-(x1-x+128-4)],r8 ; 4 | |
54 | move.d [pc-(x2-x+129-8)],r8 ; 6 | |
55 | move.d [pc+x3-x+127-14],r8 ; 4 | |
56 | move.d [pc+x4-x+128-18],r8 ; 6 | |
57 | move.d [pc-(x5-x+32768-26)],r8 ; 6 | |
58 | move.d [pc-(x6-x+32769-32)],r8 ; 8 | |
59 | move.d [pc+x7-x+32767-40],r8 ; 6 | |
60 | move.d [pc+x8-x+32768-46],r8 ; 8 |