diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-04-15 08:38:23 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-04-15 08:38:36 -0700 |
commit | ae1d38437284b31d5a1c604bcf391d4543be00a5 (patch) | |
tree | 1a7ec14d5cbdfdd8967109fb45dcca742ee81740 /gas | |
parent | 7c31c22f1a18d91e104f1ffd5df8895d2459fe48 (diff) | |
download | fsf-binutils-gdb-ae1d38437284b31d5a1c604bcf391d4543be00a5.zip fsf-binutils-gdb-ae1d38437284b31d5a1c604bcf391d4543be00a5.tar.gz fsf-binutils-gdb-ae1d38437284b31d5a1c604bcf391d4543be00a5.tar.bz2 |
x86: Allow 32-bit registers for tpause and umwait
Since only the first 32 bits of input operand are used for tpause and
umwait, the REX.W bit is skipped. Both 32-bit registers and 64-bit
registers are allowed.
gas/
* testsuite/gas/i386/x86-64-waitpkg.s: Add 32-bit registers
tests for tpause and umwait.
* testsuite/gas/i386/x86-64-waitpkg-intel.d: Updated.
* testsuite/gas/i386/x86-64-waitpkg.d: Likewise.
opcodes/
* i386-dis.c (prefix_table): Replace Em with Edq on tpause and
umwait.
* i386-opc.tbl: Allow 32-bit registers for tpause and umwait in
64-bit mode.
* i386-tbl.h: Regenerated.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-waitpkg-intel.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-waitpkg.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-waitpkg.s | 4 |
4 files changed, 27 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d87d3e7..ad99365 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2018-04-15 H.J. Lu <hongjiu.lu@intel.com> + + * testsuite/gas/i386/x86-64-waitpkg.s: Add 32-bit registers + tests for tpause and umwait. + * testsuite/gas/i386/x86-64-waitpkg-intel.d: Updated. + * testsuite/gas/i386/x86-64-waitpkg.d: Likewise. + 2018-04-12 John Darrington <john@darrington.wattle.id.au> * as.c (main): Fail if the output is the same as one of the input diff --git a/gas/testsuite/gas/i386/x86-64-waitpkg-intel.d b/gas/testsuite/gas/i386/x86-64-waitpkg-intel.d index e70be23..e0387dd 100644 --- a/gas/testsuite/gas/i386/x86-64-waitpkg-intel.d +++ b/gas/testsuite/gas/i386/x86-64-waitpkg-intel.d @@ -12,8 +12,12 @@ Disassembly of section \.text: [ ]*[a-f0-9]+:[ ]*f3 0f ae f0[ ]*umonitor rax [ ]*[a-f0-9]+:[ ]*f3 41 0f ae f2[ ]*umonitor r10 [ ]*[a-f0-9]+:[ ]*67 f3 41 0f ae f2[ ]*umonitor r10d -[ ]*[a-f0-9]+:[ ]*f2 0f ae f1[ ]*umwait rcx -[ ]*[a-f0-9]+:[ ]*f2 41 0f ae f2[ ]*umwait r10 -[ ]*[a-f0-9]+:[ ]*66 0f ae f1[ ]*tpause rcx -[ ]*[a-f0-9]+:[ ]*66 41 0f ae f2[ ]*tpause r10 +[ ]*[a-f0-9]+:[ ]*f2 0f ae f1[ ]*umwait ecx +[ ]*[a-f0-9]+:[ ]*f2 0f ae f1[ ]*umwait ecx +[ ]*[a-f0-9]+:[ ]*f2 41 0f ae f2[ ]*umwait r10d +[ ]*[a-f0-9]+:[ ]*f2 41 0f ae f2[ ]*umwait r10d +[ ]*[a-f0-9]+:[ ]*66 0f ae f1[ ]*tpause ecx +[ ]*[a-f0-9]+:[ ]*66 0f ae f1[ ]*tpause ecx +[ ]*[a-f0-9]+:[ ]*66 41 0f ae f2[ ]*tpause r10d +[ ]*[a-f0-9]+:[ ]*66 41 0f ae f2[ ]*tpause r10d #pass diff --git a/gas/testsuite/gas/i386/x86-64-waitpkg.d b/gas/testsuite/gas/i386/x86-64-waitpkg.d index 0930aa2..a10a8cd 100644 --- a/gas/testsuite/gas/i386/x86-64-waitpkg.d +++ b/gas/testsuite/gas/i386/x86-64-waitpkg.d @@ -12,8 +12,12 @@ Disassembly of section \.text: [ ]*[a-f0-9]+:[ ]*f3 0f ae f0[ ]*umonitor %rax [ ]*[a-f0-9]+:[ ]*f3 41 0f ae f2[ ]*umonitor %r10 [ ]*[a-f0-9]+:[ ]*67 f3 41 0f ae f2[ ]*umonitor %r10d -[ ]*[a-f0-9]+:[ ]*f2 0f ae f1[ ]*umwait %rcx -[ ]*[a-f0-9]+:[ ]*f2 41 0f ae f2[ ]*umwait %r10 -[ ]*[a-f0-9]+:[ ]*66 0f ae f1[ ]*tpause %rcx -[ ]*[a-f0-9]+:[ ]*66 41 0f ae f2[ ]*tpause %r10 +[ ]*[a-f0-9]+:[ ]*f2 0f ae f1[ ]*umwait %ecx +[ ]*[a-f0-9]+:[ ]*f2 0f ae f1[ ]*umwait %ecx +[ ]*[a-f0-9]+:[ ]*f2 41 0f ae f2[ ]*umwait %r10d +[ ]*[a-f0-9]+:[ ]*f2 41 0f ae f2[ ]*umwait %r10d +[ ]*[a-f0-9]+:[ ]*66 0f ae f1[ ]*tpause %ecx +[ ]*[a-f0-9]+:[ ]*66 0f ae f1[ ]*tpause %ecx +[ ]*[a-f0-9]+:[ ]*66 41 0f ae f2[ ]*tpause %r10d +[ ]*[a-f0-9]+:[ ]*66 41 0f ae f2[ ]*tpause %r10d #pass diff --git a/gas/testsuite/gas/i386/x86-64-waitpkg.s b/gas/testsuite/gas/i386/x86-64-waitpkg.s index 7899c39..9c64848 100644 --- a/gas/testsuite/gas/i386/x86-64-waitpkg.s +++ b/gas/testsuite/gas/i386/x86-64-waitpkg.s @@ -5,7 +5,11 @@ _start: umonitor %rax umonitor %r10 umonitor %r10d + umwait %ecx umwait %rcx umwait %r10 + umwait %r10d + tpause %ecx tpause %rcx tpause %r10 + tpause %r10d |