diff options
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/hle-intel.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/hle.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/hle.s | 3 |
5 files changed, 25 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 6abb853..ace9839 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,13 @@ 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. * testsuite/gas/i386/opts.d, testsuite/gas/i386/opts-intel.d, testsuite/gas/i386/sse2avx-opts.d, diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 8905de4..1a05f48 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5427,6 +5427,14 @@ match_template (char mnem_suffix) && 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) diff --git a/gas/testsuite/gas/i386/hle-intel.d b/gas/testsuite/gas/i386/hle-intel.d index 0caf954..696e872 100644 --- a/gas/testsuite/gas/i386/hle-intel.d +++ b/gas/testsuite/gas/i386/hle-intel.d @@ -321,6 +321,7 @@ Disassembly of section .text: [ ]*[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 @@ -372,6 +373,7 @@ Disassembly of section .text: [ ]*[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 @@ -423,6 +425,7 @@ Disassembly of section .text: [ ]*[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 diff --git a/gas/testsuite/gas/i386/hle.d b/gas/testsuite/gas/i386/hle.d index bf7bdcf..96b620f 100644 --- a/gas/testsuite/gas/i386/hle.d +++ b/gas/testsuite/gas/i386/hle.d @@ -320,6 +320,7 @@ Disassembly of section .text: [ ]*[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\) @@ -371,6 +372,7 @@ Disassembly of section .text: [ ]*[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\) @@ -422,6 +424,7 @@ Disassembly of section .text: [ ]*[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\) diff --git a/gas/testsuite/gas/i386/hle.s b/gas/testsuite/gas/i386/hle.s index 1fffa9e..1beddc4 100644 --- a/gas/testsuite/gas/i386/hle.s +++ b/gas/testsuite/gas/i386/hle.s @@ -331,6 +331,7 @@ _start: .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) @@ -385,6 +386,7 @@ _start: .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) @@ -439,6 +441,7 @@ _start: .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) |