diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-05-26 13:11:11 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-05-27 14:12:33 +0100 |
commit | 202be274a41a912f705141d9fb3574f4b0d415e1 (patch) | |
tree | b916bd95dbcd7f04fd60a4c58712642740fc4ace /ld | |
parent | 601598589589734c21bacfc00cd4aed4f3fd1a1f (diff) | |
download | gdb-202be274a41a912f705141d9fb3574f4b0d415e1.zip gdb-202be274a41a912f705141d9fb3574f4b0d415e1.tar.gz gdb-202be274a41a912f705141d9fb3574f4b0d415e1.tar.bz2 |
opcodes/i386: remove trailing whitespace from insns with zero operands
While working on another patch[1] I had need to touch this code in
i386-dis.c:
ins->obufp = ins->mnemonicendp;
for (i = strlen (ins->obuf) + prefix_length; i < 6; i++)
oappend (ins, " ");
oappend (ins, " ");
(*ins->info->fprintf_styled_func)
(ins->info->stream, dis_style_mnemonic, "%s", ins->obuf);
What this code does is add whitespace after the instruction mnemonic
and before the instruction operands.
The problem I ran into when working on this code can be seen by
assembling this input file:
.text
nop
retq
Now, when I disassemble, here's the output. I've replaced trailing
whitespace with '_' so that the issue is clearer:
Disassembly of section .text:
0000000000000000 <.text>:
0: 90 nop
1: c3 retq___
Notice that there's no trailing whitespace after 'nop', but there are
three spaces after 'retq'!
What happens is that instruction mnemonics are emitted into a buffer
instr_info::obuf, then instr_info::mnemonicendp is setup to point to
the '\0' character at the end of the mnemonic.
When we emit the whitespace, this is then added starting at the
mnemonicendp position. Lets consider 'retq', first the buffer is
setup like this:
'r' 'e' 't' 'q' '\0'
Then we add whitespace characters at the '\0', converting the buffer
to this:
'r' 'e' 't' 'q' ' ' ' ' ' ' '\0'
However, 'nop' is actually an alias for 'xchg %rax,%rax', so,
initially, the buffer is setup like this:
'x' 'c' 'h' 'g' '\0'
Then in NOP_Fixup we spot that we have an instruction that is an alias
for 'nop', and adjust the buffer to this:
'n' 'o' 'p' '\0' '\0'
The second '\0' is left over from the original buffer contents.
However, when we rewrite the buffer, we don't afjust mnemonicendp,
which still points at the second '\0' character.
Now, when we insert whitespace we get:
'n' 'o' 'p' '\0' ' ' ' ' ' ' ' ' '\0'
Notice the whitespace is inserted after the first '\0', so, when we
print the buffer, the whitespace is not printed.
The fix for this is pretty easy, I can change NOP_Fixup to adjust
mnemonicendp, but now a bunch of tests start failing, we now produce
whitespace after the 'nop', which the tests don't expect.
So, I could update the tests to expect the whitespace....
...except I'm not a fan of trailing whitespace, so I'd really rather
not.
Turns out, I can pretty easily update the whitespace emitting code to
spot instructions that have zero operands and just not emit any
whitespace in this case. So this is what I've done.
I've left in the fix for NOP_Fixup, I think updating mnemonicendp is
probably a good thing, though this is not really required any more.
I've then updated all the tests that I saw failing to adjust the
expected patterns to account for the change in whitespace.
[1] https://sourceware.org/pipermail/binutils/2022-April/120610.html
Diffstat (limited to 'ld')
67 files changed, 164 insertions, 164 deletions
diff --git a/ld/testsuite/ld-i386/align-branch-1.d b/ld/testsuite/ld-i386/align-branch-1.d index 8c62ee4..762435a 100644 --- a/ld/testsuite/ld-i386/align-branch-1.d +++ b/ld/testsuite/ld-i386/align-branch-1.d @@ -20,5 +20,5 @@ Disassembly of section .text: +[a-f0-9]+: 3e 3e 3e 8b 90 fc ff ff ff ds ds mov %ds:-0x4\(%eax\),%edx +[a-f0-9]+: 85 d2 test %edx,%edx +[a-f0-9]+: 74 00 je +[a-f0-9]+ <_start\+0x24> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/code16.d b/ld/testsuite/ld-i386/code16.d index 8b67861..c44fb03 100644 --- a/ld/testsuite/ld-i386/code16.d +++ b/ld/testsuite/ld-i386/code16.d @@ -10,7 +10,7 @@ Disassembly of section .text.default_process_op.isra.0: 0+737c <default_process_op.isra.0>: - +[a-f0-9]+: 66 c3 retl + +[a-f0-9]+: 66 c3 retl Disassembly of section .text.mpt_scsi_process_op: diff --git a/ld/testsuite/ld-i386/ibt-plt-1.d b/ld/testsuite/ld-i386/ibt-plt-1.d index b0648ae..b5e1e6e 100644 --- a/ld/testsuite/ld-i386/ibt-plt-1.d +++ b/ld/testsuite/ld-i386/ibt-plt-1.d @@ -11,11 +11,11 @@ Disassembly of section .plt: +[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]+: 0f 1f 40 00 nopl 0x0\(%eax\) - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 08 00 00 00 push \$0x8 +[a-f0-9]+: e9 d2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -23,12 +23,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 0c 00 00 00 jmp \*0xc\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 10 00 00 00 jmp \*0x10\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) @@ -43,9 +43,9 @@ Disassembly of section .text: +[a-f0-9]+: e8 c7 ff ff ff call [a-f0-9]+ <bar1@plt> +[a-f0-9]+: 83 c4 08 add \$0x8,%esp +[a-f0-9]+: 5b pop %ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret [a-f0-9]+ <__x86.get_pc_thunk.bx>: +[a-f0-9]+: 8b 1c 24 mov \(%esp\),%ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/ibt-plt-2a.d b/ld/testsuite/ld-i386/ibt-plt-2a.d index 98b6fb9..8159857 100644 --- a/ld/testsuite/ld-i386/ibt-plt-2a.d +++ b/ld/testsuite/ld-i386/ibt-plt-2a.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[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]+: 0f 1f 40 00 nopl 0x0\(%eax\) - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 08 00 00 00 push \$0x8 +[a-f0-9]+: e9 d2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+170 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 0c 00 00 00 jmp \*0xc\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) 0+180 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 10 00 00 00 jmp \*0x10\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) @@ -44,9 +44,9 @@ Disassembly of section .text: +[a-f0-9]+: e8 c7 ff ff ff call 170 <bar1@plt> +[a-f0-9]+: 83 c4 08 add \$0x8,%esp +[a-f0-9]+: 5b pop %ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+1ae <__x86.get_pc_thunk.bx>: +[a-f0-9]+: 8b 1c 24 mov \(%esp\),%ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/ibt-plt-2c.d b/ld/testsuite/ld-i386/ibt-plt-2c.d index 445e08f..ed81809 100644 --- a/ld/testsuite/ld-i386/ibt-plt-2c.d +++ b/ld/testsuite/ld-i386/ibt-plt-2c.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[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]+: 0f 1f 40 00 nopl 0x0\(%eax\) - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 08 00 00 00 push \$0x8 +[a-f0-9]+: e9 d2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 0c 00 00 00 jmp \*0xc\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 10 00 00 00 jmp \*0x10\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) @@ -44,9 +44,9 @@ Disassembly of section .text: +[a-f0-9]+: e8 c7 ff ff ff call [a-f0-9]+ <bar1@plt> +[a-f0-9]+: 83 c4 08 add \$0x8,%esp +[a-f0-9]+: 5b pop %ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret [a-f0-9]+ <__x86.get_pc_thunk.bx>: +[a-f0-9]+: 8b 1c 24 mov \(%esp\),%ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/ibt-plt-3a.d b/ld/testsuite/ld-i386/ibt-plt-3a.d index 91f2023..9e6c8f5 100644 --- a/ld/testsuite/ld-i386/ibt-plt-3a.d +++ b/ld/testsuite/ld-i386/ibt-plt-3a.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[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]+: 0f 1f 40 00 nopl 0x0\(%eax\) - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 08 00 00 00 push \$0x8 +[a-f0-9]+: e9 d2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+170 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 0c 00 00 00 jmp \*0xc\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) 0+180 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 10 00 00 00 jmp \*0x10\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) @@ -44,9 +44,9 @@ Disassembly of section .text: +[a-f0-9]+: e8 c7 ff ff ff call 170 <bar1@plt> +[a-f0-9]+: 83 c4 08 add \$0x8,%esp +[a-f0-9]+: 5b pop %ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+1ae <__x86.get_pc_thunk.bx>: +[a-f0-9]+: 8b 1c 24 mov \(%esp\),%ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/ibt-plt-3c.d b/ld/testsuite/ld-i386/ibt-plt-3c.d index 91f2023..9e6c8f5 100644 --- a/ld/testsuite/ld-i386/ibt-plt-3c.d +++ b/ld/testsuite/ld-i386/ibt-plt-3c.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[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]+: 0f 1f 40 00 nopl 0x0\(%eax\) - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: 68 08 00 00 00 push \$0x8 +[a-f0-9]+: e9 d2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+170 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 0c 00 00 00 jmp \*0xc\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) 0+180 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fb endbr32 + +[a-f0-9]+: f3 0f 1e fb endbr32 +[a-f0-9]+: ff a3 10 00 00 00 jmp \*0x10\(%ebx\) +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%eax,%eax,1\) @@ -44,9 +44,9 @@ Disassembly of section .text: +[a-f0-9]+: e8 c7 ff ff ff call 170 <bar1@plt> +[a-f0-9]+: 83 c4 08 add \$0x8,%esp +[a-f0-9]+: 5b pop %ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+1ae <__x86.get_pc_thunk.bx>: +[a-f0-9]+: 8b 1c 24 mov \(%esp\),%ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/pr20244-2a.d b/ld/testsuite/ld-i386/pr20244-2a.d index 334b89e..fd4d076 100644 --- a/ld/testsuite/ld-i386/pr20244-2a.d +++ b/ld/testsuite/ld-i386/pr20244-2a.d @@ -17,10 +17,10 @@ SYMBOL TABLE: Disassembly of section .text: 0+8048084 <foo>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+8048085 <bar>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+8048086 <_start>: +[a-f0-9]+: ff 15 a8 90 04 08 call \*0x80490a8 diff --git a/ld/testsuite/ld-i386/pr20244-4a.d b/ld/testsuite/ld-i386/pr20244-4a.d index 865d339..124af83 100644 --- a/ld/testsuite/ld-i386/pr20244-4a.d +++ b/ld/testsuite/ld-i386/pr20244-4a.d @@ -9,9 +9,9 @@ Disassembly of section .text: 0+804807c <_start>: +[a-f0-9]+: 8b 05 8c 90 04 08 mov 0x804908c,%eax - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+8048083 <ifunc>: +[a-f0-9]+: b8 ef be ad 0b mov \$0xbadbeef,%eax - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/pr23930.d b/ld/testsuite/ld-i386/pr23930.d index e9da510..ba5cbf4 100644 --- a/ld/testsuite/ld-i386/pr23930.d +++ b/ld/testsuite/ld-i386/pr23930.d @@ -7,5 +7,5 @@ #... [a-f0-9]+ <main>: [a-f0-9]+: 31 c0 xor %eax,%eax -[a-f0-9]+: c3 ret +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/pr26018.d b/ld/testsuite/ld-i386/pr26018.d index 9ff16c1..3bb6300 100644 --- a/ld/testsuite/ld-i386/pr26018.d +++ b/ld/testsuite/ld-i386/pr26018.d @@ -12,5 +12,5 @@ Disassembly of section .text: +[a-f0-9]+: e8 00 00 00 00 call [0-9a-f]+ <foo> [0-9a-f]+ <foo>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/pr26263.d b/ld/testsuite/ld-i386/pr26263.d index e6874e2..87bddd3 100644 --- a/ld/testsuite/ld-i386/pr26263.d +++ b/ld/testsuite/ld-i386/pr26263.d @@ -9,7 +9,7 @@ Disassembly of section .text: 0+[a-f0-9]+ <printk>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret Disassembly of section .init.text: diff --git a/ld/testsuite/ld-i386/pr27193.dd b/ld/testsuite/ld-i386/pr27193.dd index 7d1e799..90b207f 100644 --- a/ld/testsuite/ld-i386/pr27193.dd +++ b/ld/testsuite/ld-i386/pr27193.dd @@ -1,5 +1,5 @@ #... 0+[a-f0-9]+ <__x86.get_pc_thunk.bx>: +[a-f0-9]+: 8b 1c 24 mov \(%esp\),%ebx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/protected2.d b/ld/testsuite/ld-i386/protected2.d index ba53e59..e1e3f94 100644 --- a/ld/testsuite/ld-i386/protected2.d +++ b/ld/testsuite/ld-i386/protected2.d @@ -8,9 +8,9 @@ Disassembly of section .text: 0+[a-f0-9]+ <foo>: -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret 0+[a-f0-9]+ <bar>: [ ]*[a-f0-9]+: e8 fa ff ff ff call [a-f0-9]+ <foo> -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/protected3.d b/ld/testsuite/ld-i386/protected3.d index 47ab4e1..c3a6888 100644 --- a/ld/testsuite/ld-i386/protected3.d +++ b/ld/testsuite/ld-i386/protected3.d @@ -10,5 +10,5 @@ Disassembly of section .text: 0+[a-f0-9]+ <bar>: [ ]*[a-f0-9]+: 8b 81 [a-f0-9][a-f0-9] [a-f0-9][a-f0-9] ff ff mov -0x[a-f0-9]+\(%ecx\),%eax [ ]*[a-f0-9]+: 8b 00 mov \(%eax\),%eax -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/protected7.d b/ld/testsuite/ld-i386/protected7.d index aafa2d8..6ae6007 100644 --- a/ld/testsuite/ld-i386/protected7.d +++ b/ld/testsuite/ld-i386/protected7.d @@ -9,5 +9,5 @@ Disassembly of section .text: 0+[a-f0-9]+ <bar>: [ ]*[a-f0-9]+: 8b 81 [a-f0-9][a-f0-9] [a-f0-9][a-f0-9] 00 00 mov 0x[a-f0-9]+\(%ecx\),%eax -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/tlspie3b.d b/ld/testsuite/ld-i386/tlspie3b.d index 7de0472..e41fcaa 100644 --- a/ld/testsuite/ld-i386/tlspie3b.d +++ b/ld/testsuite/ld-i386/tlspie3b.d @@ -9,7 +9,7 @@ Disassembly of section .text: [0-9a-f]+ <___tls_get_addr>: -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret [0-9a-f]+ <_start>: [ ]*[a-f0-9]+: 55 push %ebp @@ -32,6 +32,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 89 f0 mov %esi,%eax [ ]*[a-f0-9]+: 5b pop %ebx [ ]*[a-f0-9]+: 5e pop %esi -[ ]*[a-f0-9]+: c9 leave -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c9 leave +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-i386/tlspie3c.d b/ld/testsuite/ld-i386/tlspie3c.d index aa02f57..d1639c1 100644 --- a/ld/testsuite/ld-i386/tlspie3c.d +++ b/ld/testsuite/ld-i386/tlspie3c.d @@ -9,7 +9,7 @@ Disassembly of section .text: [0-9a-f]+ <___tls_get_addr>: -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret [0-9a-f]+ <_start>: [ ]*[a-f0-9]+: 55 push %ebp @@ -32,6 +32,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 89 f0 mov %esi,%eax [ ]*[a-f0-9]+: 5b pop %ebx [ ]*[a-f0-9]+: 5e pop %esi -[ ]*[a-f0-9]+: c9 leave -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c9 leave +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d index aae24b2..a5c56b5 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-i386-now.d @@ -24,7 +24,7 @@ Disassembly of section .plt: Disassembly of section .text: 0+110 <foo>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+111 <bar>: +[a-f0-9]+: e8 00 00 00 00 call 116 <bar\+0x5> @@ -32,5 +32,5 @@ Disassembly of section .text: +[a-f0-9]+: 81 c3 9e 10 00 00 add \$0x109e,%ebx +[a-f0-9]+: e8 de ff ff ff call 100 <\*ABS\*@plt> +[a-f0-9]+: 8d 83 4c ef ff ff lea -0x10b4\(%ebx\),%eax - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass 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 86083c1..ff494de 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386-now.d @@ -24,7 +24,7 @@ Disassembly of section .plt: Disassembly of section .text: 0+100 <__GI_foo>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+101 <bar>: +[a-f0-9]+: e8 00 00 00 00 call 106 <bar\+0x5> @@ -32,5 +32,5 @@ Disassembly of section .text: +[a-f0-9]+: 81 c3 9e 10 00 00 add \$0x109e,%ebx +[a-f0-9]+: e8 de ff ff ff call f0 <\*ABS\*@plt> +[a-f0-9]+: 8d 83 4c ef ff ff lea -0x10b4\(%ebx\),%eax - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass 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 be3da08..e038b37 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 @@ -22,10 +22,10 @@ Disassembly of section .plt: Disassembly of section .text: 0+190 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+191 <bar>: +[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 ret * + +[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 b504f9a..47db012 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d @@ -22,10 +22,10 @@ Disassembly of section .plt: Disassembly of section .text: 0+190 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+191 <bar>: +[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 ret * + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-21-i386.d b/ld/testsuite/ld-ifunc/ifunc-21-i386.d index d4ff934..0b3acd4 100644 --- a/ld/testsuite/ld-ifunc/ifunc-21-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-21-i386.d @@ -18,8 +18,8 @@ Disassembly of section .text: +[a-f0-9]+: c7 c0 a1 80 04 08 mov \$0x80480a1,%eax 0+80480a0 <foo>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+80480a1 <bar>: - +[a-f0-9]+: c3 ret + +[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 69a4ade..52e17f3 100644 --- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d +++ b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d @@ -17,8 +17,8 @@ Disassembly of section .text: +[a-f0-9]+: 48 c7 c0 f1 00 40 00 mov \$0x4000f1,%rax 0+4000f0 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+4000f1 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-ifunc/ifunc-22-i386.d b/ld/testsuite/ld-ifunc/ifunc-22-i386.d index d4ff934..0b3acd4 100644 --- a/ld/testsuite/ld-ifunc/ifunc-22-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-22-i386.d @@ -18,8 +18,8 @@ Disassembly of section .text: +[a-f0-9]+: c7 c0 a1 80 04 08 mov \$0x80480a1,%eax 0+80480a0 <foo>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret 0+80480a1 <bar>: - +[a-f0-9]+: c3 ret + +[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 69a4ade..52e17f3 100644 --- a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d +++ b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d @@ -17,8 +17,8 @@ Disassembly of section .text: +[a-f0-9]+: 48 c7 c0 f1 00 40 00 mov \$0x4000f1,%rax 0+4000f0 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+4000f1 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/align-branch-1.d b/ld/testsuite/ld-x86-64/align-branch-1.d index b517365..7eb740c 100644 --- a/ld/testsuite/ld-x86-64/align-branch-1.d +++ b/ld/testsuite/ld-x86-64/align-branch-1.d @@ -16,5 +16,5 @@ Disassembly of section .text: +[a-f0-9]+: 2e 2e 2e 2e 48 8b 98 fc ff ff ff cs cs cs cs mov -0x4\(%rax\),%rbx +[a-f0-9]+: 48 85 db test %rbx,%rbx +[a-f0-9]+: 74 00 je [a-f0-9]+ <_start\+0x25> - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d b/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d index 86ba30a..01d6389 100644 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d +++ b/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d @@ -25,9 +25,9 @@ Disassembly of section .plt.sec: Disassembly of section .text: 0+198 <foo>: - +[a-f0-9]+: f2 c3 bnd ret * + +[a-f0-9]+: f2 c3 bnd ret 0+19a <bar>: +[a-f0-9]+: f2 e8 f0 ff ff ff bnd call 190 <\*ABS\*\+0x198@plt> - +[a-f0-9]+: f2 c3 bnd ret * + +[a-f0-9]+: f2 c3 bnd ret #pass diff --git a/ld/testsuite/ld-x86-64/code16.d b/ld/testsuite/ld-x86-64/code16.d index 20096ab..5b83681 100644 --- a/ld/testsuite/ld-x86-64/code16.d +++ b/ld/testsuite/ld-x86-64/code16.d @@ -10,7 +10,7 @@ Disassembly of section .text.default_process_op.isra.0: 0+737c <default_process_op.isra.0>: - +[a-f0-9]+: 66 c3 retl + +[a-f0-9]+: 66 c3 retl Disassembly of section .text.mpt_scsi_process_op: diff --git a/ld/testsuite/ld-x86-64/hidden2.d b/ld/testsuite/ld-x86-64/hidden2.d index 4628aa2..ff57889 100644 --- a/ld/testsuite/ld-x86-64/hidden2.d +++ b/ld/testsuite/ld-x86-64/hidden2.d @@ -9,5 +9,5 @@ Disassembly of section .text: [a-f0-9]+ <bar>: [ ]*[a-f0-9]+: e8 ([0-9a-f]{2} ){4} * call 0 .* -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d index b011e3f..369a18b 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: e9 d2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar1> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar2> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-1.d b/ld/testsuite/ld-x86-64/ibt-plt-1.d index 15563b4..b8b968d 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-1.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-1.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmp [a-f0-9]+ <.*> +[a-f0-9]+: 90 nop - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmp [a-f0-9]+ <.*> +[a-f0-9]+: 90 nop @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar1> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar2> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d index 23e31e6..e4e6fab 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 4a 01 20 00 push 0x20014a\(%rip\) # 200290 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 4c 01 20 00 jmp \*0x20014c\(%rip\) # 200298 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: e9 d2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+170 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 26 01 20 00 jmp \*0x200126\(%rip\) # 2002a0 <bar1> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+180 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 1e 01 20 00 jmp \*0x20011e\(%rip\) # 2002a8 <bar2> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a.d b/ld/testsuite/ld-x86-64/ibt-plt-2a.d index adbbf62..3db74c3 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ca 01 20 00 push 0x2001ca\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: f2 ff 25 cb 01 20 00 bnd jmp \*0x2001cb\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmp 1f0 <.*> +[a-f0-9]+: 90 nop - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmp 1f0 <.*> +[a-f0-9]+: 90 nop @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+220 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 a5 01 20 00 bnd jmp \*0x2001a5\(%rip\) # 2003d0 <bar1> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) 0+230 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 9d 01 20 00 bnd jmp \*0x20019d\(%rip\) # 2003d8 <bar2> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d index b00ab92..32d0b0e 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: e9 d2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar1> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar2> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2c.d b/ld/testsuite/ld-x86-64/ibt-plt-2c.d index b7969d8..dd47bc7 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2c.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2c.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmp [a-f0-9]+ <.*> +[a-f0-9]+: 90 nop - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmp [a-f0-9]+ <.*> +[a-f0-9]+: 90 nop @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar1> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar2> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d index f52b1cc..b738e95 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 4a 01 20 00 push 0x20014a\(%rip\) # 200290 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 4c 01 20 00 jmp \*0x20014c\(%rip\) # 200298 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: e9 d2 ff ff ff jmp 140 <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+170 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 26 01 20 00 jmp \*0x200126\(%rip\) # 2002a0 <bar1> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+180 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 1e 01 20 00 jmp \*0x20011e\(%rip\) # 2002a8 <bar2> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a.d b/ld/testsuite/ld-x86-64/ibt-plt-3a.d index 8bd8851..a7e048c 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ca 01 20 00 push 0x2001ca\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: f2 ff 25 cb 01 20 00 bnd jmp \*0x2001cb\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmp 1f0 <.*> +[a-f0-9]+: 90 nop - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmp 1f0 <.*> +[a-f0-9]+: 90 nop @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: 0+220 <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 a5 01 20 00 bnd jmp \*0x2001a5\(%rip\) # 2003d0 <bar1> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) 0+230 <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 9d 01 20 00 bnd jmp \*0x20019d\(%rip\) # 2003d8 <bar2> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d index f09b1a6..d104d3d 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: e9 d2 ff ff ff jmp [a-f0-9]+ <bar1@plt-0x30> +[a-f0-9]+: 66 90 xchg %ax,%ax @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar1> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar2> +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3c.d b/ld/testsuite/ld-x86-64/ibt-plt-3c.d index 5c19e3d..dac290e 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3c.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3c.d @@ -12,11 +12,11 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: f2 e9 e1 ff ff ff bnd jmp [a-f0-9]+ <.*> +[a-f0-9]+: 90 nop - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 01 00 00 00 push \$0x1 +[a-f0-9]+: f2 e9 d1 ff ff ff bnd jmp [a-f0-9]+ <.*> +[a-f0-9]+: 90 nop @@ -24,12 +24,12 @@ Disassembly of section .plt: Disassembly of section .plt.sec: [a-f0-9]+ <bar1@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar1> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) [a-f0-9]+ <bar2@plt>: - +[a-f0-9]+: f3 0f 1e fa endbr64 + +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: f2 ff 25 ([0-9a-f]{2} ){4}[ ]+bnd jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <bar2> +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) diff --git a/ld/testsuite/ld-x86-64/pe-x86-64-1.od b/ld/testsuite/ld-x86-64/pe-x86-64-1.od index 227875f..b1f16b7 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64-1.od +++ b/ld/testsuite/ld-x86-64/pe-x86-64-1.od @@ -17,12 +17,12 @@ Disassembly of section .text\$mn: 0+401000 <getaddr1>: +[a-f0-9]+: 48 8d 05 0d 20 00 00 lea 0x200d\(%rip\),%rax # 403014 <__bss_start> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+401010 <getaddr2>: +[a-f0-9]+: 48 8d 05 fd 1f 00 00 lea 0x1ffd\(%rip\),%rax # 403014 <__bss_start> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+401020 <begin>: @@ -30,5 +30,5 @@ Disassembly of section .text\$mn: +[a-f0-9]+: e8 d7 ff ff ff call 401000 <getaddr1> +[a-f0-9]+: e8 e2 ff ff ff call 401010 <getaddr2> +[a-f0-9]+: 48 83 c4 28 add \$0x28,%rsp - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pe-x86-64-2.od b/ld/testsuite/ld-x86-64/pe-x86-64-2.od index 227875f..b1f16b7 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64-2.od +++ b/ld/testsuite/ld-x86-64/pe-x86-64-2.od @@ -17,12 +17,12 @@ Disassembly of section .text\$mn: 0+401000 <getaddr1>: +[a-f0-9]+: 48 8d 05 0d 20 00 00 lea 0x200d\(%rip\),%rax # 403014 <__bss_start> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+401010 <getaddr2>: +[a-f0-9]+: 48 8d 05 fd 1f 00 00 lea 0x1ffd\(%rip\),%rax # 403014 <__bss_start> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+401020 <begin>: @@ -30,5 +30,5 @@ Disassembly of section .text\$mn: +[a-f0-9]+: e8 d7 ff ff ff call 401000 <getaddr1> +[a-f0-9]+: e8 e2 ff ff ff call 401010 <getaddr2> +[a-f0-9]+: 48 83 c4 28 add \$0x28,%rsp - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pe-x86-64-3.od b/ld/testsuite/ld-x86-64/pe-x86-64-3.od index 227875f..b1f16b7 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64-3.od +++ b/ld/testsuite/ld-x86-64/pe-x86-64-3.od @@ -17,12 +17,12 @@ Disassembly of section .text\$mn: 0+401000 <getaddr1>: +[a-f0-9]+: 48 8d 05 0d 20 00 00 lea 0x200d\(%rip\),%rax # 403014 <__bss_start> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+401010 <getaddr2>: +[a-f0-9]+: 48 8d 05 fd 1f 00 00 lea 0x1ffd\(%rip\),%rax # 403014 <__bss_start> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 0f 1f 84 00 00 00 00 00 nopl 0x0\(%rax,%rax,1\) 0+401020 <begin>: @@ -30,5 +30,5 @@ Disassembly of section .text\$mn: +[a-f0-9]+: e8 d7 ff ff ff call 401000 <getaddr1> +[a-f0-9]+: e8 e2 ff ff ff call 401010 <getaddr2> +[a-f0-9]+: 48 83 c4 28 add \$0x28,%rsp - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pe-x86-64-4.od b/ld/testsuite/ld-x86-64/pe-x86-64-4.od index 320c6be..bbfe5c2 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64-4.od +++ b/ld/testsuite/ld-x86-64/pe-x86-64-4.od @@ -22,7 +22,7 @@ Disassembly of section .text\$mn: +[a-f0-9]+: e8 4c 00 00 00 call 401060 <opti_Od> +[a-f0-9]+: e8 07 00 00 00 call 401020 <opti_O1> +[a-f0-9]+: 48 83 c4 28 add \$0x28,%rsp - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 66 90 xchg %ax,%ax 0+401020 <opti_O1>: @@ -33,7 +33,7 @@ Disassembly of section .text\$mn: +[a-f0-9]+: 48 89 05 dc 1f 00 00 mov %rax,0x1fdc\(%rip\) # 403020 <Struct\+0x8> +[a-f0-9]+: 83 c8 ff or \$0xffffffff,%eax +[a-f0-9]+: c7 05 cb 1f 00 00 55 55 44 44 movl \$0x44445555,0x1fcb\(%rip\) # 40301c <Struct\+0x4> - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 66 2e 0f 1f 84 00 00 00 00 00 cs nopw 0x0\(%rax,%rax,1\) +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) @@ -58,5 +58,5 @@ Disassembly of section .text\$mn: +[a-f0-9]+: 48 ba 88 88 88 88 88 88 88 88 movabs \$0x8888888888888888,%rdx +[a-f0-9]+: 48 89 54 01 08 mov %rdx,0x8\(%rcx,%rax,1\) +[a-f0-9]+: b8 ff ff ff ff mov \$0xffffffff,%eax - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pe-x86-64-5.od b/ld/testsuite/ld-x86-64/pe-x86-64-5.od index 6ef13ab..ffd6622 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64-5.od +++ b/ld/testsuite/ld-x86-64/pe-x86-64-5.od @@ -19,17 +19,17 @@ Disassembly of section .text\$mn: 0+401000 <begin>: +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: cc int3 + +[a-f0-9]+: cc int3 +[a-f0-9]+: 48 8d 05 07 10 00 00 lea 0x1007\(%rip\),%rax # 402011 <initializedVar> +[a-f0-9]+: 48 3b 05 ef 0f 00 00 cmp 0xfef\(%rip\),%rax # 402000 <Struct> +[a-f0-9]+: 74 01 je 401014 <begin\+0x14> - +[a-f0-9]+: cc int3 + +[a-f0-9]+: cc int3 +[a-f0-9]+: 48 8d 05 fa 0f 00 00 lea 0xffa\(%rip\),%rax # 402015 <non_initialVar> +[a-f0-9]+: 48 3b 05 e6 0f 00 00 cmp 0xfe6\(%rip\),%rax # 402008 <Struct\+0x8> +[a-f0-9]+: 74 01 je 401025 <begin\+0x25> - +[a-f0-9]+: cc int3 + +[a-f0-9]+: cc int3 +[a-f0-9]+: 66 ba 80 00 mov \$0x80,%dx +[a-f0-9]+: b0 12 mov \$0x12,%al +[a-f0-9]+: ee out %al,\(%dx\) - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pe-x86-64-6.od b/ld/testsuite/ld-x86-64/pe-x86-64-6.od index cc23658..cb452d8 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64-6.od +++ b/ld/testsuite/ld-x86-64/pe-x86-64-6.od @@ -22,11 +22,11 @@ Disassembly of section .text\$mn: +[a-f0-9]+: 48 89 74 24 20 mov %rsi,0x20\(%rsp\) +[a-f0-9]+: 57 push %rdi +[a-f0-9]+: 48 83 ec 20 sub \$0x20,%rsp - +[a-f0-9]+: cc int3 + +[a-f0-9]+: cc int3 +[a-f0-9]+: 8b 05 1d 20 00 00 mov 0x201d\(%rip\),%eax # 403038 <deadloopvar> +[a-f0-9]+: 83 f8 01 cmp \$0x1,%eax +[a-f0-9]+: 74 f5 je 401015 <main\+0x15> - +[a-f0-9]+: 0f 31 rdtsc + +[a-f0-9]+: 0f 31 rdtsc +[a-f0-9]+: 48 c1 e2 20 shl \$0x20,%rdx +[a-f0-9]+: 48 0b c2 or %rdx,%rax +[a-f0-9]+: 74 5d je 401088 <main\+0x88> @@ -40,7 +40,7 @@ Disassembly of section .text\$mn: +[a-f0-9]+: 74 28 je 401075 <main\+0x75> +[a-f0-9]+: b8 05 00 00 00 mov \$0x5,%eax +[a-f0-9]+: 2b 84 2b 48 30 00 00 sub 0x3048\(%rbx,%rbp,1\),%eax - +[a-f0-9]+: 99 cltd + +[a-f0-9]+: 99 cltd +[a-f0-9]+: 2b c2 sub %edx,%eax +[a-f0-9]+: d1 f8 sar %eax +[a-f0-9]+: 48 63 d0 movslq %eax,%rdx @@ -65,13 +65,13 @@ Disassembly of section .text\$mn: +[a-f0-9]+: 48 8b 74 24 48 mov 0x48\(%rsp\),%rsi +[a-f0-9]+: 48 83 c4 20 add \$0x20,%rsp +[a-f0-9]+: 5f pop %rdi - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret +[a-f0-9]+: 66 90 xchg %ax,%ax 0+4010a8 <xfunc>: +[a-f0-9]+: 66 90 xchg %ax,%ax - +[a-f0-9]+: cc int3 - +[a-f0-9]+: c3 ret + +[a-f0-9]+: cc int3 + +[a-f0-9]+: c3 ret 0+4010ac <xstring>: +[a-f0-9]+: 40 53 rex push %rbx @@ -87,5 +87,5 @@ Disassembly of section .text\$mn: +[a-f0-9]+: 75 f0 jne 4010b9 <xstring\+0xd> +[a-f0-9]+: 48 83 c4 20 add \$0x20,%rsp +[a-f0-9]+: 5b pop %rbx - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/plt-main-ibt-x32.dd b/ld/testsuite/ld-x86-64/plt-main-ibt-x32.dd index 54b5528..4c417df 100644 --- a/ld/testsuite/ld-x86-64/plt-main-ibt-x32.dd +++ b/ld/testsuite/ld-x86-64/plt-main-ibt-x32.dd @@ -2,6 +2,6 @@ Disassembly of section .plt.got: [a-f0-9]+ <[_a-z]+@plt>: -[ ]*[a-f0-9]+: f3 0f 1e fa endbr64 +[ ]*[a-f0-9]+: f3 0f 1e fa endbr64 [ ]*[a-f0-9]+: ff 25 .. .. 3f 00 jmp +\*0x3f....\(%rip\) # ...... <.*> #pass diff --git a/ld/testsuite/ld-x86-64/plt-main-ibt.dd b/ld/testsuite/ld-x86-64/plt-main-ibt.dd index 6cdce13..035dd87 100644 --- a/ld/testsuite/ld-x86-64/plt-main-ibt.dd +++ b/ld/testsuite/ld-x86-64/plt-main-ibt.dd @@ -2,6 +2,6 @@ Disassembly of section .plt.got: [a-f0-9]+ <[_a-z]+@plt>: -[ ]*[a-f0-9]+: f3 0f 1e fa endbr64 +[ ]*[a-f0-9]+: f3 0f 1e fa endbr64 [ ]*[a-f0-9]+: f2 ff 25 .. .. 3f 00 bnd jmp \*0x3f....\(%rip\) # ...... <.*> #pass diff --git a/ld/testsuite/ld-x86-64/pr18160.d b/ld/testsuite/ld-x86-64/pr18160.d index b944bbe..b4aa4cd 100644 --- a/ld/testsuite/ld-x86-64/pr18160.d +++ b/ld/testsuite/ld-x86-64/pr18160.d @@ -11,4 +11,4 @@ Disassembly of section .text: [ ]*[a-f0-9]+: e9 00 00 00 00 jmp 5 <foo> 0+5 <foo>: -[ ]*[a-f0-9]+: c3 ret +[ ]*[a-f0-9]+: c3 ret diff --git a/ld/testsuite/ld-x86-64/pr20253-1b.d b/ld/testsuite/ld-x86-64/pr20253-1b.d index f6f5eba..c7676f3 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1b.d +++ b/ld/testsuite/ld-x86-64/pr20253-1b.d @@ -9,10 +9,10 @@ Disassembly of section .text: 0+4000e0 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+4000e1 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+4000e2 <_start>: +[a-f0-9]+: ff 15 28 00 20 00 call \*0x200028\(%rip\) # 600110 <.*> diff --git a/ld/testsuite/ld-x86-64/pr20253-1d.d b/ld/testsuite/ld-x86-64/pr20253-1d.d index 057577b..a4fe515 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1d.d +++ b/ld/testsuite/ld-x86-64/pr20253-1d.d @@ -9,10 +9,10 @@ Disassembly of section .text: 0+1c8 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+1c9 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+1ca <_start>: +[a-f0-9]+: ff 15 28 01 20 00 call \*0x200128\(%rip\) # 2002f8 <_DYNAMIC\+0x100> diff --git a/ld/testsuite/ld-x86-64/pr20253-1f.d b/ld/testsuite/ld-x86-64/pr20253-1f.d index 479db82..2f1de02 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1f.d +++ b/ld/testsuite/ld-x86-64/pr20253-1f.d @@ -9,10 +9,10 @@ Disassembly of section .text: 0+188 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+189 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+18a <_start>: +[a-f0-9]+: ff 15 08 01 20 00 call \*0x200108\(%rip\) # 200298 <.*> diff --git a/ld/testsuite/ld-x86-64/pr20253-1h.d b/ld/testsuite/ld-x86-64/pr20253-1h.d index 7d9b147..c19b079 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1h.d +++ b/ld/testsuite/ld-x86-64/pr20253-1h.d @@ -9,10 +9,10 @@ Disassembly of section .text: 0+40008c <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+40008d <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+40008e <_start>: +[a-f0-9]+: ff 15 2c 00 20 00 call \*0x20002c\(%rip\) # 6000c0 <_start\+0x200032> diff --git a/ld/testsuite/ld-x86-64/pr20253-1j.d b/ld/testsuite/ld-x86-64/pr20253-1j.d index 20176a2..53b7de2 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1j.d +++ b/ld/testsuite/ld-x86-64/pr20253-1j.d @@ -9,10 +9,10 @@ Disassembly of section .text: 0+120 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+121 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+122 <_start>: +[a-f0-9]+: ff 15 a8 00 20 00 call \*0x2000a8\(%rip\) # 2001d0 <.*> diff --git a/ld/testsuite/ld-x86-64/pr20253-1l.d b/ld/testsuite/ld-x86-64/pr20253-1l.d index 4b17907..1901579 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1l.d +++ b/ld/testsuite/ld-x86-64/pr20253-1l.d @@ -9,10 +9,10 @@ Disassembly of section .text: 0+100 <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+101 <bar>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret 0+102 <_start>: +[a-f0-9]+: ff 15 98 00 20 00 call \*0x200098\(%rip\) # 2001a0 <.*> diff --git a/ld/testsuite/ld-x86-64/pr23930-x32.d b/ld/testsuite/ld-x86-64/pr23930-x32.d index 16366a9..23272df 100644 --- a/ld/testsuite/ld-x86-64/pr23930-x32.d +++ b/ld/testsuite/ld-x86-64/pr23930-x32.d @@ -7,5 +7,5 @@ #... [a-f0-9]+ <main>: [a-f0-9]+: 31 c0 xor %eax,%eax -[a-f0-9]+: c3 ret * +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pr23930.d b/ld/testsuite/ld-x86-64/pr23930.d index 215d465..d0466c6 100644 --- a/ld/testsuite/ld-x86-64/pr23930.d +++ b/ld/testsuite/ld-x86-64/pr23930.d @@ -7,5 +7,5 @@ #... [a-f0-9]+ <main>: [a-f0-9]+: 31 c0 xor %eax,%eax -[a-f0-9]+: c3 ret * +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pr26018.d b/ld/testsuite/ld-x86-64/pr26018.d index 1f9ba4b..42a6a83 100644 --- a/ld/testsuite/ld-x86-64/pr26018.d +++ b/ld/testsuite/ld-x86-64/pr26018.d @@ -11,5 +11,5 @@ Disassembly of section .text: +[a-f0-9]+: e8 00 00 00 00 call [0-9a-f]+ <foo> [0-9a-f]+ <foo>: - +[a-f0-9]+: c3 ret * + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pr26263.d b/ld/testsuite/ld-x86-64/pr26263.d index cdc43f2..38f184c 100644 --- a/ld/testsuite/ld-x86-64/pr26263.d +++ b/ld/testsuite/ld-x86-64/pr26263.d @@ -8,7 +8,7 @@ Disassembly of section .text: 0+[a-f0-9]+ <printk>: - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret Disassembly of section .init.text: diff --git a/ld/testsuite/ld-x86-64/pr27016a.d b/ld/testsuite/ld-x86-64/pr27016a.d index 88fba0a..af92521 100644 --- a/ld/testsuite/ld-x86-64/pr27016a.d +++ b/ld/testsuite/ld-x86-64/pr27016a.d @@ -19,5 +19,5 @@ Disassembly of section .text: +[a-f0-9]+: 41 89 13 mov %edx,\(%r11\) +[a-f0-9]+: b8 00 00 00 00 mov \$0x0,%eax +[a-f0-9]+: 5d pop %rbp - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/pr27016b.d b/ld/testsuite/ld-x86-64/pr27016b.d index b172736..130ef55 100644 --- a/ld/testsuite/ld-x86-64/pr27016b.d +++ b/ld/testsuite/ld-x86-64/pr27016b.d @@ -19,5 +19,5 @@ Disassembly of section .text: +[a-f0-9]+: 41 89 13 mov %edx,\(%r11\) +[a-f0-9]+: b8 00 00 00 00 mov \$0x0,%eax +[a-f0-9]+: 5d pop %rbp - +[a-f0-9]+: c3 ret + +[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/protected2.d b/ld/testsuite/ld-x86-64/protected2.d index 1dd75fb..ece0155 100644 --- a/ld/testsuite/ld-x86-64/protected2.d +++ b/ld/testsuite/ld-x86-64/protected2.d @@ -8,9 +8,9 @@ Disassembly of section .text: 0+[a-f0-9]+ <foo>: -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret 0+[a-f0-9]+ <bar>: [ ]*[a-f0-9]+: e8 fa ff ff ff call [a-f0-9]+ <foo> -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/protected3.d b/ld/testsuite/ld-x86-64/protected3.d index 92a2ab3..57950e4 100644 --- a/ld/testsuite/ld-x86-64/protected3.d +++ b/ld/testsuite/ld-x86-64/protected3.d @@ -10,5 +10,5 @@ Disassembly of section .text: 0+[a-f0-9]+ <bar>: [ ]*[a-f0-9]+: 48 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <.*> [ ]*[a-f0-9]+: 8b 00 mov \(%rax\),%eax -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/protected8.d b/ld/testsuite/ld-x86-64/protected8.d index 72a57fcd..0c4e996 100644 --- a/ld/testsuite/ld-x86-64/protected8.d +++ b/ld/testsuite/ld-x86-64/protected8.d @@ -9,5 +9,5 @@ Disassembly of section .text: 0+[a-f0-9]+ <bar>: [ ]*[a-f0-9]+: 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%eax # [a-f0-9]+ <foo> -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/tlsdesc.pd b/ld/testsuite/ld-x86-64/tlsdesc.pd index bd60a23..490fc90 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.pd +++ b/ld/testsuite/ld-x86-64/tlsdesc.pd @@ -13,7 +13,7 @@ Disassembly of section .plt: [0-9a-f]+: ff 35 .. .. 20 00 push .*\(%rip\) # 201358 <_GLOBAL_OFFSET_TABLE_\+0x8> [0-9a-f]+: ff 25 .. .. 20 00 jmp \*.*\(%rip\) # 201360 <_GLOBAL_OFFSET_TABLE_\+0x10> [0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\) - [0-9a-f]+: f3 0f 1e fa endbr64 + [0-9a-f]+: f3 0f 1e fa endbr64 [0-9a-f]+: ff 35 .. .. 20 00 push .*\(%rip\) # 201358 <_GLOBAL_OFFSET_TABLE_\+0x8> [0-9a-f]+: ff 25 .. .. 20 00 jmp \*.*\(%rip\) # 201348 <.*> diff --git a/ld/testsuite/ld-x86-64/tlspie2b.d b/ld/testsuite/ld-x86-64/tlspie2b.d index 560e81e..0b9fbba 100644 --- a/ld/testsuite/ld-x86-64/tlspie2b.d +++ b/ld/testsuite/ld-x86-64/tlspie2b.d @@ -9,7 +9,7 @@ Disassembly of section .text: [a-f0-9]+ <__tls_get_addr>: -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret [a-f0-9]+ <_start>: [ ]*[a-f0-9]+: 48 c7 c0 f4 ff ff ff mov \$0xfffffffffffffff4,%rax @@ -24,5 +24,5 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 03 18 add \(%rax\),%ebx [ ]*[a-f0-9]+: 89 d8 mov %ebx,%eax [ ]*[a-f0-9]+: 5b pop %rbx -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret #pass diff --git a/ld/testsuite/ld-x86-64/tlspie2c.d b/ld/testsuite/ld-x86-64/tlspie2c.d index ed5e136..10dbfc6 100644 --- a/ld/testsuite/ld-x86-64/tlspie2c.d +++ b/ld/testsuite/ld-x86-64/tlspie2c.d @@ -9,7 +9,7 @@ Disassembly of section .text: [a-f0-9]+ <__tls_get_addr>: -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret [a-f0-9]+ <_start>: [ ]*[a-f0-9]+: 48 c7 c0 f4 ff ff ff mov \$0xfffffffffffffff4,%rax @@ -24,5 +24,5 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 03 18 add \(%rax\),%ebx [ ]*[a-f0-9]+: 89 d8 mov %ebx,%eax [ ]*[a-f0-9]+: 5b pop %rbx -[ ]*[a-f0-9]+: c3 ret * +[ ]*[a-f0-9]+: c3 ret #pass |