From 89b7466f7671017df5609bcbfcf2e6d836517535 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sat, 18 Oct 2003 16:05:02 +0000 Subject: * 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 (limited to 'ld') 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 + + * 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 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 +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 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 +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 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 : + 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 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 : + 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 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 : + 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 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 : + 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 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 : + 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 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 : + 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 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+ : + 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 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+ : + 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 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+ : + 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 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 : + 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 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 : + 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 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+ : + 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 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+ : + 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 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+ : + 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 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 : + 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 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 : + 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 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+ : + 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 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+ : + 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 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+ : + 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 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 : + 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 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 : + 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 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+ : + 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 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+ : + 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 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+ : + 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 -- cgit v1.1