/* tc-mn10300.c -- Assembler code for the Matsushita 10300
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
const struct mn10300_operand *,
offsetT));
static int reg_name_search PARAMS ((const struct reg_name *, int, const char *));
-static boolean data_register_name PARAMS ((expressionS *expressionP));
-static boolean address_register_name PARAMS ((expressionS *expressionP));
-static boolean other_register_name PARAMS ((expressionS *expressionP));
-static void set_arch_mach PARAMS ((unsigned int));
+static bfd_boolean data_register_name PARAMS ((expressionS *expressionP));
+static bfd_boolean address_register_name PARAMS ((expressionS *expressionP));
+static bfd_boolean other_register_name PARAMS ((expressionS *expressionP));
+static bfd_boolean r_register_name PARAMS ((expressionS *expressionP));
+static bfd_boolean xr_register_name PARAMS ((expressionS *expressionP));
+static void set_arch_mach PARAMS ((int));
/* Set linkrelax here to avoid fixups in most sections. */
int linkrelax = 1;
/* The target specific pseudo-ops which we support. */
const pseudo_typeS md_pseudo_table[] =
{
- { "file", dwarf2_directive_file, 0 },
- { "loc", dwarf2_directive_loc, 0 },
{ "am30", set_arch_mach, AM30 },
{ "am33", set_arch_mach, AM33 },
{ "mn10300", set_arch_mach, MN103 },
* its original state.
*/
-static boolean
+static bfd_boolean
r_register_name (expressionP)
expressionS *expressionP;
{
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return true;
+ return TRUE;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return false;
+ return FALSE;
}
/* Summary of register_name().
* its original state.
*/
-static boolean
+static bfd_boolean
xr_register_name (expressionP)
expressionS *expressionP;
{
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return true;
+ return TRUE;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return false;
+ return FALSE;
}
/* Summary of register_name().
* its original state.
*/
-static boolean
+static bfd_boolean
data_register_name (expressionP)
expressionS *expressionP;
{
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return true;
+ return TRUE;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return false;
+ return FALSE;
}
/* Summary of register_name().
* its original state.
*/
-static boolean
+static bfd_boolean
address_register_name (expressionP)
expressionS *expressionP;
{
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return true;
+ return TRUE;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return false;
+ return FALSE;
}
/* Summary of register_name().
* its original state.
*/
-static boolean
+static bfd_boolean
other_register_name (expressionP)
expressionS *expressionP;
{
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- return true;
+ return TRUE;
}
/* Reset the line as if we had not done anything. */
input_line_pointer = start;
- return false;
+ return FALSE;
}
void
reloc->howto = bfd_reloc_type_lookup (stdoutput,
BFD_RELOC_8_PCREL);
return reloc;
-
+
case BFD_RELOC_16:
reloc->howto = bfd_reloc_type_lookup (stdoutput,
BFD_RELOC_16_PCREL);
case BFD_RELOC_8:
md_number_to_chars (fixpos, reloc->addend, 1);
break;
-
+
case BFD_RELOC_16:
md_number_to_chars (fixpos, reloc->addend, 2);
break;
fixP->fx_done = 1;
}
-/* Return nonzero if the fixup in FIXP will require a relocation,
- even it if appears that the fixup could be completely handled
- within GAS. */
-
-int
-mn10300_force_relocation (fixp)
- struct fix *fixp;
-{
- if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
- || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
- return 1;
-
- /* Do not adjust relocations involving symbols in code sections,
- because it breaks linker relaxations. This could be fixed in the
- linker, but this fix is simpler, and it pretty much only affects
- object size a little bit. */
- if ((S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE)
- && fixp->fx_subsy
- && S_GET_SEGMENT (fixp->fx_addsy) == S_GET_SEGMENT (fixp->fx_subsy))
- return 1;
-
- return 0;
-}
-
/* Return zero if the fixup in fixp should be left alone and not
adjusted. */
-boolean
+bfd_boolean
mn10300_fix_adjustable (fixp)
struct fix *fixp;
{
- /* Prevent all adjustments to global symbols. */
- if (S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy))
- return 0;
-
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
static void
set_arch_mach (mach)
- unsigned int mach;
+ int mach;
{
if (!bfd_set_arch_mach (stdoutput, bfd_arch_mn10300, mach))
as_warn (_("could not set architecture and machine"));