* config/tc-d10v.c (find_opcode): Correct format specifier vs.
arg mismatch.
* config/tc-m68hc11.c (fixup8, fixup16, fixup24, fixup8_xg): Likewise.
* config/tc-vax.c (md_assemble): Likewise.
* config/tc-xtensa.c (dump_litpools): Likewise.
* config/tc-z80.c (emit_data_val, emit_byte): Likewise.
|| myops[i].X_add_number == OPERAND_CONTROL + 12
|| myops[i].X_add_number == OPERAND_CONTROL + 13
|| myops[i].X_add_number == OPERAND_CONTROL + 15))
- as_warn (_("cr%ld is a reserved control register"),
- myops[i].X_add_number - OPERAND_CONTROL);
+ as_warn (_("cr%d is a reserved control register"),
+ (int) myops[i].X_add_number - OPERAND_CONTROL);
}
return opcode;
}
{
static char trap_id_warn_once = 0;
- as_bad (_("Trap id `%ld' is out of range."), oper->X_add_number);
+ as_bad (_("Trap id `%" PRId64 "' is out of range."),
+ (int64_t) oper->X_add_number);
if (trap_id_warn_once == 0)
{
trap_id_warn_once = 1;
if (!(mode & M6812_OP_TRAP_ID)
&& !check_range (oper->X_add_number, mode))
{
- as_bad (_("Operand out of 8-bit range: `%ld'."), oper->X_add_number);
+ as_bad (_("Operand out of 8-bit range: `%" PRId64 "'."),
+ (int64_t) oper->X_add_number);
}
number_to_chars_bigendian (f, oper->X_add_number & 0x0FF, 1);
}
{
if (!check_range (oper->X_add_number, mode))
{
- as_bad (_("Operand out of 16-bit range: `%ld'."),
- oper->X_add_number);
+ as_bad (_("Operand out of 16-bit range: `%" PRId64 "'."),
+ (int64_t) oper->X_add_number);
}
number_to_chars_bigendian (f, oper->X_add_number & 0x0FFFF, 2);
}
{
if (!check_range (oper->X_add_number, mode))
{
- as_bad (_("Operand out of 16-bit range: `%ld'."),
- oper->X_add_number);
+ as_bad (_("Operand out of 16-bit range: `%" PRId64 "'."),
+ (int64_t) oper->X_add_number);
}
number_to_chars_bigendian (f, oper->X_add_number & 0x0FFFFFF, 3);
}
else
{
if (!(check_range (oper->X_add_number, mode)))
- as_bad (_("Operand out of 8-bit range: `%ld'."),
- oper->X_add_number);
+ as_bad (_("Operand out of 8-bit range: `%" PRId64 "'."),
+ (int64_t) oper->X_add_number);
number_to_chars_bigendian (f, oper->X_add_number & 0x0FF, 1);
}
}
}
else
{
- as_warn (_("A bignum/flonum may not be a displacement: 0x%lx used"),
- (expP->X_add_number = 0x80000000L));
+ as_warn (_("A bignum/flonum may not be a displacement: 0x%"
+ PRIx64 " used"),
+ (uint64_t) (expP->X_add_number = 0x80000000L));
/* Chosen so luser gets the most offset bits to patch later. */
}
expP->X_add_number = floatP->low[0]
count++;
litfrag = litfrag->fr_next;
}
- printf(" %ld <%d:%d> (%d) [%d]: ",
- lpf->addr, lpf->priority, lpf->original_priority,
+ printf(" %" PRId64 " <%d:%d> (%d) [%d]: ",
+ (int64_t) lpf->addr,
+ lpf->priority, lpf->original_priority,
lpf->fragP->fr_line, count);
/* dump_frag(lpf->fragP); */
}
but it does help to maintain compatibility with earlier versions
of the assembler. */
if (! val->X_extrabit
- && is_overflow (val->X_add_number, size*8))
- as_warn ( _("%d-bit overflow (%+ld)"), size*8, val->X_add_number);
+ && is_overflow (val->X_add_number, size * 8))
+ as_warn ( _("%d-bit overflow (%+" PRId64 ")"), size * 8,
+ (int64_t) val->X_add_number);
for (i = 0; i < size; ++i)
- p[i] = (char)(val->X_add_number >> (i*8));
+ p[i] = (val->X_add_number >> (i * 8)) & 0xff;
return;
}
if ((val->X_add_number < -128) || (val->X_add_number >= 128))
{
if (r_type == BFD_RELOC_Z80_DISP8)
- as_bad (_("index overflow (%+ld)"), val->X_add_number);
+ as_bad (_("index overflow (%+" PRId64 ")"),
+ (int64_t) val->X_add_number);
else
- as_bad (_("offset overflow (%+ld)"), val->X_add_number);
+ as_bad (_("offset overflow (%+" PRId64 ")"),
+ (int64_t) val->X_add_number);
}
}
else