GNU Binutils with patches for OS216
Revisión | c84e5117321e3cb97f782629612f85786bbf815d (tree) |
---|---|
Tiempo | 2002-10-23 08:15:59 |
Autor | Hans-Peter Nilsson <hp@axis...> |
Commiter | Hans-Peter Nilsson |
* gas/cris/rd-pcrel1.d, gas/cris/rd-pcrel1.s,
gas/cris/rd-pcrel2.d, gas/cris/rd-pcrel2.s: New tests.
@@ -1,3 +1,8 @@ | ||
1 | +2002-10-23 Hans-Peter Nilsson <hp@axis.com> | |
2 | + | |
3 | + * gas/cris/rd-pcrel1.d, gas/cris/rd-pcrel1.s, | |
4 | + gas/cris/rd-pcrel2.d, gas/cris/rd-pcrel2.s: New tests. | |
5 | + | |
1 | 6 | 2002-10-21 Richard Sandiford <rsandifo@redhat.com> |
2 | 7 | |
3 | 8 | * gas/mips/elf-rel7.[sd]: New test. |
@@ -0,0 +1,45 @@ | ||
1 | +#objdump: -dr | |
2 | + | |
3 | +.*: file format .*-cris | |
4 | + | |
5 | +Disassembly of section \.text: | |
6 | +#... | |
7 | +[ ]+28:[ ]+6fae 6e00 0000[ ]+move.d 6e <y03\+0xa>,r10 | |
8 | +[ ]+2e:[ ]+6fae dcff ffff[ ]+move.d 0xffffffdc,r10 | |
9 | +[ ]+34:[ ]+6fae 5c00 0000[ ]+move.d 5c <y01>,r10 | |
10 | +[ ]+3a:[ ]+6fae caff ffff[ ]+move.d 0xffffffca,r10 | |
11 | +[ ]+40:[ ]+6fae 5000 0000[ ]+move.d 50 <xx\+0x28>,r10 | |
12 | +[ ]+46:[ ]+6fae beff ffff[ ]+move.d 0xffffffbe,r10 | |
13 | +[ ]+4c:[ ]+3ef1 633a[ ]+move.d \[pc\+62\],r3 | |
14 | +[ ]+50:[ ]+b8f1 633a[ ]+move.d \[pc-72\],r3 | |
15 | +[ ]+54:[ ]+40f1 633a[ ]+move.d \[pc\+64\],r3 | |
16 | +0+58 <y00>: | |
17 | +[ ]+58:[ ]+b0f1 633a[ ]+move.d \[pc-80\],r3 | |
18 | +0+5c <y01>: | |
19 | +[ ]+5c:[ ]+38f1 633a[ ]+move.d \[pc\+56\],r3 | |
20 | +0+60 <y02>: | |
21 | +[ ]+60:[ ]+a8f1 633a[ ]+move.d \[pc-88\],r3 | |
22 | +0+64 <y03>: | |
23 | +#... | |
24 | +[ ]+480:[ ]+5ffd 0a04 633a[ ]+move.d \[pc\+1034\],r3 | |
25 | +[ ]+486:[ ]+5ffd 82fb 633a[ ]+move.d \[pc-1150\],r3 | |
26 | +[ ]+48c:[ ]+5ffd fc03 633a[ ]+move.d \[pc\+1020\],r3 | |
27 | +0+492 <yy00>: | |
28 | +[ ]+492:[ ]+5ffd 74fb 633a[ ]+move.d \[pc-1164\],r3 | |
29 | +0+498 <yy01>: | |
30 | +[ ]+498:[ ]+5ffd f003 633a[ ]+move.d \[pc\+1008\],r3 | |
31 | +0+49e <yy02>: | |
32 | +[ ]+49e:[ ]+5ffd 68fb 633a[ ]+move.d \[pc-1176\],r3 | |
33 | +#... | |
34 | +[ ]+18f2e:[ ]+6ffd ce86 0100 633a[ ]+move.d \[pc\+186ce <yy\+0x17e42>\],r3 | |
35 | +[ ]+18f36:[ ]+6ffd d270 feff 633a[ ]+move.d \[pc\+fffe70d2 <z\+0xfffb5ad4>\],r3 | |
36 | +[ ]+18f3e:[ ]+6ffd ba86 0100 633a[ ]+move.d \[pc\+186ba <yy\+0x17e2e>\],r3 | |
37 | +0+18f46 <z00>: | |
38 | +[ ]+18f46:[ ]+6ffd be70 feff 633a[ ]+move.d \[pc\+fffe70be <z\+0xfffb5ac0>\],r3 | |
39 | +0+18f4e <z01>: | |
40 | +[ ]+18f4e:[ ]+6ffd aa86 0100 633a[ ]+move.d \[pc\+186aa <yy\+0x17e1e>\],r3 | |
41 | +0+18f56 <z02>: | |
42 | +[ ]+18f56:[ ]+6ffd ae70 feff 633a[ ]+move.d \[pc\+fffe70ae <z\+0xfffb5ab0>\],r3 | |
43 | +#... | |
44 | +0+315fe <z>: | |
45 | +[ ]+315fe:[ ]+0f05[ ]+nop |
@@ -0,0 +1,55 @@ | ||
1 | +; Test that pc-relative expressions give expected results for | |
2 | +; various expressions. | |
3 | + .text | |
4 | + .space 10 | |
5 | +x: | |
6 | + .space 30 | |
7 | +xx: | |
8 | + move.d y-.,r10 | |
9 | + move.d x-.,r10 | |
10 | + move.d y-(.+6),r10 | |
11 | + move.d x-(.+6),r10 | |
12 | + move.d y-.-6,r10 | |
13 | + move.d x-.-6,r10 | |
14 | + move.d [pc+y-(.+12)],r3 | |
15 | + move.d [pc+x-(.+2)],r3 | |
16 | + move.d [pc+y-(y00-2)],r3 | |
17 | +y00: | |
18 | + move.d [pc+x-(y01-2)],r3 | |
19 | +y01: | |
20 | + move.d [pc+y-y02+2],r3 | |
21 | +y02: | |
22 | + move.d [pc+x-y03+2],r3 | |
23 | +y03: | |
24 | + .space 50 | |
25 | +y: | |
26 | + nop | |
27 | + .space 1000 | |
28 | + move.d [pc+yy-(.+2)],r3 | |
29 | + move.d [pc+x-(.+2)],r3 | |
30 | + move.d [pc+yy-(yy00-2)],r3 | |
31 | +yy00: | |
32 | + move.d [pc+x-(yy01-2)],r3 | |
33 | +yy01: | |
34 | + move.d [pc+yy-yy02+2],r3 | |
35 | +yy02: | |
36 | + move.d [pc+x-yy03+2],r3 | |
37 | +yy03: | |
38 | + .space 1000 | |
39 | +yy: | |
40 | + nop | |
41 | + .space 100000 | |
42 | + move.d [pc+z-(.+2)],r3 | |
43 | + move.d [pc+x-(.+2)],r3 | |
44 | + move.d [pc+z-(z00-2)],r3 | |
45 | +z00: | |
46 | + move.d [pc+x-(z01-2)],r3 | |
47 | +z01: | |
48 | + move.d [pc+z-z02+2],r3 | |
49 | +z02: | |
50 | + move.d [pc+x-z03+2],r3 | |
51 | +z03: | |
52 | + .space 100000 | |
53 | +z: | |
54 | + nop | |
55 | + |
@@ -0,0 +1,40 @@ | ||
1 | +#objdump: -dr | |
2 | + | |
3 | +.*: file format .*-cris | |
4 | + | |
5 | +Disassembly of section \.text: | |
6 | + | |
7 | +0+ <z>: | |
8 | +[ ]+0:[ ]+80f1 688a[ ]+move.d \[pc-128\],r8 | |
9 | +[ ]+4:[ ]+5ffd 7dff 688a[ ]+move.d \[pc-131\],r8 | |
10 | +[ ]+a:[ ]+7ff1 688a[ ]+move.d \[pc\+127\],r8 | |
11 | +[ ]+e:[ ]+5ffd 8200 688a[ ]+move.d \[pc\+130\],r8 | |
12 | +[ ]+14:[ ]+5ffd 0080 688a[ ]+move.d \[pc-32768\],r8 | |
13 | +[ ]+1a:[ ]+6ffd fd7f ffff 688a[ ]+move.d \[pc\+ffff7ffd <x8\+0xffff7f9d>\],r8 | |
14 | +[ ]+22:[ ]+5ffd ff7f 688a[ ]+move.d \[pc\+32767\],r8 | |
15 | +[ ]+28:[ ]+6ffd 0280 0000 688a[ ]+move.d \[pc\+8002 <x8\+0x7fa2>\],r8 | |
16 | +0+30 <x>: | |
17 | +[ ]+30:[ ]+80f1 688a[ ]+move.d \[pc-128\],r8 | |
18 | +0+34 <x1>: | |
19 | +[ ]+34:[ ]+5ffd 7dff 688a[ ]+move.d \[pc-131\],r8 | |
20 | +0+3a <x2>: | |
21 | +[ ]+3a:[ ]+7ff1 688a[ ]+move.d \[pc\+127\],r8 | |
22 | +0+3e <x3>: | |
23 | +[ ]+3e:[ ]+5ffd 8200 688a[ ]+move.d \[pc\+130\],r8 | |
24 | +0+44 <x4>: | |
25 | +[ ]+44:[ ]+5ffd 0080 688a[ ]+move.d \[pc-32768\],r8 | |
26 | +0+4a <x5>: | |
27 | +[ ]+4a:[ ]+6ffd fd7f ffff 688a[ ]+move.d \[pc\+ffff7ffd <x8\+0xffff7f9d>\],r8 | |
28 | +0+52 <x6>: | |
29 | +[ ]+52:[ ]+5ffd ff7f 688a[ ]+move.d \[pc\+32767\],r8 | |
30 | +0+58 <x7>: | |
31 | +[ ]+58:[ ]+6ffd 0280 0000 688a[ ]+move.d \[pc\+8002 <x8\+0x7fa2>\],r8 | |
32 | +0+60 <x8>: | |
33 | +[ ]+60:[ ]+80f1 688a[ ]+move.d \[pc-128\],r8 | |
34 | +[ ]+64:[ ]+5ffd 7dff 688a[ ]+move.d \[pc-131\],r8 | |
35 | +[ ]+6a:[ ]+7ff1 688a[ ]+move.d \[pc\+127\],r8 | |
36 | +[ ]+6e:[ ]+5ffd 8200 688a[ ]+move.d \[pc\+130\],r8 | |
37 | +[ ]+74:[ ]+5ffd 0080 688a[ ]+move.d \[pc-32768\],r8 | |
38 | +[ ]+7a:[ ]+6ffd fd7f ffff 688a[ ]+move.d \[pc\+ffff7ffd <x8\+0xffff7f9d>\],r8 | |
39 | +[ ]+82:[ ]+5ffd ff7f 688a[ ]+move.d \[pc\+32767\],r8 | |
40 | +[ ]+88:[ ]+6ffd 0280 0000 688a[ ]+move.d \[pc\+8002 <x8\+0x7fa2>\],r8 |
@@ -0,0 +1,60 @@ | ||
1 | +; Test border-cases for relaxation of pc-relative expressions. | |
2 | + | |
3 | + .macro relaxcode | |
4 | + .endm | |
5 | + | |
6 | + .text | |
7 | + | |
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 |