+2018-03-22 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (match_template): Special case base opcode
+ 0xa0 with HLE prefix.
+ * testsuite/gas/i386/hle.s: Add mov-accumulator-to-disp cases.
+ * testsuite/gas/i386/hle.d, testsuite/gas/i386/hle-intel.d:
+ Adjust expectations.
+
2018-03-22 Jan Beulich <jbeulich@suse.com>
* testsuite/gas/i386/opts.s: Add bndmov cases.
&& operand_type_equal (&i.types [0], &acc32)
&& operand_type_equal (&i.types [1], &acc32))
continue;
+ /* xrelease mov %eax, <disp> is another special case. It must not
+ match the accumulator-only encoding of mov. */
+ if (flag_code != CODE_64BIT
+ && i.hle_prefix
+ && t->base_opcode == 0xa0
+ && i.types[0].bitfield.acc
+ && operand_type_check (i.types[1], anymem))
+ continue;
/* If we want store form, we reverse direction of operands. */
if (i.dir_encoding == dir_encoding_store
&& t->opcode_modifier.d)
[ ]*[a-f0-9]+: f0 f2 20 01 lock xacquire and BYTE PTR \[ecx\],al
[ ]*[a-f0-9]+: f0 f3 20 01 lock xrelease and BYTE PTR \[ecx\],al
[ ]*[a-f0-9]+: f3 88 01 xrelease mov BYTE PTR \[ecx\],al
+[ ]*[a-f0-9]+: f3 88 05 78 56 34 12 xrelease mov BYTE PTR ds:0x12345678,al
[ ]*[a-f0-9]+: f2 f0 08 01 xacquire lock or BYTE PTR \[ecx\],al
[ ]*[a-f0-9]+: f2 f0 08 01 xacquire lock or BYTE PTR \[ecx\],al
[ ]*[a-f0-9]+: f3 f0 08 01 xrelease lock or BYTE PTR \[ecx\],al
[ ]*[a-f0-9]+: f0 f2 66 21 01 lock xacquire and WORD PTR \[ecx\],ax
[ ]*[a-f0-9]+: f0 f3 66 21 01 lock xrelease and WORD PTR \[ecx\],ax
[ ]*[a-f0-9]+: 66 f3 89 01 xrelease mov WORD PTR \[ecx\],ax
+[ ]*[a-f0-9]+: 66 f3 89 05 78 56 34 12 xrelease mov WORD PTR ds:0x12345678,ax
[ ]*[a-f0-9]+: 66 f2 f0 09 01 xacquire lock or WORD PTR \[ecx\],ax
[ ]*[a-f0-9]+: 66 f2 f0 09 01 xacquire lock or WORD PTR \[ecx\],ax
[ ]*[a-f0-9]+: 66 f3 f0 09 01 xrelease lock or WORD PTR \[ecx\],ax
[ ]*[a-f0-9]+: f0 f2 21 01 lock xacquire and DWORD PTR \[ecx\],eax
[ ]*[a-f0-9]+: f0 f3 21 01 lock xrelease and DWORD PTR \[ecx\],eax
[ ]*[a-f0-9]+: f3 89 01 xrelease mov DWORD PTR \[ecx\],eax
+[ ]*[a-f0-9]+: f3 89 05 78 56 34 12 xrelease mov DWORD PTR ds:0x12345678,eax
[ ]*[a-f0-9]+: f2 f0 09 01 xacquire lock or DWORD PTR \[ecx\],eax
[ ]*[a-f0-9]+: f2 f0 09 01 xacquire lock or DWORD PTR \[ecx\],eax
[ ]*[a-f0-9]+: f3 f0 09 01 xrelease lock or DWORD PTR \[ecx\],eax
[ ]*[a-f0-9]+: f0 f2 20 01 lock xacquire and %al,\(%ecx\)
[ ]*[a-f0-9]+: f0 f3 20 01 lock xrelease and %al,\(%ecx\)
[ ]*[a-f0-9]+: f3 88 01 xrelease mov %al,\(%ecx\)
+[ ]*[a-f0-9]+: f3 88 05 78 56 34 12 xrelease mov %al,0x12345678
[ ]*[a-f0-9]+: f2 f0 08 01 xacquire lock or %al,\(%ecx\)
[ ]*[a-f0-9]+: f2 f0 08 01 xacquire lock or %al,\(%ecx\)
[ ]*[a-f0-9]+: f3 f0 08 01 xrelease lock or %al,\(%ecx\)
[ ]*[a-f0-9]+: f0 f2 66 21 01 lock xacquire and %ax,\(%ecx\)
[ ]*[a-f0-9]+: f0 f3 66 21 01 lock xrelease and %ax,\(%ecx\)
[ ]*[a-f0-9]+: 66 f3 89 01 xrelease mov %ax,\(%ecx\)
+[ ]*[a-f0-9]+: 66 f3 89 05 78 56 34 12 xrelease mov %ax,0x12345678
[ ]*[a-f0-9]+: 66 f2 f0 09 01 xacquire lock or %ax,\(%ecx\)
[ ]*[a-f0-9]+: 66 f2 f0 09 01 xacquire lock or %ax,\(%ecx\)
[ ]*[a-f0-9]+: 66 f3 f0 09 01 xrelease lock or %ax,\(%ecx\)
[ ]*[a-f0-9]+: f0 f2 21 01 lock xacquire and %eax,\(%ecx\)
[ ]*[a-f0-9]+: f0 f3 21 01 lock xrelease and %eax,\(%ecx\)
[ ]*[a-f0-9]+: f3 89 01 xrelease mov %eax,\(%ecx\)
+[ ]*[a-f0-9]+: f3 89 05 78 56 34 12 xrelease mov %eax,0x12345678
[ ]*[a-f0-9]+: f2 f0 09 01 xacquire lock or %eax,\(%ecx\)
[ ]*[a-f0-9]+: f2 f0 09 01 xacquire lock or %eax,\(%ecx\)
[ ]*[a-f0-9]+: f3 f0 09 01 xrelease lock or %eax,\(%ecx\)
.byte 0xf0; .byte 0xf2; andb %al,(%ecx)
.byte 0xf0; .byte 0xf3; andb %al,(%ecx)
xrelease movb %al,(%ecx)
+ xrelease movb %al,0x12345678
xacquire lock orb %al,(%ecx)
lock xacquire orb %al,(%ecx)
xrelease lock orb %al,(%ecx)
.byte 0xf0; .byte 0xf2; andw %ax,(%ecx)
.byte 0xf0; .byte 0xf3; andw %ax,(%ecx)
xrelease movw %ax,(%ecx)
+ xrelease movw %ax,0x12345678
xacquire lock orw %ax,(%ecx)
lock xacquire orw %ax,(%ecx)
xrelease lock orw %ax,(%ecx)
.byte 0xf0; .byte 0xf2; andl %eax,(%ecx)
.byte 0xf0; .byte 0xf3; andl %eax,(%ecx)
xrelease movl %eax,(%ecx)
+ xrelease movl %eax,0x12345678
xacquire lock orl %eax,(%ecx)
lock xacquire orl %eax,(%ecx)
xrelease lock orl %eax,(%ecx)