#include "alpha-opcode.h"
#include "subsegs.h"
+/* @@ Will a simple 0x8000 work here? If not, why not? */
+#define GP_ADJUSTMENT (0x8000 - 0x10)
+
/* These are exported to relaxing code, even though we don't do any
relaxing on this processor currently. */
const relax_typeS md_relax_table[1];
first line of the input file. This is because the compiler outputs
#NO_APP at the beginning of its output. */
/* Also note that '/*' will always start a comment */
-const char line_comment_chars[] = "#";
+const char line_comment_chars[] = "#!";
/* Chars that can be used to separate mant from exp in floating point nums */
const char EXP_CHARS[] = "eE";
fixS *fixp;
{
arelent *reloc;
- bfd_reloc_code_real_type code;
reloc = (arelent *) bfd_alloc_by_size_t (stdoutput, sizeof (arelent));
reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
}
assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
- if (reloc->howto->pc_relative
- && reloc->howto->pcrel_offset
-#if 1
- && code != BFD_RELOC_ALPHA_GPDISP_HI16
- && code != BFD_RELOC_ALPHA_GPDISP_LO16
-#endif
- )
+ if (fixp->fx_r_type == BFD_RELOC_ALPHA_LITERAL)
+ {
+ /* fake out bfd_perform_relocation. sigh */
+ reloc->addend = -alpha_gp_value;
+ }
+ else if (reloc->howto->pc_relative && reloc->howto->pcrel_offset)
{
reloc->addend = fixp->fx_offset - reloc->address;
}
}
}
-/* @@ Will a simple 0x8000 work here? If not, why not? */
-#define GP_ADJUSTMENT (0x8000 - 0x10)
-
static void
select_gp_value ()
{
insn->reloc[0].exp.X_add_number,
lita_sec, 8);
- /* @@ Get these numbers from GP setting. */
- retval -= GP_ADJUSTMENT;
-
/* Now emit a LITERAL relocation for the original section. */
insn->reloc[0].exp.X_op = O_symbol;
insn->reloc[0].exp.X_add_symbol = lita_sym;
return 3;
case BFD_RELOC_32:
+ size = 4;
+ goto do_it;
case BFD_RELOC_64:
- return 42;
+ size = 8;
+ goto do_it;
case BFD_RELOC_16:
/* Don't want overflow checking. */
size = 2;