#endif
static void mips_ip PARAMS ((char *str, struct mips_cl_insn * ip));
static void mips16_ip PARAMS ((char *str, struct mips_cl_insn * ip));
-static void mips16_immed PARAMS ((int, offsetT, boolean, boolean, boolean,
- unsigned long *, boolean *,
- unsigned short *));
+static void mips16_immed PARAMS ((char *, unsigned int, int, offsetT, boolean,
+ boolean, boolean, unsigned long *,
+ boolean *, unsigned short *));
static int my_getSmallExpression PARAMS ((expressionS * ep, char *str));
static void my_getExpression PARAMS ((expressionS * ep, char *str));
static symbolS *get_symbol PARAMS ((void));
r = BFD_RELOC_UNUSED + c;
else
{
- mips16_immed (c, ep->X_add_number, false, false, false,
- &insn.insn_opcode, &insn.use_extend,
- &insn.extend);
+ mips16_immed ((char *) NULL, 0, c, ep->X_add_number, false,
+ false, false, &insn.insn_opcode,
+ &insn.use_extend, &insn.extend);
ep = NULL;
r = BFD_RELOC_UNUSED;
}
&& imm_reloc > BFD_RELOC_UNUSED
&& insn->pinfo != INSN_MACRO)
{
- mips16_immed (imm_reloc - BFD_RELOC_UNUSED,
+ mips16_immed ((char *) NULL, 0,
+ imm_reloc - BFD_RELOC_UNUSED,
imm_expr.X_add_number, true, small, ext,
&ip->insn_opcode, &ip->use_extend,
&ip->extend);
WARN is true, warn if EXT does not match reality. */
static void
-mips16_immed (type, val, warn, small, ext, insn, use_extend, extend)
+mips16_immed (file, line, type, val, warn, small, ext, insn, use_extend,
+ extend)
+ char *file;
+ unsigned int line;
int type;
offsetT val;
boolean warn;
if (type == 'p' || type == 'q')
{
if ((val & 1) != 0)
- as_bad ("branch to odd address");
+ as_bad_where (file, line, "branch to odd address");
val /= 2;
}
needext = false;
if (warn && ext && ! needext)
- as_warn ("extended operand requested but not required");
+ as_warn_where (file, line, "extended operand requested but not required");
if ((small || ! mips16_autoextend) && needext)
- as_bad ("invalid unextended operand value");
+ as_bad_where (file, line, "invalid unextended operand value");
if (small || (! ext && ! needext))
{
maxext = (1 << (op->extbits - 1)) - 1;
}
if (val < minext || val > maxext)
- as_bad ("operand value out of range for instruction");
+ as_bad_where (file, line,
+ "operand value out of range for instruction");
*use_extend = true;
if (op->extbits == 16)
break;
}
- mips16_immed (type, val, false, small, ext, &insn, &use_extend, &extend);
+ mips16_immed (fragp->fr_file, fragp->fr_line, type, val, false, small,
+ ext, &insn, &use_extend, &extend);
if (use_extend)
{