Tue Jul 7 13:00:37 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
+ * config/tc-i386.c (i386_operand): Don't set the size of an
+ immediate address based solely on the suffix and the mode.
+
+ * config/tc-i386.c (md_assemble): Add assertion to make sure
+ overlap2 does not set Imm.
+
* config/tc-i386.c (space_chars): Remove. The scrubber converts
sequences of whitespace to a single space.
(is_space_chars): Just compare with space.
}
/* Make still unresolved immediate matches conform to size of immediate
- given in i.suffix. Note: overlap2 cannot be an immediate!
- We assume this. */
+ given in i.suffix. Note: overlap2 cannot be an immediate! */
if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32))
&& overlap0 != Imm8 && overlap0 != Imm8S
&& overlap0 != Imm16 && overlap0 != Imm32)
return;
}
}
+ assert ((overlap2 & Imm) == 0);
i.types[0] = overlap0;
if (overlap0 & ImplicitRegister)
#endif
else
{
- /* This is an address. */
- i.types[this_operand] |=
- (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32;
- }
- /* shorten this type of this operand if the instruction wants
- * fewer bits than are present in the immediate. The bit field
- * code can put out 'andb $0xffffff, %al', for example. pace
- * also 'movw $foo,(%eax)'
- */
- switch (i.suffix)
- {
- case WORD_OPCODE_SUFFIX:
- i.types[this_operand] |= Imm16;
- break;
- case BYTE_OPCODE_SUFFIX:
- i.types[this_operand] |= Imm16 | Imm8 | Imm8S;
- break;
+ /* This is an address. The size of the address will be
+ determined later, depending on destination register,
+ suffix, or the default for the section. We exclude
+ Imm8S here so that `push $foo' and other instructions
+ with an Imm8S form will use Imm16 or Imm32. */
+ i.types[this_operand] |= (Imm8 | Imm16 | Imm32);
}
}
else if (is_digit_char (*op_string) || is_identifier_char (*op_string)