Tue Jan 27 12:24:32 1998 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-arm.c (md_apply_fix3): Add casts before comparing
- offsetT variable set to unsigned int value with FAIL.
+ * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold
+ validate_immediate return value in the right type for comparisons
+ to FAIL.
Tue Jan 27 06:51:59 1998 Richard Henderson <rth@cygnus.com>
{
offsetT value = *val;
offsetT newval;
+ unsigned int newimm;
unsigned long temp;
int sign;
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
switch (fixP->fx_r_type)
{
case BFD_RELOC_ARM_IMMEDIATE:
- newval = (offsetT) validate_immediate (value);
+ newimm = (offsetT) validate_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
/* If the instruction will fail, see if we can fix things up by
changing the opcode. */
- if (newval == (offsetT) FAIL
- && (newval = negate_data_op (&temp, value)) == (offsetT) FAIL)
+ if (newimm == (unsigned int) FAIL
+ && (newimm = negate_data_op (&temp, value)) == (unsigned int) FAIL)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
"invalid constant after fixup\n");
break;
}
- newval |= (temp & 0xfffff000);
- md_number_to_chars (buf, newval, INSN_SIZE);
+ newimm |= (temp & 0xfffff000);
+ md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
break;
case BFD_RELOC_ARM_OFFSET_IMM: