From 89b7466f7671017df5609bcbfcf2e6d836517535 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sat, 18 Oct 2003 16:05:02 +0000 Subject: [PATCH] * 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. --- ld/testsuite/ChangeLog | 15 +++++++++++++ ld/testsuite/ld-mmix/greg-14.d | 2 +- ld/testsuite/ld-mmix/greg-14s.d | 23 ++++++++++++++++++++ ld/testsuite/ld-mmix/greg-5.d | 2 +- ld/testsuite/ld-mmix/greg-5s.d | 31 +++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushja1b-s.d | 19 +++++++++++++++++ ld/testsuite/ld-mmix/pushja1b.d | 2 +- ld/testsuite/ld-mmix/pushja1f-s.d | 19 +++++++++++++++++ ld/testsuite/ld-mmix/pushja1f.d | 2 +- ld/testsuite/ld-mmix/pushja7b-s.d | 19 +++++++++++++++++ ld/testsuite/ld-mmix/pushja7b.d | 2 +- ld/testsuite/ld-mmix/pushja7f-s.d | 19 +++++++++++++++++ ld/testsuite/ld-mmix/pushja7f.d | 2 +- ld/testsuite/ld-mmix/pushjs1.d | 27 ++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs1b.d | 31 +++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs1bm.d | 29 +++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs1m.d | 26 +++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs1r.d | 22 +++++++++++++++++++ ld/testsuite/ld-mmix/pushjs2.d | 29 +++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs2b.d | 33 +++++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs2bm.d | 31 +++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs2m.d | 28 +++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs2r.d | 27 ++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs3.d | 29 +++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs3b.d | 30 ++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs3bm.d | 28 +++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs3m.d | 28 +++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs3r.d | 32 ++++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs4.d | 34 ++++++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs4b.d | 35 +++++++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs4bm.d | 33 +++++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs4m.d | 33 +++++++++++++++++++++++++++++ ld/testsuite/ld-mmix/pushjs4r.d | 29 +++++++++++++++++++++++++ 33 files changed, 745 insertions(+), 6 deletions(-) create mode 100644 ld/testsuite/ld-mmix/greg-14s.d create mode 100644 ld/testsuite/ld-mmix/greg-5s.d create mode 100644 ld/testsuite/ld-mmix/pushja1b-s.d create mode 100644 ld/testsuite/ld-mmix/pushja1f-s.d create mode 100644 ld/testsuite/ld-mmix/pushja7b-s.d create mode 100644 ld/testsuite/ld-mmix/pushja7f-s.d create mode 100644 ld/testsuite/ld-mmix/pushjs1.d create mode 100644 ld/testsuite/ld-mmix/pushjs1b.d create mode 100644 ld/testsuite/ld-mmix/pushjs1bm.d create mode 100644 ld/testsuite/ld-mmix/pushjs1m.d create mode 100644 ld/testsuite/ld-mmix/pushjs1r.d create mode 100644 ld/testsuite/ld-mmix/pushjs2.d create mode 100644 ld/testsuite/ld-mmix/pushjs2b.d create mode 100644 ld/testsuite/ld-mmix/pushjs2bm.d create mode 100644 ld/testsuite/ld-mmix/pushjs2m.d create mode 100644 ld/testsuite/ld-mmix/pushjs2r.d create mode 100644 ld/testsuite/ld-mmix/pushjs3.d create mode 100644 ld/testsuite/ld-mmix/pushjs3b.d create mode 100644 ld/testsuite/ld-mmix/pushjs3bm.d create mode 100644 ld/testsuite/ld-mmix/pushjs3m.d create mode 100644 ld/testsuite/ld-mmix/pushjs3r.d create mode 100644 ld/testsuite/ld-mmix/pushjs4.d create mode 100644 ld/testsuite/ld-mmix/pushjs4b.d create mode 100644 ld/testsuite/ld-mmix/pushjs4bm.d create mode 100644 ld/testsuite/ld-mmix/pushjs4m.d create mode 100644 ld/testsuite/ld-mmix/pushjs4r.d diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 28c16055aac..f9b557d891a 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2003-10-18 Hans-Peter Nilsson + + * 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 * 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 cacfbd6c8f2..19cc4511605 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 00000000000..466661c67fc --- /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 +0+4 <(Main|_start)>: + 4: e3fd0001 setl \$253,0x1 +0+8 : + 8: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-5.d b/ld/testsuite/ld-mmix/greg-5.d index 1b67309f9dc..b392adfc8d0 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 00000000000..e128af84a56 --- /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 +0+4 <_start>: + 4: e3fd0001 setl \$253,0x1 +0+8 : + 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 00000000000..ac5565131c7 --- /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 : + 4: e3fd0004 setl \$253,0x4 +0+8 : + 8: e3fd0002 setl \$253,0x2 + c: f30cfffe pushj \$12,4 + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja1b.d b/ld/testsuite/ld-mmix/pushja1b.d index 80d1da7047d..b61162f8187 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 00000000000..801ff22c371 --- /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 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 +0+10 : + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja1f.d b/ld/testsuite/ld-mmix/pushja1f.d index 57879d82c38..5f27400c915 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 00000000000..7835eda9f58 --- /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 : + 4: e3fd0004 setl \$253,0x4 +0+8 : + 8: e3fd0002 setl \$253,0x2 + c: f30cfffe pushj \$12,4 + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja7b.d b/ld/testsuite/ld-mmix/pushja7b.d index 03c9ea93dda..5da05e3b543 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 00000000000..487d54aac52 --- /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 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 +0+10 : + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja7f.d b/ld/testsuite/ld-mmix/pushja7f.d index e4b2c68c79b..83721c748f2 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 00000000000..66892e027ad --- /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 : + 4: e3fd0002 setl \$253,0x2 + 8: f20cffff pushj \$12,40004 + c: e3fd0003 setl \$253,0x3 + \.\.\. +0+40004 : + 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 00000000000..f9a2491dca9 --- /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 : + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40004 : + 40004: e3fd0002 setl \$253,0x2 + 40008: f30c0000 pushj \$12,8 + 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 00000000000..d70da894e33 --- /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+ : + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40004 : + 40004: e3fd0002 setl \$253,0x2 + 40008: f30c0000 pushj \$12,8 + 4000c: e3fd0003 setl \$253,0x3 +0+40010
: + 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 00000000000..0df80a233c7 --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20cffff pushj \$12,40004 + c: e3fd0003 setl \$253,0x3 + \.\.\. +0+40004 : + 40004: e3fd0004 setl \$253,0x4 +0+40008
: + 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 00000000000..30832746640 --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0000 pushj \$12,8 + 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 00000000000..c6b58295560 --- /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 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f000ffff jmp 4000c + \.\.\. +0+4000c : + 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 00000000000..a6f22999cb7 --- /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 : + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40008 : + 40008: e3fd0002 setl \$253,0x2 + 4000c: f20c0002 pushj \$12,40014 + 40010: e3fd0003 setl \$253,0x3 + 40014: f1fefffd jmp 8 +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 00000000000..1f37c66bd4c --- /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+ : + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+40008 : + 40008: e3fd0002 setl \$253,0x2 + 4000c: f20c0002 pushj \$12,40014 + 40010: e3fd0003 setl \$253,0x3 + 40014: f1fefffd jmp 8 +0+40018
: + 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 00000000000..8c7af131383 --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f000ffff jmp 4000c + \.\.\. +0+4000c : + 4000c: e3fd0004 setl \$253,0x4 +0+40010
: + 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 00000000000..df181e0bd52 --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f0000000 jmp 10 + 10: R_MMIX_JMP a + \.\.\. +0+24 : + 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 00000000000..75afe1b6790 --- /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 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f0ffffff jmp 400000c + \.\.\. +0+400000c : + 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 00000000000..33812bbf034 --- /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 : + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+3fffffc : + 3fffffc: e3fd0002 setl \$253,0x2 + 4000000: f20c0002 pushj \$12,4000008 + 4000004: e3fd0003 setl \$253,0x3 + 4000008: f1000000 jmp 8 +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 00000000000..f485d14661d --- /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+ : + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+3fffffc : + 3fffffc: e3fd0002 setl \$253,0x2 + 4000000: f20c0002 pushj \$12,4000008 + 4000004: e3fd0003 setl \$253,0x3 + 4000008: f1000000 jmp 8 +0+400000c
: + 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 00000000000..35df726bd24 --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f0ffffff jmp 400000c + \.\.\. +0+400000c : + 400000c: e3fd0004 setl \$253,0x4 +0+4000010
: + 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 00000000000..537b3f9d563 --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f0000000 jmp 10 + 10: R_MMIX_JMP a + \.\.\. + 24: f2050001 pushj \$5,28 + 28: f0000000 jmp 28 + 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 00000000000..e010449011f --- /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 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + 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 : + 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 00000000000..cef68d7836a --- /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 : + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+4000000 : + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f20c0002 pushj \$12,400000c + 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 00000000000..53b74f1af0c --- /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+ : + 0: fd010203 swym 1,2,3 + 4: fd010203 swym 1,2,3 +0+8 : + 8: e3fd0004 setl \$253,0x4 + \.\.\. +0+4000000 : + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f20c0002 pushj \$12,400000c + 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
: + 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 00000000000..153e96cc0bc --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + 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 : + 4000020: e3fd0004 setl \$253,0x4 +0+4000024
: + 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 00000000000..e734dc67daa --- /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+ : + 0: fd010203 swym 1,2,3 +0+4 : + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 + c: e3fd0003 setl \$253,0x3 + 10: f0000000 jmp 10 + 10: R_MMIX_JMP a + \.\.\. + 24: f2050000 pushj \$5,24 + 24: R_MMIX_PUSHJ_STUBBABLE undefd + \.\.\. + 40008: fd010203 swym 1,2,3 -- 2.30.2