* config/tc-mcore.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-openrisc.c: Likewise.
* config/tc-or32.c: Likewise.
* config/tc-pdp11.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-ppc.h: Likewise.
* config/tc-sh64.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-xstormy16.c: Likewise.
* config/tc-xstormy16.h: Likewise.
+2002-05-11 Kazu Hirata <kazu@cs.umass.edu>
+
+ * config/obj-coff.h: Fix formatting.
+ * config/tc-mcore.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/tc-openrisc.c: Likewise.
+ * config/tc-or32.c: Likewise.
+ * config/tc-pdp11.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-ppc.h: Likewise.
+ * config/tc-sh64.c: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-tic54x.c: Likewise.
+ * config/tc-xstormy16.c: Likewise.
+ * config/tc-xstormy16.h: Likewise.
+
2002-05-09 Kazu Hirata <kazu@cs.umass.edu>
* config/obj-coff.c: Fix formatting.
#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v))
/* Internal use only definitions. SF_ stands for symbol flags.
-
+
These values can be assigned to sy_symbol.ost_flags field of a symbolS.
-
+
You'll break i960 if you shift the SYSPROC bits anywhere else. for
more on the balname/callname hack, see tc-i960.h. b.out is done
differently. */
#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v))
/* Internal use only definitions. SF_ stands for symbol flags.
-
+
These values can be assigned to sy_symbol.ost_flags field of a symbolS.
-
+
You'll break i960 if you shift the SYSPROC bits anywhere else. for
more on the balname/callname hack, see tc-i960.h. b.out is done
differently. */
/* tc-mcore.c -- Assemble code for M*Core
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
{ 0, 0, C32_LEN, 0 }, /* UNDEF_WORD_DISP */
/* UNCD_JUMP */
- { 0, 0, 0, 0 }, /* UNDEF_DISP */
- { 2048, -2046, U12_LEN, C(UNCD_JUMP, DISP32) }, /* DISP12 */
- { 0, 0, U32_LEN, 0 }, /* DISP32 */
+ { 0, 0, 0, 0 }, /* UNDEF_DISP */
+ { 2048, -2046, U12_LEN, C(UNCD_JUMP, DISP32) }, /* DISP12 */
+ { 0, 0, U32_LEN, 0 }, /* DISP32 */
{ 0, 0, U32_LEN, 0 } /* UNDEF_WORD_DISP */
};
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;
/* tc-openrisc.c -- Assembler for the OpenRISC family.
- Copyright (C) 2001 Free Software Foundation.
+ Copyright (C) 2001, 2002 Free Software Foundation.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of GAS, the GNU Assembler.
switch (operand->type)
{
- case OPENRISC_OPERAND_ABS_26:
- fixP->fx_pcrel = 0;
+ case OPENRISC_OPERAND_ABS_26:
+ fixP->fx_pcrel = 0;
type = BFD_RELOC_OPENRISC_ABS_26;
goto emit;
- case OPENRISC_OPERAND_DISP_26:
- fixP->fx_pcrel = 1;
+ case OPENRISC_OPERAND_DISP_26:
+ fixP->fx_pcrel = 1;
type = BFD_RELOC_OPENRISC_REL_26;
goto emit;
/* We need the symbol name for the VTABLE entries */
if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
- return 0;
+ return 0;
return 1;
}
#include "opcode/or32.h"
#ifdef BFD_ASSEMBLER
-#include "elf/or32.h"
+#include "elf/or32.h"
#endif
#define DEBUG 0
{
{"align", s_align_bytes, 4 },
{"space", s_space, 0 },
- {"cputype", s_ignore, 0 },
+ {"cputype", s_ignore, 0 },
{"reg", s_lsym, 0 }, /* Register equate, same as equ. */
{"sect", s_ignore, 0 }, /* Creation of coff sections. */
{"proc", s_ignore, 0 }, /* Start of a function. */
#endif
/* Set bits in machine opcode according to insn->encoding
- description and passed operand. */
+ description and passed operand. */
-static void
+static void
encode (insn, opcode, param_val, param_ch)
const struct machine_opcode *insn;
unsigned long *opcode;
for (enc = insn->encoding; *enc != '\0';)
{
- if ((*enc == '0') && (*(enc + 1) == 'x'))
+ if ((*enc == '0') && (*(enc + 1) == 'x'))
{
int tmp = strtol (enc, NULL, 16);
*opcode |= tmp << opc_pos;
enc += 3;
}
- else if ((*enc == '0') || (*enc == '-'))
+ else if ((*enc == '0') || (*enc == '-'))
{
opc_pos--;
enc++;
}
- else if (*enc == '1')
+ else if (*enc == '1')
{
opc_pos--;
*opcode |= 1 << opc_pos;
enc++;
}
- else if (*enc == param_ch)
+ else if (*enc == param_ch)
{
opc_pos--;
param_pos--;
*opcode |= ((param_val >> param_pos) & 0x1) << opc_pos;
enc++;
}
- else if (ISALPHA (*enc))
+ else if (ISALPHA (*enc))
{
opc_pos--;
enc++;
else
enc++;
}
-
+
#if DEBUG
printf (" opcode=%.8lx\n", *opcode);
#endif
if ((*s == '(') && (*(s+1) == 'r'))
s++;
- if ((*s == 'r') && ISDIGIT (*(s + 1)))
+ if ((*s == 'r') && ISDIGIT (*(s + 1)))
{
operandp->X_add_number = strtol (s + 1, NULL, 10);
operandp->X_op = O_register;
for (; (*s != ',') && (*s != '\0');)
- s++;
+ s++;
input_line_pointer = save;
- return s;
+ return s;
}
expression (operandp);
operandp->X_op = O_constant;
}
}
-
+
new = input_line_pointer;
input_line_pointer = save;
-
+
#if DEBUG
printf (" %s=parse_operand(%s): operandp->X_op = %u\n", new, s, operandp->X_op);
#endif
operandp->X_op = O_constant;
}
}
-
+
new = input_line_pointer;
input_line_pointer = save;
-
- if ((operandp->X_op == O_symbol) && (*s != '_'))
+
+ if ((operandp->X_op == O_symbol) && (*s != '_'))
{
#if DEBUG
printf ("symbol: '%s'\n", save);
if ((*s == REGISTER_PREFIX) && (*(s + 1) == 'r')) /* Register prefix. */
s++;
- if ((*s == 'r') && ISDIGIT (*(s + 1)))
+ if ((*s == 'r') && ISDIGIT (*(s + 1)))
{
operandp->X_add_number = strtol (s + 1, NULL, 10);
operandp->X_op = O_register;
/* Build the opcode, checking as we go to make sure that the
operands match.
-
+
If an operand matches, we modify the_insn or opcode appropriately,
and do a "continue". If an operand fails to match, we "break". */
if (insn->args[0] != '\0')
/* We are truly done. */
the_insn.opcode = opcode;
if (check_invalid_opcode (opcode))
- as_bad (_("instruction not allowed: %s"), str);
+ as_bad (_("instruction not allowed: %s"), str);
return;
}
as_bad (_("too many operands: %s"), s);
#if DEBUG
printf (" ',' case: operand->X_add_number = %d, *args = %s, *s = %s\n",
operand->X_add_number, args, s);
-#endif
+#endif
continue;
}
break;
case '(': /* Must match a (. */
s = parse_operand (s, operand, args[1] == 'I');
continue;
-
+
case ')': /* Must match a ). */
continue;
if (operand->X_op != O_register)
break; /* Only registers. */
-
+
know (operand->X_add_symbol == 0);
know (operand->X_op_symbol == 0);
regno = operand->X_add_number;
default:
/* if (! ISALPHA (*args))
break; */ /* Only immediate values. */
-
+
if (mask_or_shift)
{
#if DEBUG
reloc = mask_or_shift;
}
mask_or_shift = 0;
-
- if (strncasecmp (args, "LO(", 3) == 0)
+
+ if (strncasecmp (args, "LO(", 3) == 0)
{
#if DEBUG
printf ("reloc_const\n");
#endif
reloc = BFD_RELOC_LO16;
}
- else if (strncasecmp (args, "HI(", 3) == 0)
+ else if (strncasecmp (args, "HI(", 3) == 0)
{
#if DEBUG
printf ("reloc_consth\n");
#endif
reloc = BFD_RELOC_HI16;
}
-
- if (*s == '(')
+
+ if (*s == '(')
{
operand->X_op = O_constant;
#if 0
the_insn.pcrel = 0;
encode (insn, &opcode, operand->X_add_number, *args);
/* the_insn.reloc = BFD_RELOC_NONE; */
- continue;
+ continue;
}
if (reloc == BFD_RELOC_NONE)
printf (" BFD_RELOC_NONE=%d\n", BFD_RELOC_NONE);
#endif
the_insn.exp = *operand;
-
+
/* the_insn.reloc_offset = 1; */
the_insn.pcrel = 1; /* Assume PC-relative jump. */
encode (insn, &opcode, operand->X_add_number, *args);
continue;
}
-
+
/* Types or values of args don't match. */
as_bad (_("invalid operands"));
return;
/* Build the opcode, checking as we go to make sure that the
operands match.
-
+
If an operand matches, we modify the_insn or opcode appropriately,
and do a "continue". If an operand fails to match, we "break". */
if (insn->args[0] != '\0')
- /* Prime the pump. */
+ /* Prime the pump. */
s = parse_operand (s, operand,
insn->args[0] == 'I'
|| strcmp (insn->name, "l.nop") == 0);
/* We are truly done. */
the_insn.opcode = opcode;
if (check_invalid_opcode (opcode))
- as_bad (_("instruction not allowed: %s"), str);
+ as_bad (_("instruction not allowed: %s"), str);
return;
}
as_bad (_("too many operands: %s"), s);
#if DEBUG
printf (" ',' case: operand->X_add_number = %d, *args = %s, *s = %s\n",
operand->X_add_number, args, s);
-#endif
+#endif
continue;
}
break;
case '(': /* Must match a (. */
s = parse_operand (s, operand, args[1] == 'I');
continue;
-
+
case ')': /* Must match a ). */
continue;
if (operand->X_op != O_register)
break; /* Only registers. */
-
+
know (operand->X_add_symbol == 0);
know (operand->X_op_symbol == 0);
regno = operand->X_add_number;
default:
/* if (! ISALPHA (*args))
break; */ /* Only immediate values. */
-
+
if (mask_or_shift)
{
#if DEBUG
reloc = mask_or_shift;
}
mask_or_shift = 0;
-
- if (strncasecmp (args, "LO(", 3) == 0)
+
+ if (strncasecmp (args, "LO(", 3) == 0)
{
#if DEBUG
printf ("reloc_const\n");
#endif
reloc = RELOC_CONST;
}
- else if (strncasecmp (args, "HI(", 3) == 0)
+ else if (strncasecmp (args, "HI(", 3) == 0)
{
#if DEBUG
printf ("reloc_consth\n");
#endif
reloc = RELOC_CONSTH;
}
-
- if (*s == '(')
+
+ if (*s == '(')
{
operand->X_op = O_constant;
#if 0
the_insn.pcrel = 0;
encode (insn, &opcode, operand->X_add_number, *args);
/* the_insn.reloc = NO_RELOC; */
- continue;
+ continue;
}
if (reloc == NO_RELOC)
printf (" NO_RELOC=%d\n", NO_RELOC);
#endif
the_insn.exp = *operand;
-
+
/* the_insn.reloc_offset = 1; */
the_insn.pcrel = 1; /* Assume PC-relative jump. */
encode (insn, &opcode, operand->X_add_number, *args);
continue;
}
-
+
/* Types or values of args don't match. */
as_bad (_("invalid operands"));
return;
fragS * fragP ATTRIBUTE_UNUSED;
{
as_fatal ("or32_convert_frag\n");
-}
+}
#endif
/* Should never be called for or32. */
#if DEBUG
printf ("tc_aout_fix_to_chars\n");
-#endif
+#endif
know (fixP->fx_r_type < BFD_RELOC_NONE);
know (fixP->fx_addsy != NULL);
#if DEBUG
printf ("In tc_aout_pre_write_hook()\n");
#endif
-}
-*/
+}
+*/
#endif
/* Default the values of symbols known that should be "predefined". We
#endif
/* Register name. */
- if (name[0] == 'r' || name[0] == 'R' || name[0] == 'a' || name[0] == 'b')
- {
+ if (name[0] == 'r' || name[0] == 'R' || name[0] == 'a' || name[0] == 'b')
+ {
long maxreg;
/* Parse the number, make sure it has no extra zeroes or
long lab;
char *name;
symbolS *sym;
-
+
/* This is a local label. */
++input_line_pointer;
lab = (long) get_absolute_expression ();
type = 'x';
fieldlimit = 4;
}
- else
+ else
return;
if (ISDIGIT (*s))
SKIP_WHITESPACE ();
input_line_pointer = s;
- expressionP->X_op = O_constant;
+ expressionP->X_op = O_constant;
expressionP->X_unsigned = 1;
expressionP->X_add_number = ((floatbuf[fieldnum * 2]
<< LITTLENUM_NUMBER_OF_BITS)
#if 0
/* FIXME: what follows is broken badly. You can't deal with differences
in radix conventions this way, because of symbolic constants, constant
- expressions made up of pieces of differing radix, etc. The only
+ expressions made up of pieces of differing radix, etc. The only
choices are to change ../expr.c to know about pdp11 conventions, or
to accept the fact that gas will use consistent conventions that differ
from those of traditional pdp11 assemblers. For now, I've
operand->error = "Error in expression";
break;
}
- /* it's a floating literal... */
+ /* it's a floating literal... */
know (operand->reloc.exp.X_add_number < 0);
flonum_gen2vax ('f', &generic_floating_point_number, literal_float);
operand->word = literal_float[0];
operand->error = "Float AC not legal as integer operand";
return str;
}
-
+
return parse_op_noreg (str, operand);
}
/* -mbooke64 means enable 64-bit BookE support. */
else if (strcmp (arg, "booke64") == 0)
{
- ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE |
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE |
PPC_OPCODE_BOOKE64 | PPC_OPCODE_64;
ppc_size = PPC_OPCODE_64;
}
/* The .bf pseudo-op. This is just like a COFF C_FCN symbol named
".bf". If the pseudo op .bi was seen before .bf, patch the .bi sym
with the correct line number */
-
+
static symbolS *saved_bi_sym = 0;
static void
SA_SET_SYM_LNNO (sym, coff_line_base);
/* Line number for bi. */
- if (saved_bi_sym)
+ if (saved_bi_sym)
{
S_SET_VALUE (saved_bi_sym, coff_n_line_nos);
saved_bi_sym = 0;
}
-
+
symbol_get_tc (sym)->output = 1;
symbol_get_tc (sym)->output = 1;
/* Save bi. */
- if (ei)
+ if (ei)
saved_bi_sym = 0;
else
saved_bi_sym = sym;
/* tc-ppc.h -- Header file for tc-ppc.c.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
#define md_elf_section_flags(FLAGS, ATTR, TYPE) ppc_section_flags (FLAGS, ATTR, TYPE)
#if BFD_DEFAULT_TARGET_SIZE == 64
-/* Extra sections for 64-bit ELF PPC. */
+/* Extra sections for 64-bit ELF PPC. */
#define ELF_TC_SPECIAL_SECTIONS \
{ ".toc", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE}, \
{ ".tocbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE},
{ SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH, C (SH64PCREL16PT_64, SH64PCREL32) },
/* C (SH64PCREL16PT_64, SH64PCREL32) */
{ SH64PCREL32_F,
- SH64PCREL32_M,
+ SH64PCREL32_M,
SH64PCREL32_LENGTH,
C (SH64PCREL16PT_64, SH64PCREL48) },
/* C (SH64PCREL16PT_64, SH64PCREL48) */
plus/minus a symbol. However, gas' parser gives us:
O_subtract (O_add (f@PLT, .), .LPCS#+2)
-
+
so we attempt to transform this into:
O_subtract (f@PLT, O_subtract (.LPCS#+2, .))
- which we can handle simply below. */
+ which we can handle simply below. */
if (exp->X_op == O_subtract)
{
if (sh_PIC_related_p (exp->X_op_symbol))
case BFD_RELOC_UNUSED:
*r_type_p = BFD_RELOC_SH_GOTPC;
break;
-
+
default:
abort ();
}
case BFD_RELOC_32_GOTOFF:
*r_type_p = BFD_RELOC_SH_GOTOFF_LOW16;
break;
-
+
case BFD_RELOC_SH_GOTPLT32:
*r_type_p = BFD_RELOC_SH_GOTPLT_LOW16;
break;
-
+
case BFD_RELOC_32_GOT_PCREL:
*r_type_p = BFD_RELOC_SH_GOT_LOW16;
break;
-
+
case BFD_RELOC_32_PLT_PCREL:
*r_type_p = BFD_RELOC_SH_PLT_LOW16;
break;
case BFD_RELOC_32_GOTOFF:
*r_type_p = BFD_RELOC_SH_GOTOFF_MEDLOW16;
break;
-
+
case BFD_RELOC_SH_GOTPLT32:
*r_type_p = BFD_RELOC_SH_GOTPLT_MEDLOW16;
break;
-
+
case BFD_RELOC_32_GOT_PCREL:
*r_type_p = BFD_RELOC_SH_GOT_MEDLOW16;
break;
-
+
case BFD_RELOC_32_PLT_PCREL:
*r_type_p = BFD_RELOC_SH_PLT_MEDLOW16;
break;
case BFD_RELOC_32_GOTOFF:
*r_type_p = BFD_RELOC_SH_GOTOFF_MEDHI16;
break;
-
+
case BFD_RELOC_SH_GOTPLT32:
*r_type_p = BFD_RELOC_SH_GOTPLT_MEDHI16;
break;
-
+
case BFD_RELOC_32_GOT_PCREL:
*r_type_p = BFD_RELOC_SH_GOT_MEDHI16;
break;
-
+
case BFD_RELOC_32_PLT_PCREL:
*r_type_p = BFD_RELOC_SH_PLT_MEDHI16;
break;
case BFD_RELOC_32_GOTOFF:
*r_type_p = BFD_RELOC_SH_GOTOFF_HI16;
break;
-
+
case BFD_RELOC_SH_GOTPLT32:
*r_type_p = BFD_RELOC_SH_GOTPLT_HI16;
break;
-
+
case BFD_RELOC_32_GOT_PCREL:
*r_type_p = BFD_RELOC_SH_GOT_HI16;
break;
-
+
case BFD_RELOC_32_PLT_PCREL:
*r_type_p = BFD_RELOC_SH_PLT_HI16;
break;
as_bad (_("unsupported BFD relocation size %u"), size);
r_type = BFD_RELOC_UNUSED;
}
-
+
fix_new_exp (frag, off, size, exp, 0, r_type);
}
{
if (nLastDestReg == user->reg)
as_warn (_("destination register is same for parallel insns"));
-
+
bIsPPI = false;
}
}
return cont + len;
return NULL;
-}
+}
int
sh_parse_name (name, exprP, nextcharP)
}
exprP->X_add_symbol = symbol_find_or_make (name);
-
+
if (*nextcharP != '@')
goto no_suffix;
else if ((next_end = sh_end_of_match (next + 1, "GOTOFF")))
copy_symbol_attributes (symp, mainsym);
/* Unset the BranchTarget mark that can be set at
- attribute-copying. */
+ attribute-copying. */
S_SET_OTHER (symp,
- S_GET_OTHER (symp) & ~STO_SH5_ISA32);
+ S_GET_OTHER (symp) & ~STO_SH5_ISA32);
/* The GLOBAL and WEAK attributes are not copied
- over by copy_symbol_attributes. Do it here. */
+ over by copy_symbol_attributes. Do it here. */
if (S_IS_WEAK (mainsym))
S_SET_WEAK (symp);
else if (S_IS_EXTERNAL (mainsym))
if (main_symbol)
{
char *sym_name = (char *) S_GET_NAME (symp);
-
+
/* All datalabels not used in relocs should be gone by now.
We change those remaining to have the name of the main
reloctype = BFD_RELOC_32_GOTOFF;
reloc_needed = 1;
/* Fall through. */
-
+
case C (MOVI_IMM_64, UNDEF_MOVI):
case C (MOVI_IMM_64, MOVI_64):
{
reloctype = BFD_RELOC_32_GOTOFF;
reloc_needed = 1;
/* Fall through. */
-
+
case C (MOVI_IMM_32, UNDEF_MOVI):
case C (MOVI_IMM_32, MOVI_32):
{
movi_imm_64_pcrel_reloc_needed:
reloc_needed = 1;
/* Fall through. */
-
+
case C (MOVI_IMM_32_PCREL, MOVI_64):
case C (MOVI_IMM_64_PCREL, MOVI_64):
{
case C (MOVI_IMM_64_PCREL, MOVI_GOTPC):
fragP->fr_var = md_relax_table[fragP->fr_subtype].rlx_length;
break;
-
+
default:
abort ();
}
opjp->reloctype = BFD_RELOC_SH_GOT_LOW16;
else if (opjp->reloctype == BFD_RELOC_SH_GOTPLT32)
opjp->reloctype = BFD_RELOC_SH_GOTPLT_LOW16;
-
+
if ((opjp->reloctype == BFD_RELOC_NONE
|| opjp->reloctype == BFD_RELOC_32_GOTOFF
|| opjp->reloctype == BFD_RELOC_32_PLT_PCREL
opjp->reloctype == BFD_RELOC_NONE
? BFD_RELOC_SH_PT_16
: opjp->reloctype);
-
+
j++;
break;
}
opjp->reloctype == BFD_RELOC_NONE
? SHMEDIA_BFD_RELOC_PT
: opjp->reloctype);
-
+
j++;
break;
}
exp.X_op_symbol = startsym;
emit_expr (&exp, 4);
- /* Emit the cr_size part. */
+ /* Emit the cr_size part. */
exp.X_op = O_constant;
exp.X_add_number = cr_type;
exp.X_add_symbol = NULL;
exp->X_add_symbol = dl_symp;
/* Unset the BranchTarget mark that can be set at symbol
- creation or attributes copying. */
+ creation or attributes copying. */
S_SET_OTHER (dl_symp, S_GET_OTHER (dl_symp) & ~STO_SH5_ISA32);
/* The GLOBAL and WEAK attributes are not copied over by
- copy_symbol_attributes. Do it here. */
+ copy_symbol_attributes. Do it here. */
if (S_IS_WEAK (symp))
S_SET_WEAK (dl_symp);
else if (S_IS_EXTERNAL (symp))
}
/* Vtables don't need "datalabel" but we allow it by simply deleting
- any we find. */
+ any we find. */
static char *
strip_datalabels ()
/* The argument is capitalized if it should be zero-terminated
's' is normal string with upper 8-bits zero-filled, 'p' is packed.
- Code copied from stringer, and slightly modified so that strings are packed
+ Code copied from stringer, and slightly modified so that strings are packed
and encoded into the correct octets. */
static void
tm->name, hash_err);
}
parop_hash = hash_new ();
- for (tm = (template *) tic54x_paroptab; tm->name; tm++)
+ for (tm = (template *) tic54x_paroptab; tm->name; tm++)
{
if (hash_find (parop_hash, tm->name))
continue;
#include <stdio.h>
#include "as.h"
-#include "subsegs.h"
+#include "subsegs.h"
#include "symcat.h"
#include "opcodes/xstormy16-desc.h"
#include "opcodes/xstormy16-opc.h"
FILE * stream;
{
fprintf (stream, _(" XSTORMY16 specific command line options:\n"));
-}
+}
/* The target specific pseudo-ops which we support. */
const pseudo_typeS md_pseudo_table[] =
md_begin ()
{
/* Initialize the `cgen' interface. */
-
+
/* Set the machine number and endian. */
gas_cgen_cpu_desc = xstormy16_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0,
CGEN_CPU_OPEN_ENDIAN,
insn.insn = xstormy16_cgen_assemble_insn
(gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg);
-
+
if (!insn.insn)
{
as_bad (errmsg);
CGEN_FIELDS_BITSIZE (& insn.fields), 0, NULL);
}
-void
+void
md_operand (e)
expressionS * e;
{
fix = fix_new_exp (f, where, nbytes, exp, 0, code);
}
-/* Called while parsing an instruction to create a fixup.
+/* Called while parsing an instruction to create a fixup.
Create BFD_RELOC_XSTORMY16_FPTR16 relocations. */
fixS *
{
fixS *fixP;
operatorT op = exp->X_op;
-
+
if (op == O_fptr_symbol)
exp->X_op = O_symbol;
{
/* No assembler relaxation is defined (or necessary) for this port. */
abort ();
-}
+}
/* *fragP has been relaxed to its final size, and now needs to have
the bytes inside it modified to conform to the new size.
case XSTORMY16_OPERAND_IMM12:
case XSTORMY16_OPERAND_HMEM8:
return BFD_RELOC_NONE;
-
+
case XSTORMY16_OPERAND_IMM8:
case XSTORMY16_OPERAND_LMEM8:
return fixP->fx_pcrel ? BFD_RELOC_8_PCREL : BFD_RELOC_8;
-
+
case XSTORMY16_OPERAND_IMM16:
fixP->fx_where += 2;
return fixP->fx_pcrel ? BFD_RELOC_16_PCREL : BFD_RELOC_16;
case XSTORMY16_OPERAND_REL12:
fixP->fx_where += 2;
- /* Fall through... */
+ /* Fall through... */
case XSTORMY16_OPERAND_REL12A:
fixP->fx_pcrel = 1;
return BFD_RELOC_XSTORMY16_REL_12;
{
if (fixP->fx_addsy == NULL)
return 1;
-
- /* Prevent all adjustments to global symbols. */
+
+ /* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
-
+
if (S_IS_WEAK (fixP->fx_addsy))
return 0;
-
+
/* We need the symbol name for the VTABLE entries. */
if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
default:
break;
}
-
+
/* FIXME FIXME FIXME: The value we are passed in *valuep includes
the symbol values. Since we are using BFD_ASSEMBLER, if we are
doing this relocation the code in write.c is going to call
/* This is a RELA port. Thus, it does not need to store a
value if it is going to make a reloc. What's more, when
assembling a line like
-
+
.byte global-0x7f00
-
+
we'll get a spurious error message if we try to stuff 0x7f00 into
the byte. */
if (! fixP->fx_done)
md_number_to_chars (litP, (valueT) (*wordP--), sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
-
+
return 0;
}
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Boston, MA 02111-1307, USA. */
#define TC_XSTORMY16