mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
x86/Intel: don't accept malformed EXTRQ / INSERTQ
Operand swapping was mistakenly suppressed when the first two operands were immediate ones, not taking into account overall operand count. This way EXTRQ / INSERTQ would have been accepted also with kind-of-AT&T operand order. For the testcase being extended, in order to not move around "GAS LISTING" expectations, suppress pagination.
This commit is contained in:
@ -4885,7 +4885,8 @@ md_assemble (char *line)
|
|||||||
&& !startswith (mnemonic, "rmp")
|
&& !startswith (mnemonic, "rmp")
|
||||||
&& (strcmp (mnemonic, "tpause") != 0)
|
&& (strcmp (mnemonic, "tpause") != 0)
|
||||||
&& (strcmp (mnemonic, "umwait") != 0)
|
&& (strcmp (mnemonic, "umwait") != 0)
|
||||||
&& !(operand_type_check (i.types[0], imm)
|
&& !(i.operands == 2
|
||||||
|
&& operand_type_check (i.types[0], imm)
|
||||||
&& operand_type_check (i.types[1], imm)))
|
&& operand_type_check (i.types[1], imm)))
|
||||||
swap_operands ();
|
swap_operands ();
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ if [gas_32_check] then {
|
|||||||
|
|
||||||
run_list_test "float" "-al -mmnemonic=att"
|
run_list_test "float" "-al -mmnemonic=att"
|
||||||
run_list_test "general" "-al --listing-lhs-width=2"
|
run_list_test "general" "-al --listing-lhs-width=2"
|
||||||
run_list_test "inval" "-al"
|
run_list_test "inval" "-aln"
|
||||||
run_list_test "inval-16" "-al"
|
run_list_test "inval-16" "-al"
|
||||||
run_list_test "segment" "-al"
|
run_list_test "segment" "-al"
|
||||||
run_list_test "inval-seg" "-al"
|
run_list_test "inval-seg" "-al"
|
||||||
|
@ -87,19 +87,18 @@
|
|||||||
.*:97: Error: .*shl.*
|
.*:97: Error: .*shl.*
|
||||||
.*:98: Error: .*rol.*
|
.*:98: Error: .*rol.*
|
||||||
.*:99: Error: .*rcl.*
|
.*:99: Error: .*rcl.*
|
||||||
.*:102: Error: .*
|
.*:101: Error: .*extrq.*
|
||||||
.*:104: Error: .*
|
.*:102: Error: .*insertq.*
|
||||||
.*:105: Error: .*
|
.*:105: Error: .*
|
||||||
.*:106: Error: .*
|
.*:107: Error: .*
|
||||||
.*:108: Error: .*
|
.*:108: Error: .*
|
||||||
.*:109: Error: .*
|
.*:109: Error: .*
|
||||||
.*:110: Error: .*
|
.*:111: Error: .*
|
||||||
.*:112: Error: .*
|
.*:112: Error: .*
|
||||||
.*:113: Error: .*
|
.*:113: Error: .*
|
||||||
.*:114: Error: .*
|
.*:115: Error: .*
|
||||||
GAS LISTING .*
|
.*:116: Error: .*
|
||||||
|
.*:117: Error: .*
|
||||||
|
|
||||||
[ ]*1[ ]+\.text
|
[ ]*1[ ]+\.text
|
||||||
[ ]*2[ ]+\.allow_index_reg
|
[ ]*2[ ]+\.allow_index_reg
|
||||||
[ ]*3[ ]+\# All the following should be illegal
|
[ ]*3[ ]+\# All the following should be illegal
|
||||||
@ -157,9 +156,6 @@ GAS LISTING .*
|
|||||||
[ ]*55[ ]+fnstsw %al
|
[ ]*55[ ]+fnstsw %al
|
||||||
[ ]*56[ ]+fstsw %eax
|
[ ]*56[ ]+fstsw %eax
|
||||||
[ ]*57[ ]+fstsw %al
|
[ ]*57[ ]+fstsw %al
|
||||||
GAS LISTING .*
|
|
||||||
|
|
||||||
|
|
||||||
[ ]*58[ ]+
|
[ ]*58[ ]+
|
||||||
[ ]*59[ ]+movnti %ax, \(%eax\)
|
[ ]*59[ ]+movnti %ax, \(%eax\)
|
||||||
[ ]*60[ ]+movntiw %ax, \(%eax\)
|
[ ]*60[ ]+movntiw %ax, \(%eax\)
|
||||||
@ -203,6 +199,9 @@ GAS LISTING .*
|
|||||||
[ ]*[1-9][0-9]*[ ]+rol \[ecx\], 2
|
[ ]*[1-9][0-9]*[ ]+rol \[ecx\], 2
|
||||||
[ ]*[1-9][0-9]*[ ]+rcl \[edx\], cl
|
[ ]*[1-9][0-9]*[ ]+rcl \[edx\], cl
|
||||||
[ ]*[1-9][0-9]*[ ]+
|
[ ]*[1-9][0-9]*[ ]+
|
||||||
|
[ ]*[1-9][0-9]*[ ]+extrq 1, 2, xmm3
|
||||||
|
[ ]*[1-9][0-9]*[ ]+insertq 1, 2, xmm3, xmm4
|
||||||
|
[ ]*[1-9][0-9]*[ ]+
|
||||||
[ ]*[1-9][0-9]*[ ]+\.att_syntax prefix
|
[ ]*[1-9][0-9]*[ ]+\.att_syntax prefix
|
||||||
[ ]*[1-9][0-9]*[ ]+movsd \(%esi\), %ss:\(%edi\), %ss:\(%eax\)
|
[ ]*[1-9][0-9]*[ ]+movsd \(%esi\), %ss:\(%edi\), %ss:\(%eax\)
|
||||||
[ ]*[1-9][0-9]*[ ]+
|
[ ]*[1-9][0-9]*[ ]+
|
||||||
@ -217,6 +216,4 @@ GAS LISTING .*
|
|||||||
[ ]*[1-9][0-9]*[ ]+inb %dx, %ax
|
[ ]*[1-9][0-9]*[ ]+inb %dx, %ax
|
||||||
[ ]*[1-9][0-9]*[ ]+outb %ax, %dx
|
[ ]*[1-9][0-9]*[ ]+outb %ax, %dx
|
||||||
[ ]*[1-9][0-9]*[ ]+movb %ax, %bx
|
[ ]*[1-9][0-9]*[ ]+movb %ax, %bx
|
||||||
GAS LISTING .*
|
#pass
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,6 +98,9 @@ movnti word ptr [eax], ax
|
|||||||
rol [ecx], 2
|
rol [ecx], 2
|
||||||
rcl [edx], cl
|
rcl [edx], cl
|
||||||
|
|
||||||
|
extrq 1, 2, xmm3
|
||||||
|
insertq 1, 2, xmm3, xmm4
|
||||||
|
|
||||||
.att_syntax prefix
|
.att_syntax prefix
|
||||||
movsd (%esi), %ss:(%edi), %ss:(%eax)
|
movsd (%esi), %ss:(%edi), %ss:(%eax)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user