aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-12-29 21:48:48 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-12-29 21:48:48 +0000
commitc81128dcdf7fa4674084255dc258a0033fd18797 (patch)
treec91c679ce00d7bad74d26d1f6d46911fc1b10fce /gas/config
parent2d45707707d2f6b57a3d6a11100c17b23c0a7a08 (diff)
downloadgdb-c81128dcdf7fa4674084255dc258a0033fd18797.zip
gdb-c81128dcdf7fa4674084255dc258a0033fd18797.tar.gz
gdb-c81128dcdf7fa4674084255dc258a0033fd18797.tar.bz2
gas/
2006-12-29 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (build_modrm_byte): Handle shift count register with 3 operands. gas/testsuite/ 2006-12-29 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/intel.s: Add tests for "shrd %cl,%edx,%eax" and "shld %cl,%edx,%eax". * gas/i386/opcode.s: Likewise. * gas/i386/intel.d: Updated. * gas/i386/opcode-intel.d: Likewise. * gas/i386/opcode-suffix.d: Likewise. * gas/i386/opcode.d: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 079e9d8..daa0ddb 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3436,10 +3436,13 @@ build_modrm_byte ()
source = 0;
break;
case 3:
- /* When there are 3 operands, one of them must be immediate,
- which may be the first or the last operand. */
- assert (i.imm_operands == 1);
- source = (i.types[0] & Imm) ? 1 : 0;
+ /* When there are 3 operands, one of them may be immediate,
+ which may be the first or the last operand. Otherwise,
+ the first operand must be shift count register (cl). */
+ assert (i.imm_operands == 1
+ || (i.imm_operands == 0
+ && (i.types[0] & ShiftCount)));
+ source = (i.types[0] & (Imm | ShiftCount)) ? 1 : 0;
break;
case 4:
/* When there are 4 operands, the first two must be immediate