gas/
[deliverable/binutils-gdb.git] / gas / config / tc-i386.c
index 079e9d88660c6ae2f45bcd7f3aa22b0c6350d6ac..daa0ddb56b51e91e15c0b52a4f1ddd96176a94a4 100644 (file)
@@ -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
This page took 0.023258 seconds and 4 git commands to generate.