From: Jan Beulich Date: Wed, 29 May 2024 08:03:00 +0000 (+0200) Subject: x86/Intel: warn about undue mnemonic suffixes X-Git-Tag: binutils-2_43~589 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b83021de7a83a353b5e9ad1ef428aec05846803e;p=thirdparty%2Fbinutils-gdb.git x86/Intel: warn about undue mnemonic suffixes Except for very few insns mnemonic suffixes aren't permitted in Intel syntax. Warn about such for now, indicating that they will be outright refused down the road. While fiddling with testcases to address fallout, drop a few things which should never have been tested as valid Intel syntax. Also add a previously missing line to simd-suffix.d. --- diff --git a/gas/NEWS b/gas/NEWS index b6f40a340d2..e51c3bbba6d 100644 --- a/gas/NEWS +++ b/gas/NEWS @@ -1,5 +1,8 @@ -*- text -*- +* In x86 Intel syntax undue mnemonic suffixes are now warned about. This is + a first step towards rejecting their use where unjustified. + * Assembler macros as well as the bodies of .irp / .irpc can now use the syntax \+ to access the number of times a given macro has been executed. This is similar to the already existing \@ syntax, except that the count is diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 65d992311b7..9e13f2fc9f1 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9209,6 +9209,19 @@ match_template (char mnem_suffix) affect assembly of the next line of code. */ as_warn (_("stand-alone `%s' prefix"), insn_name (t)); } + + if (intel_syntax && mnem_suffix && !t->opcode_modifier.intelsuffix) + { + static bool noticed; + + as_warn (_("mnemonic suffix used with `%s'"), insn_name (t)); + if (!noticed) + { + noticed = true; + as_warn (_( +"NOTE: Such forms are deprecated and will be rejected by a future version of the assembler")); + } + } } /* Copy the template we found. */ diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d index b553bb15b4a..53dadf3d01f 100644 --- a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d +++ b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d @@ -29,13 +29,9 @@ Disassembly of section .text: [ ]*[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 d0 data16 call \*%rax [ ]*[a-f0-9]+: 66 ff 10 data16 call \*\(%rax\) [ ]*[a-f0-9]+: ff e0 jmp \*%rax -[ ]*[a-f0-9]+: ff e0 jmp \*%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 [0-9a-fx]* <.*> [0-9a-f]*: R_X86_64_PC32 \*ABS\*\+0x10003c diff --git a/gas/testsuite/gas/i386/intel-intel.d b/gas/testsuite/gas/i386/intel-intel.d index ee6d88cb756..88d867cbf24 100644 --- a/gas/testsuite/gas/i386/intel-intel.d +++ b/gas/testsuite/gas/i386/intel-intel.d @@ -202,8 +202,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c9 + leave [ ]*[a-f0-9]+: ca 90 90 + retf 0x9090 [ ]*[a-f0-9]+: cb + retf -[ ]*[a-f0-9]+: ca 90 90 + retf 0x9090 -[ ]*[a-f0-9]+: cb + retf [ ]*[a-f0-9]+: cc + int3 [ ]*[a-f0-9]+: cd 90 + int 0x90 [ ]*[a-f0-9]+: ce + into @@ -223,10 +221,10 @@ Disassembly of section .text: [ ]*[a-f0-9]+: dd 90 90 90 90 90 + fst QWORD PTR \[eax-0x6f6f6f70\] [ ]*[a-f0-9]+: de 90 90 90 90 90 + ficom WORD PTR \[eax-0x6f6f6f70\] [ ]*[a-f0-9]+: df 90 90 90 90 90 + fist WORD PTR \[eax-0x6f6f6f70\] -[ ]*[a-f0-9]+: e0 90 + loopne 260 -[ ]*[a-f0-9]+: e1 90 + loope 262 -[ ]*[a-f0-9]+: e2 90 + loop 264 -[ ]*[a-f0-9]+: e3 90 + jecxz 266 +[ ]*[a-f0-9]+: e0 90 + loopne .* +[ ]*[a-f0-9]+: e1 90 + loope .* +[ ]*[a-f0-9]+: e2 90 + loop .* +[ ]*[a-f0-9]+: e3 90 + jecxz .* [ ]*[a-f0-9]+: e4 90 + in al,0x90 [ ]*[a-f0-9]+: e5 90 + in eax,0x90 [ ]*[a-f0-9]+: e6 90 + out 0x90,al @@ -234,7 +232,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: e8 90 90 90 90 + call 90909... [ ]*[a-f0-9]+: e9 90 90 90 90 + jmp 90909... [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 jmp 0x9090:0x90909090 -[ ]*[a-f0-9]+: eb 90 + jmp 281 +[ ]*[a-f0-9]+: eb 90 + jmp .* [ ]*[a-f0-9]+: ec + in al,dx [ ]*[a-f0-9]+: ed + in eax,dx [ ]*[a-f0-9]+: ee + out dx,al @@ -524,8 +522,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 c9 + leavew [ ]*[a-f0-9]+: 66 ca 90 90 + retfw 0x9090 [ ]*[a-f0-9]+: 66 cb + retfw -[ ]*[a-f0-9]+: 66 ca 90 90 + retfw 0x9090 -[ ]*[a-f0-9]+: 66 cb + retfw [ ]*[a-f0-9]+: 66 cf + iretw [ ]*[a-f0-9]+: 66 d1 90 90 90 90 90 rcl WORD PTR \[eax-0x6f6f6f70\],1 [ ]*[a-f0-9]+: 66 d3 90 90 90 90 90 rcl WORD PTR \[eax-0x6f6f6f70\],cl @@ -585,15 +581,15 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c3 + ret [a-f0-9]+ : -[ ]*[a-f0-9]+: e8 f9 ff ff ff + call 9d9 -[ ]*[a-f0-9]+: e8 f5 ff ff ff + call 9da +[ ]*[a-f0-9]+: e8 f9 ff ff ff + call .* +[ ]*[a-f0-9]+: e8 f5 ff ff ff + call .* [ ]*[a-f0-9]+: dd 1c d0 + fstp QWORD PTR \[eax\+edx\*8\] [ ]*[a-f0-9]+: b9 00 00 00 00 + mov ecx,0x0 [ ]*[a-f0-9]+: 88 04 16 + mov BYTE PTR \[esi\+edx\*1\],al [ ]*[a-f0-9]+: 88 04 32 + mov BYTE PTR \[edx\+esi\*1\],al [ ]*[a-f0-9]+: 88 04 56 + mov BYTE PTR \[esi\+edx\*2\],al [ ]*[a-f0-9]+: 88 04 56 + mov BYTE PTR \[esi\+edx\*2\],al -[ ]*[a-f0-9]+: eb 0c + jmp a07 +[ ]*[a-f0-9]+: eb 0c + jmp .* [ ]*[a-f0-9]+: 6c + ins BYTE PTR es:\[edi\],dx [ ]*[a-f0-9]+: 66 0f c1 90 90 90 90 90 xadd WORD PTR \[eax-0x6f6f6f70\],dx [ ]*[a-f0-9]+: 83 e0 f8 + and eax,0xfffffff8 @@ -609,8 +605,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2f + das [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 jmp 0x9090:0x90909090 [ ]*[a-f0-9]+: 66 a5 + movs WORD PTR es:\[edi\],WORD PTR ds:\[esi\] -[ ]*[a-f0-9]+: 70 90 + jo 9be -[ ]*[a-f0-9]+: 75 fe + jne a2e +[ ]*[a-f0-9]+: 70 90 + jo .* +[ ]*[a-f0-9]+: 75 fe + jne .* [ ]*[a-f0-9]+: 0f 6f 35 28 00 00 00 movq mm6,QWORD PTR ds:0x28 [ ]*[a-f0-9]+: 03 3c c3 + add edi,DWORD PTR \[ebx\+eax\*8\] [ ]*[a-f0-9]+: 0f 6e 44 c3 04 + movd mm0,DWORD PTR \[ebx\+eax\*8\+0x4\] @@ -623,8 +619,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 8b 84 43 00 40 00 00 mov ax,WORD PTR \[ebx\+eax\*2\+0x4000\] [ ]*[a-f0-9]+: ff e0 + jmp eax [ ]*[a-f0-9]+: ff 20 + jmp DWORD PTR \[eax\] -[ ]*[a-f0-9]+: ff 25 db 09 00 00 + jmp DWORD PTR ds:0x9db -[ ]*[a-f0-9]+: e9 5b ff ff ff + jmp 9db +[ ]*[a-f0-9]+: ff 25 .. .. 00 00 + jmp DWORD PTR ds:.* +[ ]*[a-f0-9]+: e9 5b ff ff ff + jmp .* [ ]*[a-f0-9]+: b8 12 00 00 00 + mov eax,0x12 [ ]*[a-f0-9]+: 25 ff ff fb ff + and eax,0xfffbffff [ ]*[a-f0-9]+: 25 ff ff fb ff + and eax,0xfffbffff diff --git a/gas/testsuite/gas/i386/intel-suffix.d b/gas/testsuite/gas/i386/intel-suffix.d index 5ac3209e212..7da6d6e6e68 100644 --- a/gas/testsuite/gas/i386/intel-suffix.d +++ b/gas/testsuite/gas/i386/intel-suffix.d @@ -1,5 +1,6 @@ #objdump: -dw #name: Intel syntax w/ suffixes +#warning_output: intel-suffix.e .*: +file format .* diff --git a/gas/testsuite/gas/i386/intel-suffix.e b/gas/testsuite/gas/i386/intel-suffix.e new file mode 100644 index 00000000000..02f0eadcda7 --- /dev/null +++ b/gas/testsuite/gas/i386/intel-suffix.e @@ -0,0 +1,22 @@ +.*: Assembler messages: +.*:7: Warning: .*suffix.*`shl' +.*:7: Warning: NOTE: .*deprecated.* +.*:8: Warning: .*suffix.*`shl' +.*:10: Warning: .*suffix.*`sal' +.*:11: Warning: .*suffix.*`sal' +.*:13: Warning: .*suffix.*`sal' +.*:14: Warning: .*suffix.*`sal' +.*:16: Warning: .*suffix.*`rol' +.*:17: Warning: .*suffix.*`rol' +.*:19: Warning: .*suffix.*`rol' +.*:20: Warning: .*suffix.*`rol' +.*:26: Warning: .*suffix.*`shr' +.*:27: Warning: .*suffix.*`shr' +.*:29: Warning: .*suffix.*`sar' +.*:30: Warning: .*suffix.*`sar' +.*:32: Warning: .*suffix.*`sar' +.*:33: Warning: .*suffix.*`sar' +.*:35: Warning: .*suffix.*`ror' +.*:36: Warning: .*suffix.*`ror' +.*:38: Warning: .*suffix.*`ror' +.*:39: Warning: .*suffix.*`ror' diff --git a/gas/testsuite/gas/i386/intel.d b/gas/testsuite/gas/i386/intel.d index 1ac6ae93cfe..5d2336d7d2e 100644 --- a/gas/testsuite/gas/i386/intel.d +++ b/gas/testsuite/gas/i386/intel.d @@ -201,8 +201,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c9 [ ]*leave [ ]*[a-f0-9]+: ca 90 90 [ ]*lret \$0x9090 [ ]*[a-f0-9]+: cb [ ]*lret -[ ]*[a-f0-9]+: ca 90 90 [ ]*lret \$0x9090 -[ ]*[a-f0-9]+: cb [ ]*lret [ ]*[a-f0-9]+: cc [ ]*int3 [ ]*[a-f0-9]+: cd 90 [ ]*int \$0x90 [ ]*[a-f0-9]+: ce [ ]*into @@ -222,18 +220,18 @@ Disassembly of section .text: [ ]*[a-f0-9]+: dd 90 90 90 90 90 [ ]*fstl -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: de 90 90 90 90 90 [ ]*ficoms -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: df 90 90 90 90 90 [ ]*fists -0x6f6f6f70\(%eax\) -[ ]*[a-f0-9]+: e0 90 [ ]*loopne (0x)?260.* -[ ]*[a-f0-9]+: e1 90 [ ]*loope (0x)?262.* -[ ]*[a-f0-9]+: e2 90 [ ]*loop (0x)?264.* -[ ]*[a-f0-9]+: e3 90 [ ]*jecxz (0x)?266.* +[ ]*[a-f0-9]+: e0 90 [ ]*loopne .* +[ ]*[a-f0-9]+: e1 90 [ ]*loope .* +[ ]*[a-f0-9]+: e2 90 [ ]*loop .* +[ ]*[a-f0-9]+: e3 90 [ ]*jecxz .* [ ]*[a-f0-9]+: e4 90 [ ]*in \$0x90,%al [ ]*[a-f0-9]+: e5 90 [ ]*in \$0x90,%eax [ ]*[a-f0-9]+: e6 90 [ ]*out %al,\$0x90 [ ]*[a-f0-9]+: e7 90 [ ]*out %eax,\$0x90 -[ ]*[a-f0-9]+: e8 90 90 90 90 [ ]*call (0x)?90909373.* -[ ]*[a-f0-9]+: e9 90 90 90 90 [ ]*jmp (0x)?90909378.* +[ ]*[a-f0-9]+: e8 90 90 90 90 [ ]*call .* +[ ]*[a-f0-9]+: e9 90 90 90 90 [ ]*jmp .* [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 [ ]*ljmp \$0x9090,\$0x90909090 -[ ]*[a-f0-9]+: eb 90 [ ]*jmp (0x)?281.* +[ ]*[a-f0-9]+: eb 90 [ ]*jmp .* [ ]*[a-f0-9]+: ec [ ]*in \(%dx\),%al [ ]*[a-f0-9]+: ed [ ]*in \(%dx\),%eax [ ]*[a-f0-9]+: ee [ ]*out %al,\(%dx\) @@ -306,22 +304,22 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 77 [ ]*emms [ ]*[a-f0-9]+: 0f 7e 90 90 90 90 90 [ ]*movd %mm2,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f 7f 90 90 90 90 90 [ ]*movq %mm2,-0x6f6f6f70\(%eax\) -[ ]*[a-f0-9]+: 0f 80 90 90 90 90 [ ]*jo (0x)?909094e6.* -[ ]*[a-f0-9]+: 0f 81 90 90 90 90 [ ]*jno (0x)?909094ec.* -[ ]*[a-f0-9]+: 0f 82 90 90 90 90 [ ]*jb (0x)?909094f2.* -[ ]*[a-f0-9]+: 0f 83 90 90 90 90 [ ]*jae (0x)?909094f8.* -[ ]*[a-f0-9]+: 0f 84 90 90 90 90 [ ]*je (0x)?909094fe.* -[ ]*[a-f0-9]+: 0f 85 90 90 90 90 [ ]*jne (0x)?90909504.* -[ ]*[a-f0-9]+: 0f 86 90 90 90 90 [ ]*jbe (0x)?9090950a.* -[ ]*[a-f0-9]+: 0f 87 90 90 90 90 [ ]*ja (0x)?90909510.* -[ ]*[a-f0-9]+: 0f 88 90 90 90 90 [ ]*js (0x)?90909516.* -[ ]*[a-f0-9]+: 0f 89 90 90 90 90 [ ]*jns (0x)?9090951c.* -[ ]*[a-f0-9]+: 0f 8a 90 90 90 90 [ ]*jp (0x)?90909522.* -[ ]*[a-f0-9]+: 0f 8b 90 90 90 90 [ ]*jnp (0x)?90909528.* -[ ]*[a-f0-9]+: 0f 8c 90 90 90 90 [ ]*jl (0x)?9090952e.* -[ ]*[a-f0-9]+: 0f 8d 90 90 90 90 [ ]*jge (0x)?90909534.* -[ ]*[a-f0-9]+: 0f 8e 90 90 90 90 [ ]*jle (0x)?9090953a.* -[ ]*[a-f0-9]+: 0f 8f 90 90 90 90 [ ]*jg (0x)?90909540.* +[ ]*[a-f0-9]+: 0f 80 90 90 90 90 [ ]*jo .* +[ ]*[a-f0-9]+: 0f 81 90 90 90 90 [ ]*jno .* +[ ]*[a-f0-9]+: 0f 82 90 90 90 90 [ ]*jb .* +[ ]*[a-f0-9]+: 0f 83 90 90 90 90 [ ]*jae .* +[ ]*[a-f0-9]+: 0f 84 90 90 90 90 [ ]*je .* +[ ]*[a-f0-9]+: 0f 85 90 90 90 90 [ ]*jne .* +[ ]*[a-f0-9]+: 0f 86 90 90 90 90 [ ]*jbe .* +[ ]*[a-f0-9]+: 0f 87 90 90 90 90 [ ]*ja .* +[ ]*[a-f0-9]+: 0f 88 90 90 90 90 [ ]*js .* +[ ]*[a-f0-9]+: 0f 89 90 90 90 90 [ ]*jns .* +[ ]*[a-f0-9]+: 0f 8a 90 90 90 90 [ ]*jp .* +[ ]*[a-f0-9]+: 0f 8b 90 90 90 90 [ ]*jnp .* +[ ]*[a-f0-9]+: 0f 8c 90 90 90 90 [ ]*jl .* +[ ]*[a-f0-9]+: 0f 8d 90 90 90 90 [ ]*jge .* +[ ]*[a-f0-9]+: 0f 8e 90 90 90 90 [ ]*jle .* +[ ]*[a-f0-9]+: 0f 8f 90 90 90 90 [ ]*jg .* [ ]*[a-f0-9]+: 0f 90 80 90 90 90 90 [ ]*seto -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f 91 80 90 90 90 90 [ ]*setno -0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 0f 92 80 90 90 90 90 [ ]*setb -0x6f6f6f70\(%eax\) @@ -523,14 +521,12 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 c9 [ ]*leavew [ ]*[a-f0-9]+: 66 ca 90 90 [ ]*lretw \$0x9090 [ ]*[a-f0-9]+: 66 cb [ ]*lretw -[ ]*[a-f0-9]+: 66 ca 90 90 [ ]*lretw \$0x9090 -[ ]*[a-f0-9]+: 66 cb [ ]*lretw [ ]*[a-f0-9]+: 66 cf [ ]*iretw [ ]*[a-f0-9]+: 66 d1 90 90 90 90 90 [ ]*rclw \$1,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 66 d3 90 90 90 90 90 [ ]*rclw %cl,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 66 e5 90 [ ]*in \$0x90,%ax [ ]*[a-f0-9]+: 66 e7 90 [ ]*out %ax,\$0x90 -[ ]*[a-f0-9]+: 66 e8 8f 90 [ ]*callw (0x)?9922.* +[ ]*[a-f0-9]+: 66 e8 8f 90 [ ]*callw .* [ ]*[a-f0-9]+: 66 ea 90 90 90 90 [ ]*ljmpw \$0x9090,\$0x9090 [ ]*[a-f0-9]+: 66 ed [ ]*in \(%dx\),%ax [ ]*[a-f0-9]+: 66 ef [ ]*out %ax,\(%dx\) @@ -584,15 +580,15 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c3 [ ]*ret [a-f0-9]+ : -[ ]*[a-f0-9]+: e8 f9 ff ff ff [ ]*call 9d9 -[ ]*[a-f0-9]+: e8 f5 ff ff ff [ ]*call 9da +[ ]*[a-f0-9]+: e8 f9 ff ff ff [ ]*call .* +[ ]*[a-f0-9]+: e8 f5 ff ff ff [ ]*call .* [ ]*[a-f0-9]+: dd 1c d0 [ ]*fstpl \(%eax,%edx,8\) [ ]*[a-f0-9]+: b9 00 00 00 00 [ ]*mov \$0x0,%ecx [ ]*[a-f0-9]+: 88 04 16 [ ]*mov %al,\(%esi,%edx,1\) [ ]*[a-f0-9]+: 88 04 32 [ ]*mov %al,\(%edx,%esi,1\) [ ]*[a-f0-9]+: 88 04 56 [ ]*mov %al,\(%esi,%edx,2\) [ ]*[a-f0-9]+: 88 04 56 [ ]*mov %al,\(%esi,%edx,2\) -[ ]*[a-f0-9]+: eb 0c [ ]*jmp a07 +[ ]*[a-f0-9]+: eb 0c [ ]*jmp .* [ ]*[a-f0-9]+: 6c [ ]*insb \(%dx\),%es:\(%edi\) [ ]*[a-f0-9]+: 66 0f c1 90 90 90 90 90 [ ]*xadd %dx,-0x6f6f6f70\(%eax\) [ ]*[a-f0-9]+: 83 e0 f8 [ ]*and \$0xfffffff8,%eax @@ -608,8 +604,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2f [ ]*das [ ]*[a-f0-9]+: ea 90 90 90 90 90 90 [ ]*ljmp \$0x9090,\$0x90909090 [ ]*[a-f0-9]+: 66 a5 [ ]*movsw %ds:\(%esi\),%es:\(%edi\) -[ ]*[a-f0-9]+: 70 90 [ ]*jo 9be -[ ]*[a-f0-9]+: 75 fe [ ]*jne a2e +[ ]*[a-f0-9]+: 70 90 [ ]*jo .* +[ ]*[a-f0-9]+: 75 fe [ ]*jne .* [ ]*[a-f0-9]+: 0f 6f 35 28 00 00 00 [ ]*movq 0x28,%mm6 [ ]*[a-f0-9]+: 03 3c c3 [ ]*add \(%ebx,%eax,8\),%edi [ ]*[a-f0-9]+: 0f 6e 44 c3 04 [ ]*movd 0x4\(%ebx,%eax,8\),%mm0 @@ -622,8 +618,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 66 8b 84 43 00 40 00 00 [ ]*mov 0x4000\(%ebx,%eax,2\),%ax [ ]*[a-f0-9]+: ff e0 [ ]*jmp \*%eax [ ]*[a-f0-9]+: ff 20 [ ]*jmp \*\(%eax\) -[ ]*[a-f0-9]+: ff 25 db 09 00 00 [ ]*jmp \*0x9db -[ ]*[a-f0-9]+: e9 5b ff ff ff [ ]*jmp 9db +[ ]*[a-f0-9]+: ff 25 .. .. 00 00 [ ]*jmp \*.* +[ ]*[a-f0-9]+: e9 5b ff ff ff [ ]*jmp .* [ ]*[a-f0-9]+: b8 12 00 00 00 [ ]*mov \$0x12,%eax [ ]*[a-f0-9]+: 25 ff ff fb ff [ ]*and \$0xfffbffff,%eax [ ]*[a-f0-9]+: 25 ff ff fb ff [ ]*and \$0xfffbffff,%eax diff --git a/gas/testsuite/gas/i386/intel.s b/gas/testsuite/gas/i386/intel.s index 9f816d95f81..ebf9bc261c0 100644 --- a/gas/testsuite/gas/i386/intel.s +++ b/gas/testsuite/gas/i386/intel.s @@ -195,8 +195,6 @@ foo: leave retf 0x9090 retf - lret 0x9090 - lret int3 int 0x90 into @@ -517,8 +515,6 @@ foo: leavew retfw 0x9090 retfw - lretw 0x9090 - lretw iretw rcl word ptr 0x90909090[eax] rcl word ptr 0x90909090[eax], cl diff --git a/gas/testsuite/gas/i386/intel16.d b/gas/testsuite/gas/i386/intel16.d index 4adc41f27d1..2bdc445b023 100644 --- a/gas/testsuite/gas/i386/intel16.d +++ b/gas/testsuite/gas/i386/intel16.d @@ -1,5 +1,6 @@ #objdump: -dw -mi8086 #name: i386 intel16 +#warning_output: intel16.e .*: +file format .* diff --git a/gas/testsuite/gas/i386/intel16.e b/gas/testsuite/gas/i386/intel16.e new file mode 100644 index 00000000000..614d00be061 --- /dev/null +++ b/gas/testsuite/gas/i386/intel16.e @@ -0,0 +1,10 @@ +.*: Assembler messages: +.*:21: Warning: .*suffix.*`not' +.*:21: Warning: NOTE: .*deprecated.* +.*:22: Warning: .*suffix.*`not' +.*:24: Warning: .*suffix.*`nop' +.*:25: Warning: .*suffix.*`nop' +.*:27: Warning: .*suffix.*`add' +.*:28: Warning: .*suffix.*`add' +.*:30: Warning: .*suffix.*`mov' +.*:31: Warning: .*suffix.*`mov' diff --git a/gas/testsuite/gas/i386/simd-intel.d b/gas/testsuite/gas/i386/simd-intel.d index 5b72fd7ad4c..b8a5c83eea3 100644 --- a/gas/testsuite/gas/i386/simd-intel.d +++ b/gas/testsuite/gas/i386/simd-intel.d @@ -188,13 +188,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f2 0f c2 38 10 cmpsd xmm7,QWORD PTR \[eax\],0x10 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss xmm1,eax [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd xmm1,eax -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss xmm1,eax -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd xmm1,eax [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd xmm1,DWORD PTR \[eax\] -[ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss xmm1,DWORD PTR \[eax\] -[ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd xmm1,DWORD PTR \[eax\] [ ]*[a-f0-9]+: 0f 2c 00 cvttps2pi mm0,QWORD PTR \[eax\] #pass diff --git a/gas/testsuite/gas/i386/simd-suffix.d b/gas/testsuite/gas/i386/simd-suffix.d index ad78f76cfaf..8dbb6e7f221 100644 --- a/gas/testsuite/gas/i386/simd-suffix.d +++ b/gas/testsuite/gas/i386/simd-suffix.d @@ -188,12 +188,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f2 0f c2 38 10 cmpsd \$0x10,\(%eax\),%xmm7 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ssl %eax,%xmm1 [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sdl %eax,%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ssl %eax,%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sdl %eax,%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ssl \(%eax\),%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ssl \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sdl \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sdl \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ssl \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sdl \(%eax\),%xmm1 +[ ]*[a-f0-9]+: 0f 2c 00 cvttps2pi \(%eax\),%mm0 #pass diff --git a/gas/testsuite/gas/i386/simd.d b/gas/testsuite/gas/i386/simd.d index 4e709500863..e56767b3d47 100644 --- a/gas/testsuite/gas/i386/simd.d +++ b/gas/testsuite/gas/i386/simd.d @@ -187,13 +187,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f2 0f c2 38 10 cmpsd \$0x10,\(%eax\),%xmm7 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: 0f 2c 00 cvttps2pi \(%eax\),%mm0 #pass diff --git a/gas/testsuite/gas/i386/simd.s b/gas/testsuite/gas/i386/simd.s index 75cd440f2cf..5f38e27fcfc 100644 --- a/gas/testsuite/gas/i386/simd.s +++ b/gas/testsuite/gas/i386/simd.s @@ -193,12 +193,8 @@ cmpsd xmm6,xmm7,0x10 cmpsd xmm7,QWORD PTR [eax],0x10 cvtsi2ss xmm1,eax cvtsi2sd xmm1,eax -cvtsi2ssd xmm1,eax -cvtsi2sdd xmm1,eax cvtsi2ss xmm1,DWORD PTR [eax] cvtsi2ss xmm1,[eax] cvtsi2sd xmm1,DWORD PTR [eax] cvtsi2sd xmm1,[eax] -cvtsi2ssd xmm1,DWORD PTR [eax] -cvtsi2sdd xmm1,DWORD PTR [eax] cvttps2pi mm0,QWORD PTR[eax] diff --git a/gas/testsuite/gas/i386/simd16.d b/gas/testsuite/gas/i386/simd16.d index 5900c77d403..59b90b7f8e1 100644 --- a/gas/testsuite/gas/i386/simd16.d +++ b/gas/testsuite/gas/i386/simd16.d @@ -125,13 +125,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 67 f2 0f c2 38 10 cmpsd \$0x10,\(%eax\),%xmm7 [ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 [ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 -[ ]*[a-f0-9]+: f3 0f 2a c8 cvtsi2ss %eax,%xmm1 -[ ]*[a-f0-9]+: f2 0f 2a c8 cvtsi2sd %eax,%xmm1 [ ]*[a-f0-9]+: 67 f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 -[ ]*[a-f0-9]+: 67 f3 0f 2a 08 cvtsi2ss \(%eax\),%xmm1 -[ ]*[a-f0-9]+: 67 f2 0f 2a 08 cvtsi2sd \(%eax\),%xmm1 [ ]*[a-f0-9]+: 67 0f 2c 00 cvttps2pi \(%eax\),%mm0 #pass diff --git a/gas/testsuite/gas/i386/x86-64-avx-intel.d b/gas/testsuite/gas/i386/x86-64-avx-intel.d index dd7cbd6a62c..dadf711ffd4 100644 --- a/gas/testsuite/gas/i386/x86-64-avx-intel.d +++ b/gas/testsuite/gas/i386/x86-64-avx-intel.d @@ -2855,10 +2855,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 fb 2c 09 vcvttsd2si rcx,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 db 2a f1 vcvtsi2sd xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 da 2a f1 vcvtsi2ss xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e3 d9 22 f1 07 vpinsrq xmm6,xmm4,rcx,0x7 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq xmm6,xmm4,QWORD PTR \[rcx\],0x7 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq xmm6,xmm4,QWORD PTR \[rcx\],0x7 diff --git a/gas/testsuite/gas/i386/x86-64-avx-scalar-intel.d b/gas/testsuite/gas/i386/x86-64-avx-scalar-intel.d index c87dd52dc04..54944ac66e9 100644 --- a/gas/testsuite/gas/i386/x86-64-avx-scalar-intel.d +++ b/gas/testsuite/gas/i386/x86-64-avx-scalar-intel.d @@ -263,10 +263,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 ff 2c 09 vcvttsd2si rcx,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 df 2a f1 vcvtsi2sd xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sd xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c4 e1 de 2a f1 vcvtsi2ss xmm6,xmm4,rcx [ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] -[ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ss xmm6,xmm4,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c5 cf c2 d4 07 vcmpordsd xmm2,xmm6,xmm4 [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd xmm2,xmm6,QWORD PTR \[rcx\] [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd xmm2,xmm6,QWORD PTR \[rcx\] diff --git a/gas/testsuite/gas/i386/x86-64-avx-scalar.d b/gas/testsuite/gas/i386/x86-64-avx-scalar.d index 5b2244d796f..5ed10d6dcf7 100644 --- a/gas/testsuite/gas/i386/x86-64-avx-scalar.d +++ b/gas/testsuite/gas/i386/x86-64-avx-scalar.d @@ -262,10 +262,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 ff 2c 09 vcvttsd2si \(%rcx\),%rcx [ ]*[a-f0-9]+: c4 e1 df 2a f1 vcvtsi2sd %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 df 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 de 2a f1 vcvtsi2ss %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 de 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c5 cf c2 d4 07 vcmpordsd %xmm4,%xmm6,%xmm2 [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd \(%rcx\),%xmm6,%xmm2 [ ]*[a-f0-9]+: c5 cf c2 11 07 vcmpordsd \(%rcx\),%xmm6,%xmm2 diff --git a/gas/testsuite/gas/i386/x86-64-avx-scalar.s b/gas/testsuite/gas/i386/x86-64-avx-scalar.s index aa3f2773b2d..36efd459c05 100644 --- a/gas/testsuite/gas/i386/x86-64-avx-scalar.s +++ b/gas/testsuite/gas/i386/x86-64-avx-scalar.s @@ -307,12 +307,10 @@ _start: vcvttsd2si rcx,[rcx] # Tests for op regq/mem64, xmm, xmm - vcvtsi2sdq xmm6,xmm4,rcx - vcvtsi2sdq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2sdq xmm6,xmm4,[rcx] - vcvtsi2ssq xmm6,xmm4,rcx - vcvtsi2ssq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2ssq xmm6,xmm4,[rcx] + vcvtsi2sd xmm6,xmm4,rcx + vcvtsi2sd xmm6,xmm4,QWORD PTR [rcx] + vcvtsi2ss xmm6,xmm4,rcx + vcvtsi2ss xmm6,xmm4,QWORD PTR [rcx] # Tests for op imm8, xmm/mem64, xmm, xmm vcmpsd xmm2,xmm6,xmm4,7 diff --git a/gas/testsuite/gas/i386/x86-64-avx.d b/gas/testsuite/gas/i386/x86-64-avx.d index 336f87957a8..80984cd80d3 100644 --- a/gas/testsuite/gas/i386/x86-64-avx.d +++ b/gas/testsuite/gas/i386/x86-64-avx.d @@ -2854,10 +2854,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: c4 e1 fb 2c 09 vcvttsd2si \(%rcx\),%rcx [ ]*[a-f0-9]+: c4 e1 db 2a f1 vcvtsi2sd %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 db 2a 31 vcvtsi2sdq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 da 2a f1 vcvtsi2ss %rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 -[ ]*[a-f0-9]+: c4 e1 da 2a 31 vcvtsi2ssq \(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e3 d9 22 f1 07 vpinsrq \$0x7,%rcx,%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq \$0x7,\(%rcx\),%xmm4,%xmm6 [ ]*[a-f0-9]+: c4 e3 d9 22 31 07 vpinsrq \$0x7,\(%rcx\),%xmm4,%xmm6 diff --git a/gas/testsuite/gas/i386/x86-64-avx.s b/gas/testsuite/gas/i386/x86-64-avx.s index c7355dcaa8b..d84482e6897 100644 --- a/gas/testsuite/gas/i386/x86-64-avx.s +++ b/gas/testsuite/gas/i386/x86-64-avx.s @@ -3069,12 +3069,10 @@ _start: vcvttsd2si rcx,[rcx] # Tests for op regq/mem64, xmm, xmm - vcvtsi2sdq xmm6,xmm4,rcx - vcvtsi2sdq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2sdq xmm6,xmm4,[rcx] - vcvtsi2ssq xmm6,xmm4,rcx - vcvtsi2ssq xmm6,xmm4,QWORD PTR [rcx] - vcvtsi2ssq xmm6,xmm4,[rcx] + vcvtsi2sd xmm6,xmm4,rcx + vcvtsi2sd xmm6,xmm4,QWORD PTR [rcx] + vcvtsi2ss xmm6,xmm4,rcx + vcvtsi2ss xmm6,xmm4,QWORD PTR [rcx] # Tests for op imm8, regq/mem64, xmm, xmm vpinsrq xmm6,xmm4,rcx,7 diff --git a/gas/testsuite/gas/i386/x86-64-branch.d b/gas/testsuite/gas/i386/x86-64-branch.d index aee4bf83b42..4ef48acd4ca 100644 --- a/gas/testsuite/gas/i386/x86-64-branch.d +++ b/gas/testsuite/gas/i386/x86-64-branch.d @@ -28,13 +28,9 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 2e 74 00[ ]+je,pn +[0-9a-fx]+ <.*> [0-9a-f]+