+2012-11-05 Alan Modra <amodra@gmail.com>
+
+ * write.h (struct fix <fx_pcrel_adjust>): Make it a signed char.
+ * config/tc-m68k.c (tc_gen_reloc, md_pcrel_from): Remove explicit
+ sign extendion of fx_pxrel_adjust.
+
2012-11-01 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (is_delay_slot_valid): Simplify expression.
reloc->addend = fixp->fx_addnumber;
else
reloc->addend = (section->vma
- /* Explicit sign extension in case char is
- unsigned. */
- + ((fixp->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80
+ + fixp->fx_pcrel_adjust
+ fixp->fx_addnumber
+ md_pcrel_from (fixp));
#endif
{
int adjust;
- /* Because fx_pcrel_adjust is a char, and may be unsigned, we explicitly
- sign extend the value here. */
- adjust = ((fixP->fx_pcrel_adjust & 0xff) ^ 0x80) - 0x80;
+ adjust = fixP->fx_pcrel_adjust;
if (adjust == 64)
adjust = -1;
return fixP->fx_where + fixP->fx_frag->fr_address - adjust;
/* The value is signed when checking for overflow. */
unsigned fx_signed : 1;
- /* pc-relative offset adjust (only used by m68k and m68hc11) */
- char fx_pcrel_adjust;
+ /* pc-relative offset adjust (only used by some CPU specific code) */
+ signed char fx_pcrel_adjust;
/* How many bytes are involved? */
unsigned char fx_size;