diff options
author | Jan Beulich <jbeulich@novell.com> | 2017-11-13 12:22:21 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2017-11-13 12:22:21 +0100 |
commit | b76bc5d54e36f15efd954898d9aa075c2bea02dd (patch) | |
tree | d60c7615bb063e7e68a5780ace9fd9b3b63eb9b9 /gas | |
parent | 897e603cb98c50968ea21d1b3baac5bc020ccc06 (diff) | |
download | fsf-binutils-gdb-b76bc5d54e36f15efd954898d9aa075c2bea02dd.zip fsf-binutils-gdb-b76bc5d54e36f15efd954898d9aa075c2bea02dd.tar.gz fsf-binutils-gdb-b76bc5d54e36f15efd954898d9aa075c2bea02dd.tar.bz2 |
x86: don't default variable shift count insns to 8-bit operand size
Just like %dx in I/O instructions isn't suitable to derive operand size
information, %cl source operands of shift instructions aren't.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/inval.l | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/inval.s | 4 |
4 files changed, 20 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d18c381..768ec17 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,12 @@ 2017-11-13 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (process_suffix): Treat .shiftcount just like + .inoutportreg. + * testsuite/gas/i386/inval.s: Add ambiguous shift/rotate cases. + * testsuite/gas/i386/inval.l: Adjust expectations. + +2017-11-13 Jan Beulich <jbeulich@suse.com> + * config/tc-i386-intel.c (i386_intel_simplify_register): Also recognize RegRiz/RegEiz as index-only registers. * testsuite/gas/i386/intel.s: Add tests exercising base/index diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 4161c8c..f20be8e 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5431,7 +5431,8 @@ process_suffix (void) } for (op = i.operands; --op >= 0;) - if (!i.tm.operand_types[op].bitfield.inoutportreg) + if (!i.tm.operand_types[op].bitfield.inoutportreg + && !i.tm.operand_types[op].bitfield.shiftcount) { if (i.types[op].bitfield.reg8) { diff --git a/gas/testsuite/gas/i386/inval.l b/gas/testsuite/gas/i386/inval.l index bec6b75..53eb7e7 100644 --- a/gas/testsuite/gas/i386/inval.l +++ b/gas/testsuite/gas/i386/inval.l @@ -80,6 +80,9 @@ .*:87: Error: .* .*:88: Error: .* .*:90: Error: .* +.*:92: Error: .*shl.* +.*:93: Error: .*rol.* +.*:94: Error: .*rcl.* GAS LISTING .* @@ -176,3 +179,7 @@ GAS LISTING .* [ ]*88[ ]+movzx eax, \[eax\] [ ]*89[ ]+ [ ]*90[ ]+movnti word ptr \[eax\], ax +[ ]*[1-9][0-9]*[ ]+ +[ ]*[1-9][0-9]*[ ]+shl \[eax\], 1 +[ ]*[1-9][0-9]*[ ]+rol \[ecx\], 2 +[ ]*[1-9][0-9]*[ ]+rcl \[edx\], cl diff --git a/gas/testsuite/gas/i386/inval.s b/gas/testsuite/gas/i386/inval.s index 4818baa..35d99cd 100644 --- a/gas/testsuite/gas/i386/inval.s +++ b/gas/testsuite/gas/i386/inval.s @@ -88,3 +88,7 @@ movzx ax, [eax] movzx eax, [eax] movnti word ptr [eax], ax + + shl [eax], 1 + rol [ecx], 2 + rcl [edx], cl |