diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-09-22 09:38:53 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-09-22 09:38:53 -0700 |
commit | 68f34464821105e0c74a0ce16c5d26d4c3e1d20c (patch) | |
tree | d2cde5142f9aee2b2bf582bb65e7bc6d4c6180af /gas | |
parent | 20b23ee6c89b3c412f78017d777ca2d3d2937431 (diff) | |
download | binutils-68f34464821105e0c74a0ce16c5d26d4c3e1d20c.tar.gz binutils-68f34464821105e0c74a0ce16c5d26d4c3e1d20c.tar.bz2 binutils-68f34464821105e0c74a0ce16c5d26d4c3e1d20c.zip |
Ignore MOD field for control/debug register move
This patch ignores the MOD field in control/debug register move
instructions.
gas/testsuite/
* gas/i386/cdr.d: New file.
* gas/i386/cdr.s: Likewise.
* gas/i386/x86-64-cdr.d: Likewise.
* gas/i386/i386.exp: Run cdr and x86-64-cdr.
opcodes/
* i386-dis.c (MOD_0F20): Removed.
(MOD_0F21): Likewise.
(MOD_0F22): Likewise.
(MOD_0F23): Likewise.
(dis386_twobyte): Replace MOD_0F20, MOD_0F21, MOD_0F22 and
MOD_0F23 with "movZ".
(mod_table): Remove MOD_0F20, MOD_0F21, MOD_0F22 and MOD_0F23.
(OP_R): Check mod/rm byte and call OP_E_register.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/cdr.d | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/cdr.s | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-cdr.d | 14 |
5 files changed, 51 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 9bee24c6fe1..f8a85bc5389 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2014-09-22 H.J. Lu <hongjiu.lu@intel.com> + + * gas/i386/cdr.d: New file. + * gas/i386/cdr.s: Likewise. + * gas/i386/x86-64-cdr.d: Likewise. + + * gas/i386/i386.exp: Run cdr and x86-64-cdr. + 2014-09-16 Ilya Tocar <ilya.tocar@intel.com> * gas/i386/avx512dq-rcig.s: New. diff --git a/gas/testsuite/gas/i386/cdr.d b/gas/testsuite/gas/i386/cdr.d new file mode 100644 index 00000000000..b63b2a65a58 --- /dev/null +++ b/gas/testsuite/gas/i386/cdr.d @@ -0,0 +1,13 @@ +#objdump: -dw +#name: i386 control/debug register with ignored MOD field + +.*: +file format .* + +Disassembly of section .text: + +0+ <start>: +[ ]*[a-f0-9]+: 0f 22 1f mov %edi,%cr3 +[ ]*[a-f0-9]+: 0f 20 1f mov %cr3,%edi +[ ]*[a-f0-9]+: 0f 21 1f mov %db3,%edi +[ ]*[a-f0-9]+: 0f 23 1f mov %edi,%db3 +#pass diff --git a/gas/testsuite/gas/i386/cdr.s b/gas/testsuite/gas/i386/cdr.s new file mode 100644 index 00000000000..fb7c5a04d33 --- /dev/null +++ b/gas/testsuite/gas/i386/cdr.s @@ -0,0 +1,14 @@ + .text +start: + .byte 0x0f + .byte 0x22 + .byte 0x1f + .byte 0x0f + .byte 0x20 + .byte 0x1f + .byte 0x0f + .byte 0x21 + .byte 0x1f + .byte 0x0f + .byte 0x23 + .byte 0x1f diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 55fb8e66695..7549a402635 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -80,6 +80,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "padlock" run_dump_test "crx" run_list_test "cr-err" "" + run_dump_test "cdr" run_dump_test "svme" run_dump_test "amdfam10" run_dump_test "ssse3" @@ -449,6 +450,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-crx-suffix" run_dump_test "x86-64-drx" run_dump_test "x86-64-drx-suffix" + run_dump_test "x86-64-cdr" run_dump_test "x86-64-ssse3" run_dump_test "x86-64-rep" run_dump_test "x86-64-rep-suffix" diff --git a/gas/testsuite/gas/i386/x86-64-cdr.d b/gas/testsuite/gas/i386/x86-64-cdr.d new file mode 100644 index 00000000000..5365d50de68 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-cdr.d @@ -0,0 +1,14 @@ +#objdump: -dw +#name: x86-64 control/debug register with ignored MOD field +#source: cdr.s + +.*: +file format .* + +Disassembly of section .text: + +0+ <start>: +[ ]*[a-f0-9]+: 0f 22 1f mov %rdi,%cr3 +[ ]*[a-f0-9]+: 0f 20 1f mov %cr3,%rdi +[ ]*[a-f0-9]+: 0f 21 1f mov %db3,%rdi +[ ]*[a-f0-9]+: 0f 23 1f mov %rdi,%db3 +#pass |