diff options
author | Jan Beulich <jbeulich@suse.com> | 2020-07-15 08:53:55 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2020-07-15 08:53:55 +0200 |
commit | 36938cabf0efcb053d1585e8580a4b3db438ca4e (patch) | |
tree | e7193f8c5b4f0cc83b6a76a4d5a35f0b86058abd /ld/testsuite/ld-ifunc | |
parent | a8a48c756c0da3a49008662e14ae582764ddd0bb (diff) | |
download | fsf-binutils-gdb-36938cabf0efcb053d1585e8580a4b3db438ca4e.zip fsf-binutils-gdb-36938cabf0efcb053d1585e8580a4b3db438ca4e.tar.gz fsf-binutils-gdb-36938cabf0efcb053d1585e8580a4b3db438ca4e.tar.bz2 |
x86: avoid attaching suffixes to unambiguous insns
"Unambiguous" is is in particular taking as reference the assembler,
which also accepts certain insns - despite them allowing for varying
operand size, and hence in principle being ambiguous - without any
suffix. For example, from the very beginning of the life of x86-64 I had
trouble understanding why a plain and simple RET had to be printed as
RETQ. In case someone really used the 16-bit form, RETW disambiguates
the two quite fine.
Diffstat (limited to 'ld/testsuite/ld-ifunc')
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-i386-now.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-21-x86-64.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-22-x86-64.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/pr17154-i386-now.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/pr17154-i386.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/pr17154-x86-64-now.d | 36 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/pr17154-x86-64.d | 36 |
10 files changed, 64 insertions, 64 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d index 622def0..2c917fa 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+f0 <.plt>: - +[a-f0-9]+: ff b3 04 00 00 00 pushl 0x4\(%ebx\) + +[a-f0-9]+: ff b3 04 00 00 00 push 0x4\(%ebx\) +[a-f0-9]+: ff a3 08 00 00 00 jmp \*0x8\(%ebx\) +[a-f0-9]+: 00 00 add %al,\(%eax\) ... diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d index 87ae682..01f6a78 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+e0 <.plt>: - +[a-f0-9]+: ff b3 04 00 00 00 pushl 0x4\(%ebx\) + +[a-f0-9]+: ff b3 04 00 00 00 push 0x4\(%ebx\) +[a-f0-9]+: ff a3 08 00 00 00 jmp \*0x8\(%ebx\) +[a-f0-9]+: 00 00 add %al,\(%eax\) ... diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d index 75aa37f3..375cecd 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d @@ -10,22 +10,22 @@ Disassembly of section .plt: 0+170 <.plt>: - +[a-f0-9]+: ff 35 42 01 20 00 pushq 0x200142\(%rip\) # 2002b8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 44 01 20 00 jmpq \*0x200144\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 42 01 20 00 push 0x200142\(%rip\) # 2002b8 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 44 01 20 00 jmp \*0x200144\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) 0+180 <\*ABS\*\+0x190@plt>: - +[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x18> - +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 - +[a-f0-9]+: e9 e0 ff ff ff jmpq 170 <.plt> + +[a-f0-9]+: ff 25 42 01 20 00 jmp \*0x200142\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x18> + +[a-f0-9]+: 68 00 00 00 00 push \$0x0 + +[a-f0-9]+: e9 e0 ff ff ff jmp 170 <.plt> Disassembly of section .text: 0+190 <foo>: - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * 0+191 <bar>: - +[a-f0-9]+: e8 ea ff ff ff callq 180 <\*ABS\*\+0x190@plt> + +[a-f0-9]+: e8 ea ff ff ff call 180 <\*ABS\*\+0x190@plt> +[a-f0-9]+: 48 8d 05 e3 ff ff ff lea -0x1d\(%rip\),%rax # 180 <\*ABS\*\+0x190@plt> - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d b/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d index 591825d..9cd3518 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d @@ -10,22 +10,22 @@ Disassembly of section .plt: 0+170 <.plt>: - +[a-f0-9]+: ff 35 42 01 20 00 pushq 0x200142\(%rip\) # 2002b8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 44 01 20 00 jmpq \*0x200144\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 42 01 20 00 push 0x200142\(%rip\) # 2002b8 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 44 01 20 00 jmp \*0x200144\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) 0+180 <\*ABS\*\+0x190@plt>: - +[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x18> - +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 - +[a-f0-9]+: e9 e0 ff ff ff jmpq 170 <.plt> + +[a-f0-9]+: ff 25 42 01 20 00 jmp \*0x200142\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x18> + +[a-f0-9]+: 68 00 00 00 00 push \$0x0 + +[a-f0-9]+: e9 e0 ff ff ff jmp 170 <.plt> Disassembly of section .text: 0+190 <foo>: - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * 0+191 <bar>: - +[a-f0-9]+: e8 ea ff ff ff callq 180 <\*ABS\*\+0x190@plt> + +[a-f0-9]+: e8 ea ff ff ff call 180 <\*ABS\*\+0x190@plt> +[a-f0-9]+: 48 8d 05 e3 ff ff ff lea -0x1d\(%rip\),%rax # 180 <\*ABS\*\+0x190@plt> - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d index dbddc55..de12e9f 100644 --- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d +++ b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d @@ -9,16 +9,16 @@ Disassembly of section .text: 0+4000c8 <__start>: - +[a-f0-9]+: ff 15 2a 00 20 00 callq \*0x20002a\(%rip\) # 6000f8 <.got> - +[a-f0-9]+: ff 25 24 00 20 00 jmpq \*0x200024\(%rip\) # 6000f8 <.got> + +[a-f0-9]+: ff 15 2a 00 20 00 call \*0x20002a\(%rip\) # 6000f8 <.got> + +[a-f0-9]+: ff 25 24 00 20 00 jmp \*0x200024\(%rip\) # 6000f8 <.got> +[a-f0-9]+: 48 03 05 1d 00 20 00 add 0x20001d\(%rip\),%rax # 6000f8 <.got> +[a-f0-9]+: 48 8b 05 16 00 20 00 mov 0x200016\(%rip\),%rax # 6000f8 <.got> +[a-f0-9]+: 48 85 05 0f 00 20 00 test %rax,0x20000f\(%rip\) # 6000f8 <.got> +[a-f0-9]+: 48 c7 c0 f1 00 40 00 mov \$0x4000f1,%rax 0+4000f0 <foo>: - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * 0+4000f1 <bar>: - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d index dbddc55..de12e9f 100644 --- a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d +++ b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d @@ -9,16 +9,16 @@ Disassembly of section .text: 0+4000c8 <__start>: - +[a-f0-9]+: ff 15 2a 00 20 00 callq \*0x20002a\(%rip\) # 6000f8 <.got> - +[a-f0-9]+: ff 25 24 00 20 00 jmpq \*0x200024\(%rip\) # 6000f8 <.got> + +[a-f0-9]+: ff 15 2a 00 20 00 call \*0x20002a\(%rip\) # 6000f8 <.got> + +[a-f0-9]+: ff 25 24 00 20 00 jmp \*0x200024\(%rip\) # 6000f8 <.got> +[a-f0-9]+: 48 03 05 1d 00 20 00 add 0x20001d\(%rip\),%rax # 6000f8 <.got> +[a-f0-9]+: 48 8b 05 16 00 20 00 mov 0x200016\(%rip\),%rax # 6000f8 <.got> +[a-f0-9]+: 48 85 05 0f 00 20 00 test %rax,0x20000f\(%rip\) # 6000f8 <.got> +[a-f0-9]+: 48 c7 c0 f1 00 40 00 mov \$0x4000f1,%rax 0+4000f0 <foo>: - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * 0+4000f1 <bar>: - +[a-f0-9]+: c3 retq + +[a-f0-9]+: c3 ret * #pass diff --git a/ld/testsuite/ld-ifunc/pr17154-i386-now.d b/ld/testsuite/ld-ifunc/pr17154-i386-now.d index c6667b7..082d067 100644 --- a/ld/testsuite/ld-ifunc/pr17154-i386-now.d +++ b/ld/testsuite/ld-ifunc/pr17154-i386-now.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+180 <.plt>: - +[a-f0-9]+: ff b3 04 00 00 00 pushl 0x4\(%ebx\) + +[a-f0-9]+: ff b3 04 00 00 00 push 0x4\(%ebx\) +[a-f0-9]+: ff a3 08 00 00 00 jmp \*0x8\(%ebx\) +[a-f0-9]+: 00 00 add %al,\(%eax\) ... diff --git a/ld/testsuite/ld-ifunc/pr17154-i386.d b/ld/testsuite/ld-ifunc/pr17154-i386.d index b2c8cf2..68123bf 100644 --- a/ld/testsuite/ld-ifunc/pr17154-i386.d +++ b/ld/testsuite/ld-ifunc/pr17154-i386.d @@ -7,7 +7,7 @@ #... 0+180 <.*>: -[ ]*[a-f0-9]+: ff b3 04 00 00 00 pushl 0x4\(%ebx\) +[ ]*[a-f0-9]+: ff b3 04 00 00 00 push 0x4\(%ebx\) [ ]*[a-f0-9]+: ff a3 08 00 00 00 jmp \*0x8\(%ebx\) [ ]*[a-f0-9]+: 00 00 add %al,\(%eax\) ... diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d b/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d index 6905148..928a6a7 100644 --- a/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d @@ -10,41 +10,41 @@ Disassembly of section .plt: 0+240 <.plt>: - +[a-f0-9]+: ff 35 7a 01 20 00 pushq 0x20017a\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 7c 01 20 00 jmpq \*0x20017c\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 7a 01 20 00 push 0x20017a\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 7c 01 20 00 jmp \*0x20017c\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) 0+250 <\*ABS\*\+0x29a@plt>: - +[a-f0-9]+: ff 25 7a 01 20 00 jmpq \*0x20017a\(%rip\) # 2003d0 <_GLOBAL_OFFSET_TABLE_\+0x18> - +[a-f0-9]+: 68 03 00 00 00 pushq \$0x3 - +[a-f0-9]+: e9 e0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 7a 01 20 00 jmp \*0x20017a\(%rip\) # 2003d0 <_GLOBAL_OFFSET_TABLE_\+0x18> + +[a-f0-9]+: 68 03 00 00 00 push \$0x3 + +[a-f0-9]+: e9 e0 ff ff ff jmp 240 <.plt> 0+260 <func1@plt>: - +[a-f0-9]+: ff 25 72 01 20 00 jmpq \*0x200172\(%rip\) # 2003d8 <func1> - +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 - +[a-f0-9]+: e9 d0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 72 01 20 00 jmp \*0x200172\(%rip\) # 2003d8 <func1> + +[a-f0-9]+: 68 00 00 00 00 push \$0x0 + +[a-f0-9]+: e9 d0 ff ff ff jmp 240 <.plt> 0+270 <func2@plt>: - +[a-f0-9]+: ff 25 6a 01 20 00 jmpq \*0x20016a\(%rip\) # 2003e0 <func2> - +[a-f0-9]+: 68 01 00 00 00 pushq \$0x1 - +[a-f0-9]+: e9 c0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 6a 01 20 00 jmp \*0x20016a\(%rip\) # 2003e0 <func2> + +[a-f0-9]+: 68 01 00 00 00 push \$0x1 + +[a-f0-9]+: e9 c0 ff ff ff jmp 240 <.plt> 0+280 <\*ABS\*\+0x290@plt>: - +[a-f0-9]+: ff 25 62 01 20 00 jmpq \*0x200162\(%rip\) # 2003e8 <_GLOBAL_OFFSET_TABLE_\+0x30> - +[a-f0-9]+: 68 02 00 00 00 pushq \$0x2 - +[a-f0-9]+: e9 b0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 62 01 20 00 jmp \*0x200162\(%rip\) # 2003e8 <_GLOBAL_OFFSET_TABLE_\+0x30> + +[a-f0-9]+: 68 02 00 00 00 push \$0x2 + +[a-f0-9]+: e9 b0 ff ff ff jmp 240 <.plt> Disassembly of section .text: 0+290 <resolve1>: - +[a-f0-9]+: e8 cb ff ff ff callq 260 <func1@plt> + +[a-f0-9]+: e8 cb ff ff ff call 260 <func1@plt> 0+295 <g1>: - +[a-f0-9]+: e9 e6 ff ff ff jmpq 280 <\*ABS\*\+0x290@plt> + +[a-f0-9]+: e9 e6 ff ff ff jmp 280 <\*ABS\*\+0x290@plt> 0+29a <resolve2>: - +[a-f0-9]+: e8 d1 ff ff ff callq 270 <func2@plt> + +[a-f0-9]+: e8 d1 ff ff ff call 270 <func2@plt> 0+29f <g2>: - +[a-f0-9]+: e9 ac ff ff ff jmpq 250 <\*ABS\*\+0x29a@plt> + +[a-f0-9]+: e9 ac ff ff ff jmp 250 <\*ABS\*\+0x29a@plt> #pass diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64.d b/ld/testsuite/ld-ifunc/pr17154-x86-64.d index bd8f739..8a6861d 100644 --- a/ld/testsuite/ld-ifunc/pr17154-x86-64.d +++ b/ld/testsuite/ld-ifunc/pr17154-x86-64.d @@ -6,41 +6,41 @@ #... 0+240 <.*>: - +[a-f0-9]+: ff 35 5a 01 20 00 pushq 0x20015a\(%rip\) # 2003a0 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 5c 01 20 00 jmpq \*0x20015c\(%rip\) # 2003a8 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 5a 01 20 00 push 0x20015a\(%rip\) # 2003a0 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 5c 01 20 00 jmp \*0x20015c\(%rip\) # 2003a8 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) 0+250 <\*ABS\*\+0x29a@plt>: - +[a-f0-9]+: ff 25 5a 01 20 00 jmpq \*0x20015a\(%rip\) # 2003b0 <_GLOBAL_OFFSET_TABLE_\+0x18> - +[a-f0-9]+: 68 03 00 00 00 pushq \$0x3 - +[a-f0-9]+: e9 e0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 5a 01 20 00 jmp \*0x20015a\(%rip\) # 2003b0 <_GLOBAL_OFFSET_TABLE_\+0x18> + +[a-f0-9]+: 68 03 00 00 00 push \$0x3 + +[a-f0-9]+: e9 e0 ff ff ff jmp 240 <.plt> 0+260 <func1@plt>: - +[a-f0-9]+: ff 25 52 01 20 00 jmpq \*0x200152\(%rip\) # 2003b8 <func1> - +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 - +[a-f0-9]+: e9 d0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 52 01 20 00 jmp \*0x200152\(%rip\) # 2003b8 <func1> + +[a-f0-9]+: 68 00 00 00 00 push \$0x0 + +[a-f0-9]+: e9 d0 ff ff ff jmp 240 <.plt> 0+270 <func2@plt>: - +[a-f0-9]+: ff 25 4a 01 20 00 jmpq \*0x20014a\(%rip\) # 2003c0 <func2> - +[a-f0-9]+: 68 01 00 00 00 pushq \$0x1 - +[a-f0-9]+: e9 c0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 4a 01 20 00 jmp \*0x20014a\(%rip\) # 2003c0 <func2> + +[a-f0-9]+: 68 01 00 00 00 push \$0x1 + +[a-f0-9]+: e9 c0 ff ff ff jmp 240 <.plt> 0+280 <\*ABS\*\+0x290@plt>: - +[a-f0-9]+: ff 25 42 01 20 00 jmpq \*0x200142\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x30> - +[a-f0-9]+: 68 02 00 00 00 pushq \$0x2 - +[a-f0-9]+: e9 b0 ff ff ff jmpq 240 <.plt> + +[a-f0-9]+: ff 25 42 01 20 00 jmp \*0x200142\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x30> + +[a-f0-9]+: 68 02 00 00 00 push \$0x2 + +[a-f0-9]+: e9 b0 ff ff ff jmp 240 <.plt> Disassembly of section .text: 0+290 <resolve1>: - +[a-f0-9]+: e8 cb ff ff ff callq 260 <func1@plt> + +[a-f0-9]+: e8 cb ff ff ff call 260 <func1@plt> 0+295 <g1>: - +[a-f0-9]+: e9 e6 ff ff ff jmpq 280 <\*ABS\*\+0x290@plt> + +[a-f0-9]+: e9 e6 ff ff ff jmp 280 <\*ABS\*\+0x290@plt> 0+29a <resolve2>: - +[a-f0-9]+: e8 d1 ff ff ff callq 270 <func2@plt> + +[a-f0-9]+: e8 d1 ff ff ff call 270 <func2@plt> 0+29f <g2>: - +[a-f0-9]+: e9 ac ff ff ff jmpq 250 <\*ABS\*\+0x29a@plt> + +[a-f0-9]+: e9 ac ff ff ff jmp 250 <\*ABS\*\+0x29a@plt> #pass |