diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2003-10-18 16:05:02 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2003-10-18 16:05:02 +0000 |
commit | 89b7466f7671017df5609bcbfcf2e6d836517535 (patch) | |
tree | 664549d367dfeab86fce92be1dd4e1644013acb1 /ld/testsuite | |
parent | 3314fb38c10588b178ec7a02b6d03d40590962b4 (diff) | |
download | gdb-89b7466f7671017df5609bcbfcf2e6d836517535.zip gdb-89b7466f7671017df5609bcbfcf2e6d836517535.tar.gz gdb-89b7466f7671017df5609bcbfcf2e6d836517535.tar.bz2 |
* ld-mmix/greg-14.d, ld-mmix/greg-5.d, ld-mmix/pushja1b.d,
ld-mmix/pushja1f.d, ld-mmix/pushja7b.d, ld-mmix/pushja7f.d: Pass
--no-pushj-stubs to the assembler.
* ld-mmix/pushjs2b.d, ld-mmix/greg-14s.d, ld-mmix/pushjs1.d,
ld-mmix/greg-5s.d, ld-mmix/pushjs3b.d, ld-mmix/pushja1f-s.d,
ld-mmix/pushjs1m.d, ld-mmix/pushja7b-s.d, ld-mmix/pushja7f-s.d,
ld-mmix/pushja1b-s.d, ld-mmix/pushjs2.d, ld-mmix/pushjs3.d,
ld-mmix/pushjs4b.d, ld-mmix/pushjs4.d, ld-mmix/pushjs1bm.d,
ld-mmix/pushjs1b.d, ld-mmix/pushjs2m.d, ld-mmix/pushjs1r.d,
ld-mmix/pushjs3m.d, ld-mmix/pushjs2bm.d, ld-mmix/pushjs4m.d,
ld-mmix/pushjs3bm.d, ld-mmix/pushjs2r.d, ld-mmix/pushjs4bm.d,
ld-mmix/pushjs3r.d, ld-mmix/pushjs4r.d: New tests.
Diffstat (limited to 'ld/testsuite')
33 files changed, 745 insertions, 6 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 28c1605..f9b557d 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2003-10-18 Hans-Peter Nilsson <hp@bitrange.com> + + * ld-mmix/greg-14.d, ld-mmix/greg-5.d, ld-mmix/pushja1b.d, + ld-mmix/pushja1f.d, ld-mmix/pushja7b.d, ld-mmix/pushja7f.d: Pass + --no-pushj-stubs to the assembler. + * ld-mmix/pushjs2b.d, ld-mmix/greg-14s.d, ld-mmix/pushjs1.d, + ld-mmix/greg-5s.d, ld-mmix/pushjs3b.d, ld-mmix/pushja1f-s.d, + ld-mmix/pushjs1m.d, ld-mmix/pushja7b-s.d, ld-mmix/pushja7f-s.d, + ld-mmix/pushja1b-s.d, ld-mmix/pushjs2.d, ld-mmix/pushjs3.d, + ld-mmix/pushjs4b.d, ld-mmix/pushjs4.d, ld-mmix/pushjs1bm.d, + ld-mmix/pushjs1b.d, ld-mmix/pushjs2m.d, ld-mmix/pushjs1r.d, + ld-mmix/pushjs3m.d, ld-mmix/pushjs2bm.d, ld-mmix/pushjs4m.d, + ld-mmix/pushjs3bm.d, ld-mmix/pushjs2r.d, ld-mmix/pushjs4bm.d, + ld-mmix/pushjs3r.d, ld-mmix/pushjs4r.d: New tests. + 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp> * ld-sh/sh64/rd-sh64.exp: If the test matches *-dso.d, copy diff --git a/ld/testsuite/ld-mmix/greg-14.d b/ld/testsuite/ld-mmix/greg-14.d index cacfbd6..19cc451 100644 --- a/ld/testsuite/ld-mmix/greg-14.d +++ b/ld/testsuite/ld-mmix/greg-14.d @@ -2,7 +2,7 @@ #source: gregpsj1.s #source: start.s #source: a.s -#as: -x +#as: -x --no-pushj-stubs #ld: -m mmo #objdump: -dt diff --git a/ld/testsuite/ld-mmix/greg-14s.d b/ld/testsuite/ld-mmix/greg-14s.d new file mode 100644 index 0000000..466661c --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-14s.d @@ -0,0 +1,23 @@ +#source: greg-1.s +#source: gregpsj1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# Like greg-14, but using PUSHJ stubs. + +.*: file format mmo +SYMBOL TABLE: +0+4 g \.text Main +0+4 g \.text _start +0+fe g \*REG\* areg +0+8 g \.text a +Disassembly of section \.text: +0+ <(Main|_start)-0x4>: + 0: f2fe0002 pushj areg,8 <a> +0+4 <(Main|_start)>: + 4: e3fd0001 setl \$253,0x1 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-5.d b/ld/testsuite/ld-mmix/greg-5.d index 1b67309..b392adf 100644 --- a/ld/testsuite/ld-mmix/greg-5.d +++ b/ld/testsuite/ld-mmix/greg-5.d @@ -2,7 +2,7 @@ #source: gregpsj1.s #source: start.s #source: a.s -#as: -x +#as: -x --no-pushj-stubs #ld: -m elf64mmix #objdump: -dt diff --git a/ld/testsuite/ld-mmix/greg-5s.d b/ld/testsuite/ld-mmix/greg-5s.d new file mode 100644 index 0000000..e128af8 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-5s.d @@ -0,0 +1,31 @@ +#source: greg-1.s +#source: gregpsj1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# Like greg-3, but a different expanding insn. + +.*: file format elf64-mmix +SYMBOL TABLE: +0+ l d .text 0+ +2000000000000000 l d .data 0+ +2000000000000000 l d .sbss 0+ +2000000000000000 l d .bss 0+ +0+7f0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+4 g \.text 0+ _start +0+fe g \*REG\* 0+ areg +#... +0+8 g \.text 0+ a +Disassembly of section \.text: +0+ <_start-0x4>: + 0: f2fe0002 pushj \$254,8 <a> +0+4 <_start>: + 4: e3fd0001 setl \$253,0x1 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja1b-s.d b/ld/testsuite/ld-mmix/pushja1b-s.d new file mode 100644 index 0000000..ac55651 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja1b-s.d @@ -0,0 +1,19 @@ +#source: start.s +#source: a.s +#source: pushja.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +# Like pushja1b but with PUSHJ stub. + +.*: file format elf64-mmix +Disassembly of section \.text: +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 +0+8 <pushja>: + 8: e3fd0002 setl \$253,0x2 + c: f30cfffe pushj \$12,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja1b.d b/ld/testsuite/ld-mmix/pushja1b.d index 80d1da7..b61162f 100644 --- a/ld/testsuite/ld-mmix/pushja1b.d +++ b/ld/testsuite/ld-mmix/pushja1b.d @@ -1,7 +1,7 @@ #source: start.s #source: a.s #source: pushja.s -#as: -x +#as: -x --no-pushj-stubs #ld: -m elf64mmix #objdump: -dr diff --git a/ld/testsuite/ld-mmix/pushja1f-s.d b/ld/testsuite/ld-mmix/pushja1f-s.d new file mode 100644 index 0000000..801ff22 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja1f-s.d @@ -0,0 +1,19 @@ +#source: start.s +#source: pushja.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +# Like pushja1f, but with PUSHJ stub. + +.*: file format elf64-mmix +Disassembly of section \.text: +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <a> + c: e3fd0003 setl \$253,0x3 +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja1f.d b/ld/testsuite/ld-mmix/pushja1f.d index 57879d8..5f27400 100644 --- a/ld/testsuite/ld-mmix/pushja1f.d +++ b/ld/testsuite/ld-mmix/pushja1f.d @@ -1,7 +1,7 @@ #source: start.s #source: pushja.s #source: a.s -#as: -x +#as: -x --no-pushj-stubs #ld: -m elf64mmix #objdump: -dr diff --git a/ld/testsuite/ld-mmix/pushja7b-s.d b/ld/testsuite/ld-mmix/pushja7b-s.d new file mode 100644 index 0000000..7835eda --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja7b-s.d @@ -0,0 +1,19 @@ +#source: start.s +#source: a.s +#source: pushja.s +#as: -x +#ld: -m mmo +#objdump: -dr + +# Like pushja7b, but with PUSHJ stub. + +.*: file format mmo +Disassembly of section \.text: +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 +0+8 <pushja>: + 8: e3fd0002 setl \$253,0x2 + c: f30cfffe pushj \$12,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja7b.d b/ld/testsuite/ld-mmix/pushja7b.d index 03c9ea9..5da05e3 100644 --- a/ld/testsuite/ld-mmix/pushja7b.d +++ b/ld/testsuite/ld-mmix/pushja7b.d @@ -1,7 +1,7 @@ #source: start.s #source: a.s #source: pushja.s -#as: -x +#as: -x --no-pushj-stubs #ld: -m mmo #objdump: -dr diff --git a/ld/testsuite/ld-mmix/pushja7f-s.d b/ld/testsuite/ld-mmix/pushja7f-s.d new file mode 100644 index 0000000..487d54a --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja7f-s.d @@ -0,0 +1,19 @@ +#source: start.s +#source: pushja.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +# Like pushja7f, but with PUSHJ stub. + +.*: file format mmo +Disassembly of section \.text: +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <a> + c: e3fd0003 setl \$253,0x3 +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja7f.d b/ld/testsuite/ld-mmix/pushja7f.d index e4b2c68..83721c7 100644 --- a/ld/testsuite/ld-mmix/pushja7f.d +++ b/ld/testsuite/ld-mmix/pushja7f.d @@ -1,7 +1,7 @@ #source: start.s #source: pushja.s #source: a.s -#as: -x +#as: -x --no-pushj-stubs #ld: -m mmo #objdump: -dr diff --git a/ld/testsuite/ld-mmix/pushjs1.d b/ld/testsuite/ld-mmix/pushjs1.d new file mode 100644 index 0000000..66892e0 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs1.d @@ -0,0 +1,27 @@ +#source: start4.s +#source: pushja.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just within the offset range gets no +# stub expansion, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20cffff pushj \$12,40004 <a> + c: e3fd0003 setl \$253,0x3 + \.\.\. +0+40004 <a>: + 40004: e3fd0004 setl \$253,0x4 +0+40008 <_start>: + 40008: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs1b.d b/ld/testsuite/ld-mmix/pushjs1b.d new file mode 100644 index 0000000..f9a2491 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs1b.d @@ -0,0 +1,31 @@ +#source: start4.s +#source: nop123.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pushja.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just within the offset range gets no +# stub expansion, backwards, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <a-0x4>: + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40004 <pushja>: + 40004: e3fd0002 setl \$253,0x2 + 40008: f30c0000 pushj \$12,8 <a> + 4000c: e3fd0003 setl \$253,0x3 +0+40010 <_start>: + 40010: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs1bm.d b/ld/testsuite/ld-mmix/pushjs1bm.d new file mode 100644 index 0000000..d70da89 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs1bm.d @@ -0,0 +1,29 @@ +#source: nop123.s +#source: nop123.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pushja.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just within the offset range gets no +# stub expansion, backwards, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <a-0x8>: + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40004 <pushja>: + 40004: e3fd0002 setl \$253,0x2 + 40008: f30c0000 pushj \$12,8 <a> + 4000c: e3fd0003 setl \$253,0x3 +0+40010 <Main>: + 40010: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs1m.d b/ld/testsuite/ld-mmix/pushjs1m.d new file mode 100644 index 0000000..0df80a2 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs1m.d @@ -0,0 +1,26 @@ +#source: nop123.s +#source: pushja.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just within the offset range gets no +# stub expansion, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20cffff pushj \$12,40004 <a> + c: e3fd0003 setl \$253,0x3 + \.\.\. +0+40004 <a>: + 40004: e3fd0004 setl \$253,0x4 +0+40008 <Main>: + 40008: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs1r.d b/ld/testsuite/ld-mmix/pushjs1r.d new file mode 100644 index 0000000..3083274 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs1r.d @@ -0,0 +1,22 @@ +#source: nop123.s +#source: pushja.s +#source: pad2p18m32.s +#source: pad16.s +#source: nop123.s +#ld: -r -m elf64mmix +#objdump: -dr + +# When linking relocatable, check that PUSHJ with a distance to the end of +# the section just within the offset range gets no stub expansion. + +.*: file format elf64-mmix +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0000 pushj \$12,8 <pushja\+0x4> + 8: R_MMIX_PUSHJ_STUBBABLE a + c: e3fd0003 setl \$253,0x3 + \.\.\. + 40000: fd010203 swym 1,2,3 diff --git a/ld/testsuite/ld-mmix/pushjs2.d b/ld/testsuite/ld-mmix/pushjs2.d new file mode 100644 index 0000000..c6b5829 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs2.d @@ -0,0 +1,29 @@ +#source: start4.s +#source: pushja.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just outside the PUSHJ offset range gets +# a JMP stub expansion, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f000ffff jmp 4000c <a> + \.\.\. +0+4000c <a>: + 4000c: e3fd0004 setl \$253,0x4 +0+40010 <_start>: + 40010: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs2b.d b/ld/testsuite/ld-mmix/pushjs2b.d new file mode 100644 index 0000000..a6f2299 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs2b.d @@ -0,0 +1,33 @@ +#source: start4.s +#source: nop123.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: pushja.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just outside the offset range gets a JMP +# stub expansion, backwards, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <a-0x4>: + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40008 <pushja>: + 40008: e3fd0002 setl \$253,0x2 + 4000c: f20c0002 pushj \$12,40014 <pushja\+0xc> + 40010: e3fd0003 setl \$253,0x3 + 40014: f1fefffd jmp 8 <a> +0+40018 <_start>: + 40018: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs2bm.d b/ld/testsuite/ld-mmix/pushjs2bm.d new file mode 100644 index 0000000..1f37c66 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs2bm.d @@ -0,0 +1,31 @@ +#source: nop123.s +#source: nop123.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: pushja.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just outside the offset range gets a JMP +# stub expansion, backwards, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <a-0x8>: + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40008 <pushja>: + 40008: e3fd0002 setl \$253,0x2 + 4000c: f20c0002 pushj \$12,40014 <pushja\+0xc> + 40010: e3fd0003 setl \$253,0x3 + 40014: f1fefffd jmp 8 <a> +0+40018 <Main>: + 40018: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs2m.d b/ld/testsuite/ld-mmix/pushjs2m.d new file mode 100644 index 0000000..8c7af13 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs2m.d @@ -0,0 +1,28 @@ +#source: nop123.s +#source: pushja.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just outside the PUSHJ offset range gets +# a JMP stub expansion, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f000ffff jmp 4000c <a> + \.\.\. +0+4000c <a>: + 4000c: e3fd0004 setl \$253,0x4 +0+40010 <Main>: + 40010: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs2r.d b/ld/testsuite/ld-mmix/pushjs2r.d new file mode 100644 index 0000000..df181e0 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs2r.d @@ -0,0 +1,27 @@ +#source: nop123.s +#source: pushja.s +#source: ext1l.s +#source: pad2p18m32.s +#source: pad16.s +#source: nop123.s +#ld: -r -m elf64mmix +#objdump: -dr + +# When linking relocatably, check that PUSHJ with a distance to the end of +# the section just outside the offset range gets expanded. + +.*: file format elf64-mmix +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f0000000 jmp 10 <pushja\+0xc> + 10: R_MMIX_JMP a + \.\.\. +0+24 <ext1>: + 24: fd040810 swym 4,8,16 + \.\.\. + 40018: fd010203 swym 1,2,3 diff --git a/ld/testsuite/ld-mmix/pushjs3.d b/ld/testsuite/ld-mmix/pushjs3.d new file mode 100644 index 0000000..75afe1b --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs3.d @@ -0,0 +1,29 @@ +#source: start4.s +#source: pushja.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just within reach of JMP gets it, ELF +# version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f0ffffff jmp 400000c <a> + \.\.\. +0+400000c <a>: + 400000c: e3fd0004 setl \$253,0x4 +0+4000010 <_start>: + 4000010: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs3b.d b/ld/testsuite/ld-mmix/pushjs3b.d new file mode 100644 index 0000000..33812bb --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs3b.d @@ -0,0 +1,30 @@ +#source: start4.s +#source: nop123.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pushja.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just inside the offset range of a JMP +# stub expansion works, backwards, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <a-0x4>: + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+3fffffc <pushja>: + 3fffffc: e3fd0002 setl \$253,0x2 + 4000000: f20c0002 pushj \$12,4000008 <pushja\+0xc> + 4000004: e3fd0003 setl \$253,0x3 + 4000008: f1000000 jmp 8 <a> +0+400000c <_start>: + 400000c: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs3bm.d b/ld/testsuite/ld-mmix/pushjs3bm.d new file mode 100644 index 0000000..f485d14 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs3bm.d @@ -0,0 +1,28 @@ +#source: nop123.s +#source: nop123.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pushja.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just inside the offset range of a JMP +# stub expansion works, backwards, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <a-0x8>: + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+3fffffc <pushja>: + 3fffffc: e3fd0002 setl \$253,0x2 + 4000000: f20c0002 pushj \$12,4000008 <pushja\+0xc> + 4000004: e3fd0003 setl \$253,0x3 + 4000008: f1000000 jmp 8 <a> +0+400000c <Main>: + 400000c: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs3m.d b/ld/testsuite/ld-mmix/pushjs3m.d new file mode 100644 index 0000000..35df726 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs3m.d @@ -0,0 +1,28 @@ +#source: nop123.s +#source: pushja.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just within reach of JMP gets it, mmo +# version. + +.*: file format mmo +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f0ffffff jmp 400000c <a> + \.\.\. +0+400000c <a>: + 400000c: e3fd0004 setl \$253,0x4 +0+4000010 <Main>: + 4000010: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs3r.d b/ld/testsuite/ld-mmix/pushjs3r.d new file mode 100644 index 0000000..537b3f9 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs3r.d @@ -0,0 +1,32 @@ +#source: nop123.s +#source: pushja.s +#source: undef-2.s +#source: nop123.s +#source: pad16.s +#source: pad2p18m32.s +#ld: -r -m elf64mmix +#objdump: -dr + +# When linking relocatably, check two expanded stubbable PUSHJs. + +# With better relaxation support for relocatable links, both should be +# able to pass through unexpanded. Right now, we just check that they can +# coexist peacefully. + +.*: file format elf64-mmix +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f0000000 jmp 10 <pushja\+0xc> + 10: R_MMIX_JMP a + \.\.\. + 24: f2050001 pushj \$5,28 <pushja\+0x24> + 28: f0000000 jmp 28 <pushja\+0x24> + 28: R_MMIX_JMP undefd + \.\.\. + 3c: fd010203 swym 1,2,3 + \.\.\. diff --git a/ld/testsuite/ld-mmix/pushjs4.d b/ld/testsuite/ld-mmix/pushjs4.d new file mode 100644 index 0000000..e010449 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs4.d @@ -0,0 +1,34 @@ +#source: start4.s +#source: pushja.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just outside reach of JMP works; it will +# get the full expansion, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: e3ff0020 setl \$255,0x20 + 14: e6ff0400 incml \$255,0x400 + 18: e5ff0000 incmh \$255,0x0 + 1c: e4ff0000 inch \$255,0x0 + 20: 9f00ff00 go \$0,\$255,0 + \.\.\. +0+4000020 <a>: + 4000020: e3fd0004 setl \$253,0x4 +0+4000024 <_start>: + 4000024: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs4b.d b/ld/testsuite/ld-mmix/pushjs4b.d new file mode 100644 index 0000000..cef68d7 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs4b.d @@ -0,0 +1,35 @@ +#source: start4.s +#source: nop123.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pushja.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dr + +# Check that PUSHJ with an offset just outside the offset range of a JMP +# stub expansion works, backwards, ELF version. + +.*: file format elf64-mmix +Disassembly of section \.init: +0+ <_start>: + 0: e37704a6 setl \$119,0x4a6 +Disassembly of section \.text: +0+4 <a-0x4>: + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+4000000 <pushja>: + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f20c0002 pushj \$12,400000c <pushja\+0xc> + 4000008: e3fd0003 setl \$253,0x3 + 400000c: e3ff0008 setl \$255,0x8 + 4000010: e6ff0000 incml \$255,0x0 + 4000014: e5ff0000 incmh \$255,0x0 + 4000018: e4ff0000 inch \$255,0x0 + 400001c: 9f00ff00 go \$0,\$255,0 +0+4000020 <_start>: + 4000020: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs4bm.d b/ld/testsuite/ld-mmix/pushjs4bm.d new file mode 100644 index 0000000..53b74f1 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs4bm.d @@ -0,0 +1,33 @@ +#source: nop123.s +#source: nop123.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pushja.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just outside the offset range of a JMP +# stub expansion works, backwards, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <a-0x8>: + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 <a>: + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+4000000 <pushja>: + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f20c0002 pushj \$12,400000c <pushja\+0xc> + 4000008: e3fd0003 setl \$253,0x3 + 400000c: e3ff0008 setl \$255,0x8 + 4000010: e6ff0000 incml \$255,0x0 + 4000014: e5ff0000 incmh \$255,0x0 + 4000018: e4ff0000 inch \$255,0x0 + 400001c: 9f00ff00 go \$0,\$255,0 +0+4000020 <Main>: + 4000020: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs4m.d b/ld/testsuite/ld-mmix/pushjs4m.d new file mode 100644 index 0000000..153e96c --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs4m.d @@ -0,0 +1,33 @@ +#source: nop123.s +#source: pushja.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: a.s +#source: start.s +#ld: -m mmo +#objdump: -dr + +# Check that PUSHJ with an offset just outside reach of JMP works; it will +# get the full expansion, mmo version. + +.*: file format mmo +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: e3ff0020 setl \$255,0x20 + 14: e6ff0400 incml \$255,0x400 + 18: e5ff0000 incmh \$255,0x0 + 1c: e4ff0000 inch \$255,0x0 + 20: 9f00ff00 go \$0,\$255,0 + \.\.\. +0+4000020 <a>: + 4000020: e3fd0004 setl \$253,0x4 +0+4000024 <Main>: + 4000024: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/pushjs4r.d b/ld/testsuite/ld-mmix/pushjs4r.d new file mode 100644 index 0000000..e734dc6 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushjs4r.d @@ -0,0 +1,29 @@ +#source: nop123.s +#source: pushja.s +#source: undef-2.s +#source: pad2p18m32.s +#source: nop123.s +#ld: -r -m elf64mmix +#objdump: -dr + +# When linking relocatably, check two stubbable PUSHJ:s, one expanded. + +# With better relaxation support for relocatable links, both should be +# able to pass through unexpanded. Right now, we just check that they can +# coexist peacefully. + +.*: file format elf64-mmix +Disassembly of section \.text: +0+ <pushja-0x4>: + 0: fd010203 swym 1,2,3 +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <pushja\+0xc> + c: e3fd0003 setl \$253,0x3 + 10: f0000000 jmp 10 <pushja\+0xc> + 10: R_MMIX_JMP a + \.\.\. + 24: f2050000 pushj \$5,24 <pushja\+0x20> + 24: R_MMIX_PUSHJ_STUBBABLE undefd + \.\.\. + 40008: fd010203 swym 1,2,3 |