From ae1d38437284b31d5a1c604bcf391d4543be00a5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 15 Apr 2018 08:38:23 -0700 Subject: 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. --- gas/ChangeLog | 7 +++++++ gas/testsuite/gas/i386/x86-64-waitpkg-intel.d | 12 ++++++++---- gas/testsuite/gas/i386/x86-64-waitpkg.d | 12 ++++++++---- gas/testsuite/gas/i386/x86-64-waitpkg.s | 4 ++++ 4 files changed, 27 insertions(+), 8 deletions(-) (limited to 'gas') 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 + + * 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 * 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 -- cgit v1.1