+2020-12-13 Borislav Petkov <bp@suse.de>
+
+ * testsuite/gas/i386/align-branch-9.s: Don't use labels that are
+ automatically local for ELF targets.
+ * testsuite/gas/i386/branch.s: Likewise.
+ * testsuite/gas/i386/x86-64-align-branch-9.s: Likewise.
+ * testsuite/gas/i386/x86-64-branch.s: Likewise.
+ * testsuite/gas/i386/align-branch-9.d: Adjust to match more targets.
+ * testsuite/gas/i386/branch.d: Likewise.
+ * testsuite/gas/i386/ilp32/x86-64-branch.d: Likewise.
+ * testsuite/gas/i386/x86-64-align-branch-9.d: Likewise.
+ * testsuite/gas/i386/x86-64-branch.d: Likewise.
+
2020-12-11 Sergey Belyashov <sergey.belyashov@gmail.com>
Nick Clifton <nickc@redhat.com>
18: 89 75 f4 mov %esi,-0xc\(%ebp\)
1b: 89 75 f4 mov %esi,-0xc\(%ebp\)
1e: 39 c5 cmp %eax,%ebp
- 20: 70 62 jo 84 <foo\+0x84>
+ 20: 70 62 jo 84 <.*>
22: 89 73 f4 mov %esi,-0xc\(%ebx\)
25: 89 75 f4 mov %esi,-0xc\(%ebp\)
28: 89 7d f8 mov %edi,-0x8\(%ebp\)
3a: 5d pop %ebp
3b: 5d pop %ebp
3c: 5d pop %ebp
- 3d: 74 45 je 84 <foo\+0x84>
+ 3d: 74 45 je 84 <.*>
3f: 5d pop %ebp
- 40: 74 42 je 84 <foo\+0x84>
+ 40: 74 42 je 84 <.*>
42: 89 44 24 fc mov %eax,-0x4\(%esp\)
46: 89 75 f4 mov %esi,-0xc\(%ebp\)
49: 89 7d f8 mov %edi,-0x8\(%ebp\)
55: 89 75 f4 mov %esi,-0xc\(%ebp\)
58: 89 75 f4 mov %esi,-0xc\(%ebp\)
5b: 5d pop %ebp
- 5c: eb 2c jmp 8a <foo\+0x8a>
+ 5c: eb 2c jmp 8a <.*>
5e: 66 90 xchg %ax,%ax
- 60: eb 28 jmp 8a <foo\+0x8a>
- 62: eb 26 jmp 8a <foo\+0x8a>
+ 60: eb 28 jmp 8a <.*>
+ 62: eb 26 jmp 8a <.*>
64: 89 45 fc mov %eax,-0x4\(%ebp\)
67: 89 75 f4 mov %esi,-0xc\(%ebp\)
6a: 89 7d f8 mov %edi,-0x8\(%ebp\)
6d: 5d pop %ebp
6e: 5d pop %ebp
6f: 40 inc %eax
- 70: 72 12 jb 84 <foo\+0x84>
+ 70: 72 12 jb 84 <.*>
72: 36 36 89 45 fc ss mov %eax,%ss:-0x4\(%ebp\)
77: 89 75 f4 mov %esi,-0xc\(%ebp\)
7a: 89 7d f8 mov %edi,-0x8\(%ebp\)
7d: 89 75 f4 mov %esi,-0xc\(%ebp\)
80: 21 c3 and %eax,%ebx
- 82: 7c 06 jl 8a <foo\+0x8a>
+ 82: 7c 06 jl 8a <.*>
+00000084 <label2>:
84: 8b 45 f4 mov -0xc\(%ebp\),%eax
87: 89 45 fc mov %eax,-0x4\(%ebp\)
+0000008a <label3>:
8a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
90: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
96: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
b6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
bc: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
c2: 89 75 00 mov %esi,0x0\(%ebp\)
- c5: 74 c3 je 8a <foo\+0x8a>
- c7: 74 c1 je 8a <foo\+0x8a>
+ c5: 74 c3 je 8a <.*>
+ c7: 74 c1 je 8a <.*>
#pass
movl %esi, -12(%ebp)
movl %esi, -12(%ebp)
cmp %eax, %ebp
- jo .L_2
+ jo label2
movl %esi, -12(%ebx)
movl %esi, -12(%ebp)
movl %edi, -8(%ebp)
popl %ebp
popl %ebp
popl %ebp
- je .L_2
+ je label2
popl %ebp
- je .L_2
+ je label2
movl %eax, -4(%esp)
movl %esi, -12(%ebp)
movl %edi, -8(%ebp)
movl %esi, -12(%ebp)
movl %esi, -12(%ebp)
popl %ebp
- jmp .L_3
- jmp .L_3
- jmp .L_3
+ jmp label3
+ jmp label3
+ jmp label3
movl %eax, -4(%ebp)
movl %esi, -12(%ebp)
movl %edi, -8(%ebp)
popl %ebp
popl %ebp
inc %eax
- jc .L_2
+ jc label2
movl %eax, -4(%ebp)
movl %esi, -12(%ebp)
movl %edi, -8(%ebp)
movl %esi, -12(%ebp)
and %eax, %ebx
- jl .L_3
-.L_2:
+ jl label3
+label2:
movl -12(%ebp), %eax
movl %eax, -4(%ebp)
-.L_3:
+label3:
movl %esi, -1200(%ebp)
movl %esi, -1200(%ebp)
movl %esi, -1200(%ebp)
movl %esi, -1200(%ebp)
movl %esi, -1200(%ebp)
movl %esi, (%ebp)
- je .L_3
- je .L_3
+ je label3
+ je label3
Disassembly of section .text:
-0+ <.text>:
-[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +0x[0-9a-f]+
-[ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +0x[0-9a-f]+
+0+ <.*>:
+[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +[0-9a-fx]+ <.*>
+[ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +[0-9a-fx]+ <.*>
#pass
.text
- jz,pt .Llabel
- jz,pn .Llabel
-.Llabel:
+ jz,pt label
+ jz,pn label
+label:
Disassembly of section .text:
-0+ <.text>:
+[0-9a-f]+ <.*>:
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: 66 ff d0 data16 call \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff 20 data16 jmp \*\(%rax\)
-[ ]*[a-f0-9]+: e8 00 00 00 00 call 0x1f 1b: R_X86_64_PC32 \*ABS\*\+0x10003c
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmp 0x24 20: R_X86_64_PC32 \*ABS\*\+0x10003c
-[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 call 0x2a 26: R_X86_64_PLT32 foo-0x4
-[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmp 0x30 2c: R_X86_64_PLT32 foo-0x4
-[ ]*[a-f0-9]+: 66 0f 82 00 00 00 00 data16 jb 0x37 33: R_X86_64_PLT32 foo-0x4
+[ ]*[a-f0-9]+: e8 00 00 00 00 call (0x)?1f <.*> 1b: R_X86_64_PC32 \*ABS\*\+0x10003c
+[ ]*[a-f0-9]+: e9 00 00 00 00 jmp (0x)?24 <.*> 20: R_X86_64_PC32 \*ABS\*\+0x10003c
+[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 call (0x)?2a <.*> 26: R_X86_64_PLT32 foo-0x4
+[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmp (0x)?30 <.*> 2c: R_X86_64_PLT32 foo-0x4
+[ ]*[a-f0-9]+: 66 0f 82 00 00 00 00 data16 jb (0x)?37 <.*> 33: R_X86_64_PLT32 foo-0x4
[ ]*[a-f0-9]+: 66 c3 data16 ret *
[ ]*[a-f0-9]+: 66 c2 08 00 data16 ret \$0x8
-[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +0x[0-9a-f]+
-[ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +0x[0-9a-f]+
+[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +[0-9a-fx]+ <.*>
+[ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +[0-9a-fx]+ <.*>
+[0-9a-f]+ <.*>:
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: 66 ff d0 data16 call \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff 20 data16 jmp \*\(%rax\)
-[ ]*[a-f0-9]+: e8 00 00 00 00 call 0x[0-9a-f]* [0-9a-f]*: R_X86_64_PC32 \*ABS\*\+0x10003c
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmp 0x[0-9a-f]* [0-9a-f]*: R_X86_64_PC32 \*ABS\*\+0x10003c
+[ ]*[a-f0-9]+: e8 00 00 00 00 call [0-9a-fx]* <.*> [0-9a-f]*: R_X86_64_PC32 \*ABS\*\+0x10003c
+[ ]*[a-f0-9]+: e9 00 00 00 00 jmp [0-9a-fx]* <.*> [0-9a-f]*: R_X86_64_PC32 \*ABS\*\+0x10003c
[ ]*[a-f0-9]+: 66 c3 data16 ret *
[ ]*[a-f0-9]+: 66 c2 08 00 data16 ret \$0x8
#pass
0+ <foo>:
0: c1 e9 02 shr \$0x2,%ecx
+[0-9a-f]+ <.*>:
3: c1 e9 02 shr \$0x2,%ecx
6: c1 e9 02 shr \$0x2,%ecx
9: 89 d1 mov %edx,%ecx
19: c1 e9 02 shr \$0x2,%ecx
1c: c1 e9 02 shr \$0x2,%ecx
1f: 80 fa 02 cmp \$0x2,%dl
- 22: 70 df jo 3 <foo\+0x3>
+ 22: 70 df jo [0-9a-fx]+ <.*>
24: 2e 2e 2e 2e 31 c0 cs cs cs cs xor %eax,%eax
2a: c1 e9 02 shr \$0x2,%ecx
+
+[0-9a-f]+ <.*>:
2d: c1 e9 02 shr \$0x2,%ecx
30: c1 e9 02 shr \$0x2,%ecx
33: 89 d1 mov %edx,%ecx
3a: c1 e9 02 shr \$0x2,%ecx
3d: c1 e9 02 shr \$0x2,%ecx
40: f6 c2 02 test \$0x2,%dl
- 43: 75 e8 jne 2d <foo\+0x2d>
+ 43: 75 e8 jne [0-9a-fx]+ <.*>
45: 31 c0 xor %eax,%eax
+
+[0-9a-f]+ <.*>:
47: c1 e9 02 shr \$0x2,%ecx
4a: c1 e9 02 shr \$0x2,%ecx
4d: 89 d1 mov %edx,%ecx
5a: 89 d1 mov %edx,%ecx
5c: 31 c0 xor %eax,%eax
5e: ff c0 inc %eax
- 60: 76 cb jbe 2d <foo\+0x2d>
+ 60: 76 cb jbe [0-9a-fx]+ <.*>
62: 31 c0 xor %eax,%eax
#pass
.p2align 4,,15
foo:
shrl $2, %ecx
-.L1:
+l1:
shrl $2, %ecx
shrl $2, %ecx
movl %edx, %ecx
shrl $2, %ecx
shrl $2, %ecx
cmpb $2, %dl
- jo .L1
+ jo l1
xorl %eax, %eax
shrl $2, %ecx
-.L2:
+l2:
shrl $2, %ecx
shrl $2, %ecx
movl %edx, %ecx
shrl $2, %ecx
shrl $2, %ecx
testb $2, %dl
- jne .L2
+ jne l2
xorl %eax, %eax
-.L3:
+l3:
shrl $2, %ecx
shrl $2, %ecx
movl %edx, %ecx
movl %edx, %ecx
xorl %eax, %eax
inc %eax
- jbe .L2
+ jbe l2
xorl %eax, %eax
Disassembly of section .text:
-0+ <.text>:
+[0-9a-f]+ <.*>:
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: 66 ff d0 data16 call \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff 20 data16 jmp \*\(%rax\)
-[ ]*[a-f0-9]+: e8 (00|5b) 00 (00|10) 00 call (0x1f|10007a <.text\+0x10007a>)
-[ ]*[a-f0-9]+: e9 (00|60) 00 (00|10) 00 jmp (0x24|100084 <.text\+0x100084>)
-[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 call (0x2a|2a <.text\+0x2a>)
-[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmp (0x30|30 <.text\+0x30>)
-[ ]*[a-f0-9]+: 66 0f 82 00 00 00 00 data16 jb (0x37|37 <.text\+0x37>)
+[ ]*[a-f0-9]+: e8 (00|5b) 00 (00|10) 00 call ((0x)?1f|10007a) <.*>
+[ ]*[a-f0-9]+: e9 (00|60) 00 (00|10) 00 jmp ((0x)?24|100084) <.*>
+[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 call (0x2a|2a <.*>)
+[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmp (0x30|30 <.*>)
+[ ]*[a-f0-9]+: 66 0f 82 00 00 00 00 data16 jb (0x37|37 <.*>)
[ ]*[a-f0-9]+: 66 c3 data16 ret *
[ ]*[a-f0-9]+: 66 c2 08 00 data16 ret \$0x8
-[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +0x[0-9a-f]+
-[ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +0x[0-9a-f]+
+[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +[0-9a-fx]+ <.*>
+[ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +[0-9a-fx]+ <.*>
+[0-9a-f]+ <label>:
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: ff d0 call \*%rax
[ ]*[a-f0-9]+: 66 ff d0 data16 call \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff e0 data16 jmp \*%rax
[ ]*[a-f0-9]+: 66 ff 20 data16 jmp \*\(%rax\)
-[ ]*[a-f0-9]+: e8 .. 00 (00|10) 00 call (0x[0-9a-f]*|100[0-9a-f]* <.text\+0x100[0-9a-f]*>)
-[ ]*[a-f0-9]+: e9 .. 00 (00|10) 00 jmp (0x[0-9a-f]*|100[0-9a-f]* <.text\+0x100[0-9a-f]*>)
+[ ]*[a-f0-9]+: e8 .. 00 (00|10) 00 call [0-9a-fx]* <.*>
+[ ]*[a-f0-9]+: e9 .. 00 (00|10) 00 jmp [0-9a-fx]* <.*>
[ ]*[a-f0-9]+: 66 c3 data16 ret *
[ ]*[a-f0-9]+: 66 c2 08 00 data16 ret \$0x8
#pass
retw
retw $8
- jz,pt .Llabel
- jz,pn .Llabel
-.Llabel:
+ jz,pt label
+ jz,pn label
+label:
.intel_syntax noprefix
call rax