but it is the operand that has a pc relative relocation. */
fixP = fix_new (frag, where, length / 8, symbol, offset,
CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
- (bfd_reloc_code_real_type)
- ((int) BFD_RELOC_UNUSED
- + (int) operand->type));
+ BFD_RELOC_UNUSED + operand->type);
fixP->fx_cgen.insn = insn;
fixP->fx_cgen.opinfo = opinfo;
fixP->fx_cgen.field = NULL;
but it is the operand that has a pc relative relocation. */
fixP = fix_new_exp (frag, where, length / 8, exp,
CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR),
- (bfd_reloc_code_real_type)
- ((int) BFD_RELOC_UNUSED
- + (int) operand->type));
+ BFD_RELOC_UNUSED + operand->type);
fixP->fx_cgen.insn = insn;
fixP->fx_cgen.opinfo = opinfo;
fixP->fx_cgen.field = NULL;
if (fixP->fx_subsy != (symbolS *) NULL)
as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand = cgen_operand_lookup_by_num (cd, opindex);
const char *errmsg;
bfd_reloc_code_real_type reloc_type;
else
{
reloc_howto_type *reloc_howto =
- bfd_reloc_type_lookup (stdoutput,
- (bfd_reloc_code_real_type) fixup->reloc);
+ bfd_reloc_type_lookup (stdoutput, fixup->reloc);
gas_assert (reloc_howto);
size = bfd_get_reloc_size (reloc_howto);
}
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
- &fixup->exp, pcrel, (bfd_reloc_code_real_type) fixup->reloc);
+ &fixup->exp, pcrel, fixup->reloc);
/* Turn off complaints that the addend is too large for some fixups,
and copy in the sequence number for the explicit relocations. */
else if (reloc < BFD_RELOC_UNUSED && reloc > 0)
{
reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput,
- (bfd_reloc_code_real_type) reloc);
+ = bfd_reloc_type_lookup (stdoutput, reloc);
if (reloc_operand == NULL
|| reloc_howto->bitsize != reloc_operand->bits)
{
else
{
reloc_howto_type *reloc_howto =
- bfd_reloc_type_lookup (stdoutput,
- (bfd_reloc_code_real_type) fixup->reloc);
+ bfd_reloc_type_lookup (stdoutput, fixup->reloc);
gas_assert (reloc_howto);
/* FIXME! the reloc size is wrong in the BFD file.
{
/* sanity checks. */
reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput,
- (bfd_reloc_code_real_type) reloc);
+ = bfd_reloc_type_lookup (stdoutput, reloc);
unsigned reloc_bitsize = reloc_howto->bitsize;
if (reloc_howto->rightshift)
reloc_bitsize -= reloc_howto->rightshift;
else
{
reloc_howto_type *reloc_howto =
- bfd_reloc_type_lookup (stdoutput,
- (bfd_reloc_code_real_type) fixup->reloc);
+ bfd_reloc_type_lookup (stdoutput, fixup->reloc);
pcrel = reloc_howto->pc_relative;
}
fixup->pcrel = pcrel;
emit_expr (&exp, (unsigned int) nbytes);
else
{
- reloc_howto_type *howto = (reloc_howto_type *)
- bfd_reloc_type_lookup (stdoutput,
- (bfd_reloc_code_real_type) reloc);
+ reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput,
+ reloc);
int size = bfd_get_reloc_size (howto);
if (reloc == BFD_RELOC_ARM_PLT32)
break;
default:
- new_fix = (fixS *) fix_new (frag, where, size, make_expr_symbol (exp), 0,
- pc_rel, (enum bfd_reloc_code_real) reloc);
+ new_fix = fix_new (frag, where, size, make_expr_symbol (exp), 0,
+ pc_rel, reloc);
break;
}
if (fixP->fx_addsy == (symbolS *) NULL)
fixP->fx_done = 1;
- if (((int) fixP->fx_r_type < (int) BFD_RELOC_UNUSED)
+ if ((fixP->fx_r_type < BFD_RELOC_UNUSED)
&& fixP->fx_done)
{
/* Install EPIPHANY-dependent relocations HERE because nobody else
{
bfd_reloc_code_real_type reloc_type;
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = fixP->fx_cgen.insn;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand =
cgen_operand_lookup_by_num (gas_cgen_cpu_desc, opindex);
{
bfd_reloc_code_real_type reloc_type;
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = NULL;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand = cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);
reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
}
}
else
{
- opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED;
+ opindex = fixp->fx_r_type - BFD_RELOC_UNUSED;
operand = cgen_operand_lookup_by_num (cd, opindex);
reloc = md_cgen_lookup_reloc (insn, operand, fixp);
}
{
bfd_reloc_code_real_type reloc_type;
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = NULL;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand = cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);
reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
/* We need the symbol name for the VTABLE entries. */
reloc = fixP->fx_r_type;
- if (reloc > (int)BFD_RELOC_UNUSED)
+ if (reloc > BFD_RELOC_UNUSED)
{
- reloc -= (int)BFD_RELOC_UNUSED;
+ reloc -= BFD_RELOC_UNUSED;
switch (reloc)
{
case M32C_OPERAND_DSP_32_S16:
{
bfd_reloc_code_real_type reloc_type;
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = NULL;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand =
cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);
{
bfd_reloc_code_real_type reloc_type;
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = NULL;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand
= cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);
reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
&& delayed_branch_p (ip))
{
relaxed_branch = true;
- add_relaxed_insn (ip, (relaxed_branch_length
- (NULL, NULL,
- uncond_branch_p (ip) ? -1
- : branch_likely_p (ip) ? 1
- : 0)), 4,
- RELAX_BRANCH_ENCODE
- (AT, mips_pic != NO_PIC,
- uncond_branch_p (ip),
- branch_likely_p (ip),
- pinfo & INSN_WRITE_GPR_31,
- 0),
+ add_relaxed_insn (ip,
+ relaxed_branch_length (NULL, NULL,
+ uncond_branch_p (ip) ? -1
+ : branch_likely_p (ip) ? 1
+ : 0),
+ 4,
+ RELAX_BRANCH_ENCODE (AT, mips_pic != NO_PIC,
+ uncond_branch_p (ip),
+ branch_likely_p (ip),
+ pinfo & INSN_WRITE_GPR_31, 0),
address_expr->X_add_symbol,
address_expr->X_add_number);
*reloc_type = BFD_RELOC_UNUSED;
offset = 0;
}
add_relaxed_insn (ip, 12, 0,
- RELAX_MIPS16_ENCODE
- (*reloc_type - BFD_RELOC_UNUSED,
- mips_opts.ase & ASE_MIPS16E2,
- mips_pic != NO_PIC,
- HAVE_32BIT_SYMBOLS,
- mips_opts.warn_about_macros,
- require_unextended, require_extended,
- delayed_branch_p (&history[0]),
- history[0].mips16_absolute_jump_p),
+ RELAX_MIPS16_ENCODE (*reloc_type - BFD_RELOC_UNUSED,
+ mips_opts.ase & ASE_MIPS16E2,
+ mips_pic != NO_PIC,
+ HAVE_32BIT_SYMBOLS,
+ mips_opts.warn_about_macros,
+ require_unextended,
+ require_extended,
+ delayed_branch_p (&history[0]),
+ history[0].mips16_absolute_jump_p),
symbol, offset);
}
else if (mips_opts.mips16 && insn_length (ip) == 2)
case 'D':
case 'E':
if (!forced_insn_length)
- *offset_reloc = (int) BFD_RELOC_UNUSED + c;
+ *offset_reloc = BFD_RELOC_UNUSED + c;
else if (c == 'D')
*offset_reloc = BFD_RELOC_MICROMIPS_10_PCREL_S1;
else
}
}
else if (relax_char)
- *offset_reloc = (int) BFD_RELOC_UNUSED + relax_char;
+ *offset_reloc = BFD_RELOC_UNUSED + relax_char;
check_completed_insn (&arg);
return true;
next = va_arg (*args, int);
if (next >= 0)
- r[0] = (bfd_reloc_code_real_type) next;
+ r[0] = next;
else
{
for (i = 0; i < 3; i++)
- r[i] = (bfd_reloc_code_real_type) va_arg (*args, int);
+ r[i] = va_arg (*args, int);
/* This function is only used for 16-bit relocation fields.
To make the macro code simpler, treat an unrelocated value
in the same way as BFD_RELOC_LO16. */
gas_assert (ep != NULL);
if (ep->X_op != O_constant)
- *r = (int) BFD_RELOC_UNUSED + c;
+ *r = BFD_RELOC_UNUSED + c;
else if (calculate_reloc (*r, ep->X_add_number, &value))
{
mips16_immed (NULL, 0, c, *r, value, 0, &insn.insn_opcode);
}
else if (!mips_big_got && !HAVE_NEWABI)
{
- int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT16;
+ int lw_reloc_type = BFD_RELOC_MIPS_GOT16;
/* If this is a reference to an external symbol, and there
is no constant, we want
if (mips_pic == SVR4_PIC
&& breg == 0
&& (call || tempreg == PIC_CALL_REG))
- lw_reloc_type = (int) BFD_RELOC_MIPS_CALL16;
+ lw_reloc_type = BFD_RELOC_MIPS_CALL16;
relax_start (offset_expr.X_add_symbol);
macro_build (&offset_expr, ADDRESS_LOAD_INSN, "t,o(b)", tempreg,
else if (mips_big_got && !HAVE_NEWABI)
{
int gpdelay;
- int lui_reloc_type = (int) BFD_RELOC_MIPS_GOT_HI16;
- int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT_LO16;
- int local_reloc_type = (int) BFD_RELOC_MIPS_GOT16;
+ int lui_reloc_type = BFD_RELOC_MIPS_GOT_HI16;
+ int lw_reloc_type = BFD_RELOC_MIPS_GOT_LO16;
+ int local_reloc_type = BFD_RELOC_MIPS_GOT16;
/* This is the large GOT case. If this is a reference to an
external symbol, and there is no constant, we want
if (expr1.X_add_number == 0 && breg == 0
&& (call || tempreg == PIC_CALL_REG))
{
- lui_reloc_type = (int) BFD_RELOC_MIPS_CALL_HI16;
- lw_reloc_type = (int) BFD_RELOC_MIPS_CALL_LO16;
+ lui_reloc_type = BFD_RELOC_MIPS_CALL_HI16;
+ lw_reloc_type = BFD_RELOC_MIPS_CALL_LO16;
}
macro_build (&offset_expr, "lui", LUI_FMT, tempreg, lui_reloc_type);
macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
}
else if (mips_big_got && HAVE_NEWABI)
{
- int lui_reloc_type = (int) BFD_RELOC_MIPS_GOT_HI16;
- int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT_LO16;
+ int lui_reloc_type = BFD_RELOC_MIPS_GOT_HI16;
+ int lw_reloc_type = BFD_RELOC_MIPS_GOT_LO16;
int add_breg_early = 0;
/* This is the large GOT case. If this is a reference to an
if (expr1.X_add_number == 0 && breg == 0
&& (call || tempreg == PIC_CALL_REG))
{
- lui_reloc_type = (int) BFD_RELOC_MIPS_CALL_HI16;
- lw_reloc_type = (int) BFD_RELOC_MIPS_CALL_LO16;
+ lui_reloc_type = BFD_RELOC_MIPS_CALL_HI16;
+ lw_reloc_type = BFD_RELOC_MIPS_CALL_LO16;
}
macro_build (&offset_expr, "lui", LUI_FMT, tempreg, lui_reloc_type);
macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
}
else if (!mips_big_got)
{
- int lw_reloc_type = (int) BFD_RELOC_MIPS_GOT16;
+ int lw_reloc_type = BFD_RELOC_MIPS_GOT16;
/* If this is a reference to an external symbol, we want
lw $tempreg,<sym>($gp) (BFD_RELOC_MIPS_GOT16)
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
reloc_size / 8, &fixups[i].exp, pcrel,
- ((bfd_reloc_code_real_type) reloc));
+ reloc);
if (pcrel)
fixP->fx_offset += offset;
bool
mt_fix_adjustable (fixS * fixP)
{
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = NULL;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand;
operand = cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);
}
*str_p = str;
- if (reloc == (int) BFD_RELOC_PPC64_TOC
+ if (reloc == BFD_RELOC_PPC64_TOC
&& exp_p->X_op == O_symbol
&& strcmp (S_GET_NAME (exp_p->X_add_symbol), ".TOC.") == 0)
{
&& (ppc_cpu & PPC_OPCODE_POWER10) == 0)
reloc = BFD_RELOC_PPC64_REL24_P9NOTOC;
- return (bfd_reloc_code_real_type) reloc;
+ return reloc;
}
return BFD_RELOC_NONE;
&& (ppc_obj64 ? ptr->valid64 : ptr->valid32))
{
*str_p = str;
- return (bfd_reloc_code_real_type) ptr->reloc;
+ return ptr->reloc;
}
return BFD_RELOC_NONE;
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, 4,
&fixups[i].exp,
(operand->flags & S390_OPERAND_PCREL) != 0,
- ((bfd_reloc_code_real_type)
- (fixups[i].opindex + (int) BFD_RELOC_UNUSED)));
+ fixups[i].opindex + BFD_RELOC_UNUSED);
/* s390_insert_operand () does the range checking. */
if (operand->flags & S390_OPERAND_PCREL)
fixP->fx_no_overflow = 1;
else
fixP->fx_done = 1;
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const struct s390_operand *operand;
int opindex;
- opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
operand = &s390_operands[opindex];
if (fixP->fx_done)
f - frag_now->fr_literal, 4,
& fixups[i].exp,
(operand->flags & V850_PCREL) != 0,
- (bfd_reloc_code_real_type) (fixups[i].opindex
- + (int) BFD_RELOC_UNUSED));
+ fixups[i].opindex + BFD_RELOC_UNUSED);
}
}
fixP->fx_addnumber = value;
}
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
int opindex;
const struct v850_operand *operand;
unsigned long insn;
const char *errmsg = NULL;
- opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
operand = &v850_operands[opindex];
/* Fetch the instruction, insert the fully resolved operand
if (fixP->fx_subsy != (symbolS *) NULL)
as_bad_subtract (fixP);
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand = cgen_operand_lookup_by_num (cd, opindex);
const char *errmsg;
bfd_reloc_code_real_type reloc_type;