/* spu.c -- Assembler for the IBM Synergistic Processing Unit (SPU)
- Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
-#include "dwarf2dbg.h"
+#include "dwarf2dbg.h"
const struct spu_opcode spu_opcodes[] = {
#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
/* Likewise for eqv. */
{"eqv", NULL, 0},
{".eqv", s_set, -1},
- {"file", (void (*) (int)) dwarf2_directive_file, 0 },
- {"loc", dwarf2_directive_loc, 0},
{0,0,0}
};
{
int arg = format->arg[i];
char *exp;
- if (i > 1 && arg != A_P && format->arg[i-1] != A_P)
+ if (i > 1 && arg != A_P && format->arg[i-1] != A_P)
buf[len++] = ',';
if (arg == A_P)
exp = "(";
else if (arg < A_P)
exp = i == syntax_error_arg ? "REG" : "reg";
- else
+ else
exp = i == syntax_error_arg ? "IMM" : "imm";
len += sprintf (&buf[len], "%s", exp);
- if (i > 1 && format->arg[i-1] == A_P)
+ if (i > 1 && format->arg[i-1] == A_P)
buf[len++] = ')';
}
buf[len] = 0;
struct spu_insn insn;
int i;
- assert (op);
+ gas_assert (op);
/* skip over instruction to find parameters */
/* if this instruction requires labels mark it for later */
for (i = 0; i < MAX_RELOCS; i++)
- if (insn.reloc_arg[i] >= 0)
+ if (insn.reloc_arg[i] >= 0)
{
fixS *fixP;
bfd_reloc_code_real_type reloc = insn.reloc[i];
saw_prefix = 1;
param++;
}
-
+
if (arg == A_H) /* Channel */
{
if ((param[0] == 'c' || param[0] == 'C')
i.e. for code loaded at address 0 $toc will be 0. */
param += 4;
}
-
+
if (*param == '$')
{
/* Symbols can start with $, but if this symbol matches a register
if (np)
syntax_error_param = np;
}
-
+
save_ptr = input_line_pointer;
input_line_pointer = (char *) param;
expression (&insn->exp[reloc_i]);
if (emulate_apuasm)
{
- /* Convert the value to a format we expect. */
+ /* Convert the value to a format we expect. */
val <<= arg_encode[arg].rshift;
if (arg == A_U7A)
val = 173 - val;
else if (arg == A_U7B)
- val = 155 - val;
+ val = 155 - val;
}
if (high)
if (arg == A_U7A)
val = 173 - val;
else if (arg == A_U7B)
- val = 155 - val;
+ val = 155 - val;
/* Branch hints have a split encoding. Do the bottom part. */
if (arg == A_S11 || arg == A_S11I)
fixP->fx_addnumber = val;
if (fixP->fx_r_type == BFD_RELOC_SPU_PPU32
- || fixP->fx_r_type == BFD_RELOC_SPU_PPU64)
+ || fixP->fx_r_type == BFD_RELOC_SPU_PPU64
+ || fixP->fx_r_type == BFD_RELOC_SPU_ADD_PIC)
return;
if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
int lo = arg_encode[fixP->tc_fix_data.arg_format].lo;
if (hi > lo && ((offsetT) val < lo || (offsetT) val > hi))
as_bad_where (fixP->fx_file, fixP->fx_line,
- "Relocation doesn't fit. (relocation value = 0x%lx)",
+ _("Relocation doesn't fit. (relocation value = 0x%lx)"),
(long) val);
}