/* tc-xc16x.c -- Assembler for the Infineon XC16X.
- Copyright 2006, 2007 Free Software Foundation, Inc.
- Contributed by KPIT Cummins Infosystems
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
+ Contributed by KPIT Cummins Infosystems
This file is part of GAS, the GNU Assembler.
if (!insn.insn)
{
- as_bad (errmsg);
+ as_bad ("%s", errmsg);
return;
}
switch (operand->type)
{
case XC16X_OPERAND_REL:
+ /* ??? Adjust size? */
fixP->fx_where += 1;
fixP->fx_pcrel = 1;
return BFD_RELOC_8_PCREL;
case XC16X_OPERAND_CADDR:
+ fixP->fx_size = 2;
fixP->fx_where += 2;
return BFD_RELOC_16;
case XC16X_OPERAND_UIMM7:
+ /* ??? Adjust size? */
fixP->fx_where += 1;
fixP->fx_pcrel = 1;
return BFD_RELOC_8_PCREL;
case XC16X_OPERAND_UIMM16:
case XC16X_OPERAND_MEMORY:
+ fixP->fx_size = 2;
fixP->fx_where += 2;
return BFD_RELOC_16;
case XC16X_OPERAND_UPOF16:
+ fixP->fx_size = 2;
fixP->fx_where += 2;
return BFD_RELOC_XC16X_POF;
case XC16X_OPERAND_UPAG16:
+ fixP->fx_size = 2;
fixP->fx_where += 2;
return BFD_RELOC_XC16X_PAG;
case XC16X_OPERAND_USEG8:
+ /* ??? This is an 8 bit field, why the 16 bit reloc? */
fixP->fx_where += 1;
return BFD_RELOC_XC16X_SEG;
case XC16X_OPERAND_USEG16:
case XC16X_OPERAND_USOF16:
+ fixP->fx_size = 2;
fixP->fx_where += 2;
return BFD_RELOC_XC16X_SOF;
- default : /* avoid -Wall warning */
+ default : /* Avoid -Wall warning. */
break;
}
- fixP->fx_where += 2;
- return BFD_RELOC_XC16X_SOF;
+ return BFD_RELOC_NONE;
}
/* Write a value out to the object file, using the appropriate endianness. */
md_section_align (segT segment, valueT size)
{
int align = bfd_get_section_alignment (stdoutput, segment);
- return ((size + (1 << align) - 1) & (-1 << align));
+ return ((size + (1 << align) - 1) & -(1 << align));
}
symbolS *
md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED,
segT segment_type ATTRIBUTE_UNUSED)
{
- printf (_("call tomd_estimate_size_before_relax \n"));
+ printf (_("call to md_estimate_size_before_relax \n"));
abort ();
}
|| S_GET_SEGMENT (fixp->fx_addsy) == undefined_section)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "Difference of symbols in different sections is not supported");
+ _("Difference of symbols in different sections is not supported"));
return NULL;
}
}
#define DEBUG 0
#if DEBUG
fprintf (stderr, "%s\n", bfd_get_reloc_code_name (r_type));
- fflush(stderr);
+ fflush (stderr);
#endif
rel->howto = bfd_reloc_type_lookup (stdoutput, r_type);
void
md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
{
- if(!strstr (seg->name,".debug"))
+ if (!strstr (seg->name,".debug"))
{
if (*valP < 128)
*valP /= 2;
*valP = 256 - (*valP);
}
}
-
+
gas_cgen_md_apply_fix (fixP, valP, seg);
return;
}
printf (_("call to md_convert_frag \n"));
abort ();
}
-
-