* config/tc-a29k.c: Fix formatting.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arc.h: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-arm.h: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-avr.h: Likewise.
* config/tc-tic30.c: Likewise.
* config/tc-tic30.h: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-tic54x.h: Likewise.
* config/tc-tic80.c: Likewise.
* config/tc-tic80.h: Likewise.
+2000-09-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-a29k.c: Fix formatting.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arc.h: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-arm.h: Likewise.
+ * config/tc-avr.c: Likewise.
+ * config/tc-avr.h: Likewise.
+ * config/tc-tic30.c: Likewise.
+ * config/tc-tic30.h: Likewise.
+ * config/tc-tic54x.c: Likewise.
+ * config/tc-tic54x.h: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-tic80.h: Likewise.
+
2000-09-14 Timothy Wall <twall@cygnus.com>
* config/tc-ia64.c (specify_resource): For PR%/PR63, note types of
/* tc-a29k.c -- Assemble for the AMD 29000.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1998
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 98, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
.line and .file directives will appear in the pre-processed output */
/* Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
+ #NO_APP at the beginning of its output. */
/* Also note that comments like this one will always work */
const char line_comment_chars[] = "#";
return;
}
/* Literals can't go in the text segment because you can't read from
- instruction memory on some 29k's. So, into initialized data. */
+ instruction memory on some 29k's. So, into initialized data. */
if (strncmp (input_line_pointer, ".lit", 4) == 0)
{
input_line_pointer += 4;
}
/* Hack to avoid multiple opcode entries. We pre-locate all the
- variations (b/i field and P/A field) and handle them. */
+ variations (b/i field and P/A field) and handle them. */
if (!strcmp (name, machine_opcodes[i + 1].name))
{
/* 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". */
case '\0': /* end of args */
if (*s == '\0')
{
- /* We are truly done. */
+ /* We are truly done. */
the_insn.opcode = opcode;
return;
}
}
break;
-
case 'f': /* FS bits of CONVERT */
if (operand->X_op == O_constant &&
operand->X_add_number < 4)
fixP->fx_addnumber = val; /* Remember value for emit_reloc */
-
know (fixP->fx_size == 4);
know (fixP->fx_r_type < NO_RELOC);
On sparc/29k: first 4 bytes are normal unsigned long address, next three
bytes are index, most sig. byte first. Byte 7 is broken up with
bit 7 as external, bits 6 & 5 unused, and the lower
- five bits as relocation type. Next 4 bytes are long addend. */
+ five bits as relocation type. Next 4 bytes are long addend. */
/* Thanx and a tip of the hat to Michael Bloom, mb@ttidca.tti.com */
#ifdef OBJ_AOUT
long maxreg;
/* Parse the number, make sure it has no extra zeroes or
- trailing chars. */
+ trailing chars. */
regnum = atol (&name[2]);
if (name[0] == 's' || name[0] == 'S')
type = 'x';
fieldlimit = 4;
}
- else
+ else
{
return;
}
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)
{
return fixP->fx_where + fixP->fx_frag->fr_address;
}
-
-/* end of tc-a29k.c */
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
- Copyright (C) 1989, 93-98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1989, 93-98, 1999, 2000 Free Software Foundation, Inc.
Contributed by Carnegie Mellon University, 1993.
Written by Alessandro Forin, based on earlier gas-1.38 target CPU files.
Modified by Ken Raeburn for gas-2.x and ECOFF support.
enum alpha_macro_arg argsets[16];
};
-/* Extra expression types. */
+/* Extra expression types. */
#define O_pregister O_md1 /* O_register, in parentheses */
#define O_cpregister O_md2 /* + a leading comma */
#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprellow)
#endif
-
/* Macros for extracting the type and number of encoded register tokens */
#define is_ir_num(x) (((x) & 32) == 0)
#endif
static segT alpha_lit8_section;
-/* Symbols referring to said sections. */
+/* Symbols referring to said sections. */
#ifdef OBJ_ECOFF
static symbolS *alpha_lita_symbol;
static symbolS *alpha_lit4_symbol;
} cpu_types[] =
{
/* Ad hoc convention: cpu number gets palcode, process code doesn't.
- This supports usage under DU 4.0b that does ".arch ev4", and
+ This supports usage under DU 4.0b that does ".arch ev4", and
usage in MILO that does -m21064. Probably something more
specific like -m21064-pal should be used, but oh well. */
break;
#ifdef OBJ_EVAX
- case '+': /* For g++. Hash any name > 63 chars long. */
+ case '+': /* For g++. Hash any name > 63 chars long. */
alpha_flag_hash_long_names = 1;
break;
{
char *hold = input_line_pointer++;
- /* First try for parenthesized register ... */
+ /* First try for parenthesized register ... */
expression (tok);
if (*input_line_pointer == ')' && tok->X_op == O_register)
{
else switch (fixup->reloc)
{
#ifdef OBJ_ELF
- /* These relocation types are only used internally. */
+ /* These relocation types are only used internally. */
case BFD_RELOC_ALPHA_GPDISP_HI16:
case BFD_RELOC_ALPHA_GPDISP_LO16:
size = 2;
case O_subtract:
/* Assume that this difference expression will be resolved to an
- absolute value and that that value will fit in 16 bits. */
+ absolute value and that that value will fit in 16 bits. */
assert (explicit_reloc == (const expressionS *)0);
set_tok_reg (newtok[0], targreg);
{
offsetT align;
- input_line_pointer++;
+ input_line_pointer++;
align = get_absolute_expression ();
bfd_set_section_alignment (stdoutput, new_seg, align);
}
#ifdef OBJ_EVAX
if (bfd_section_size (stdoutput, new_seg) > 0)
- {
+ {
if (bfd_section_size (stdoutput, new_seg) != temp)
as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."),
S_GET_NAME (symbolP),
#endif
else
{
-#ifdef OBJ_EVAX
+#ifdef OBJ_EVAX
subseg_set (new_seg, 0);
p = frag_more (temp);
new_seg->flags |= SEC_IS_COMMON;
default:
as_bad (_("Invalid argument %d to .prologue."), arg);
break;
- }
+ }
}
static void
#endif /* OBJ_ELF */
#ifdef OBJ_EVAX
-
+
/* Handle the section specific pseudo-op. */
-
+
static void
s_alpha_section (secid)
int secid;
alpha_current_align = 0;
}
-
/* Parse .ent directives. */
static void
return;
}
-
/* Parse .frame <framreg>,<framesize>,RA,<rsa_offset> directives. */
static void
return;
}
-
/* Support for crash debug on vms. */
static void
return;
}
-
static void
s_alpha_linkage (ignore)
int ignore;
return;
}
-
static void
s_alpha_code_address (ignore)
int ignore;
return;
}
-
static void
s_alpha_fp_save (ignore)
int ignore;
return;
}
-
static void
s_alpha_mask (ignore)
int ignore;
return;
}
-
static void
s_alpha_fmask (ignore)
int ignore;
return;
}
-
static void
s_alpha_file (ignore)
int ignore;
/* tc-arc.c -- Assembler for the ARC
- Copyright (C) 1994, 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
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. */
+ 02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
.line and .file directives will appear in the pre-processed output */
/* Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs
- #NO_APP at the beginning of its output. */
+ #NO_APP at the beginning of its output. */
/* Also note that comments started like this one will always
- work if '/' isn't otherwise defined. */
+ work if '/' isn't otherwise defined. */
const char line_comment_chars[] = "#";
const char line_separator_chars[] = "";
number_to_chars_littleendian (buf, val, n);
}
-/* Round up a section size to the appropriate boundary. */
+/* Round up a section size to the appropriate boundary. */
valueT
md_section_align (segment, size)
to achieve the same effect. Perhaps put a special cookie in X_add_number
to mark the expression as special. */
-void
+void
md_operand (expressionP)
expressionS *expressionP;
{
++input_line_pointer;
if (expressionP->X_op == O_symbol
&& expressionP->X_add_number == 0
- /* I think this test is unnecessary but just as a sanity check... */
+ /* I think this test is unnecessary but just as a sanity check... */
&& expressionP->X_op_symbol == NULL)
{
expressionS two;
/* The location from which a PC relative jump should be calculated,
given a PC relative reloc. */
-long
+long
md_pcrel_from (fixP)
fixS *fixP;
{
/* tc-arc.h - Macros and type defines for the ARC.
- Copyright (C) 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler.
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. */
+ 02111-1307, USA. */
#define TC_ARC 1
int size;
- /* Which CPU variants this exists for. */
+ /* Which CPU variants this exists for. */
unsigned long variants;
/* Function to call to parse args. */
static void
symbol_locate (symbolP, name, segment, valu, frag)
- symbolS * symbolP;
+ symbolS * symbolP;
CONST char * name; /* It is copied, the caller can modify. */
segT segment; /* Segment identifier (SEG_<something>). */
valueT valu; /* Symbol value. */
{
extern struct list_info_struct * listing_tail;
fragS * dummy_frag = (fragS *) xmalloc (sizeof (fragS));
-
+
memset (dummy_frag, 0, sizeof (fragS));
dummy_frag->fr_type = rs_fill;
dummy_frag->line = listing_tail;
* p = '\0';
shift = (const struct asm_shift_name *) hash_find (arm_shift_hsh, * str);
* p = c;
-
+
if (shift == NULL)
{
inst.error = _("Shift expression expected");
}
assert (shift->properties->index == shift_properties[shift->properties->index].index);
-
+
if (shift->properties->index == SHIFT_RRX)
{
* str = p;
* str = p;
return FAIL;
}
-
+
inst.error = NULL;
p ++;
-
+
if (my_get_expression (& inst.reloc.exp, & p))
return FAIL;
-
+
/* Validate some simple #expressions. */
if (inst.reloc.exp.X_op == O_constant)
{
support it. */
if (num == 32)
num = 0;
-
+
inst.instruction |= (num << 7) | shift->properties->bit_field;
}
else
inst.reloc.pc_rel = 0;
inst.instruction |= shift->properties->bit_field;
}
-
+
* str = p;
return SUCCESS;
}
/* This file is tc-arm.h
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
#if defined OBJ_COFF || defined OBJ_ELF
# define ARM_BI_ENDIAN
-
+
# define TC_VALIDATE_FIX(fixP, segType, Label) \
if (arm_validate_fix (fixP)) add_symbolP = fixP->fx_addsy
extern boolean arm_validate_fix PARAMS ((struct fix *));
#endif
-
+
#ifdef OBJ_COFF
# if defined TE_PE
# define TC_FORCE_RELOCATION(x) ((x)->fx_r_type == BFD_RELOC_RVA)
#ifdef OBJ_ELF
# define TARGET_FORMAT elf32_arm_target_format()
extern const char * elf32_arm_target_format PARAMS ((void));
-
+
# define TC_FORCE_RELOCATION(fixp) arm_force_relocation (fixp)
extern int arm_force_relocation PARAMS ((struct fix *));
#endif
#define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK))
#define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC))
-
#define TC_START_LABEL(C,STR) \
(c == ':' || (c == '/' && arm_data_in_code ()))
int arm_data_in_code PARAMS ((void));
extern void cons_fix_new_arm PARAMS ((fragS *, int, int, expressionS *));
/* Don't allow symbols to be discarded on GOT related relocs,
- nor on globals. */
+ nor on globals. */
#define tc_fix_adjustable(x) (\
((x)->fx_r_type == BFD_RELOC_ARM_PLT32 \
|| (x)->fx_r_type == BFD_RELOC_ARM_GOT32 \
|| (x)->fx_r_type == BFD_RELOC_ARM_GOTOFF \
|| S_IS_EXTERN ((x)->fx_addsy) \
|| S_IS_WEAK ((x)->fx_addsy)) ? 0 : 1)
-
+
#ifdef OBJ_ELF
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
#else
#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
#endif
-
-/* end of tc-arm.h */
fprintf (stream, _("Known MCU names:"));
x = 1000;
-
+
for (i = 0; mcu_types[i].name; i++)
{
int len = strlen (mcu_types[i].name);
-
+
x += len + 1;
-
+
if (x < 75)
fprintf (stream, " %s", mcu_types[i].name);
else
x = len + 2;
}
}
-
+
fprintf (stream, "\n");
}
if (size + 1 >= limit)
break;
}
-
+
to[size] = 0;
return op_end;
}
int dummy ATTRIBUTE_UNUSED;
{
char *str;
-
+
str = (char *) alloca (20);
input_line_pointer = extract_word (input_line_pointer, str, 20);
md_parse_option (OPTION_MMCU, str);
avr_opt.no_wrap = 1;
return 1;
}
-
+
return 0;
}
input_line_pointer = t;
*sizeP = prec * sizeof (LITTLENUM_TYPE);
-
+
/* This loop outputs the LITTLENUMs in REVERSE order. */
for (wordP = words + prec - 1; prec--;)
{
md_number_to_chars (litP, (valueT) (*wordP--), sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
-
+
return NULL;
}
if (ex.X_add_number > max || ex.X_add_number < 0)
as_bad (_("number must be less than %d"), max + 1);
-
+
return ex.X_add_number;
}
{
if (*op == ',')
++op;
-
+
if (*op == '=')
{
reg2 = reg1;
reg2 = avr_operand (opcode, where, op, &str);
}
-
+
if (reg1_present && reg2_present)
reg2 = (reg2 & 0xf) | ((reg2 << 5) & 0x200);
else if (reg2_present)
if (*str == 'r' || *str == 'R')
{
char r_name[20];
-
+
str = extract_word (str, r_name, sizeof (r_name));
op_mask = 0xff;
if (isdigit (r_name[1]))
op_mask = avr_get_constant (str, 31);
str = input_line_pointer;
}
-
+
if (op_mask <= 31)
{
switch (*op)
as_bad (_("register r16-r23 required"));
op_mask -= 16;
break;
-
+
case 'd':
if (op_mask < 16)
as_bad (_("register number above 15 required"));
op_mask -= 16;
break;
-
+
case 'v':
if (op_mask & 1)
as_bad (_("even register number required"));
op_mask >>= 1;
break;
-
+
case 'w':
if ((op_mask & 1) || op_mask < 24)
as_bad (_("register r24, r26, r28 or r30 required"));
case 'e':
{
char c;
-
+
if (*str == '-')
{
str = skip_space (str + 1);
case 'z':
if (*str == '-')
as_bad (_("can't predecrement"));
-
+
if (! (*str == 'z' || *str == 'Z'))
as_bad (_("pointer register Z required"));
-
+
str = skip_space (str + 1);
if (*str == '+')
case 'b':
{
char c = tolower (*str++);
-
+
if (c == 'y')
op_mask |= 0x8;
else if (c != 'z')
case 'M':
{
bfd_reloc_code_real_type r_type;
-
+
input_line_pointer = str;
r_type = avr_ldi_expression (&op_expr);
str = input_line_pointer;
case 'n':
{
unsigned int x;
-
+
x = ~avr_get_constant (str, 255);
str = input_line_pointer;
op_mask |= (x & 0xf) | ((x << 4) & 0xf00);
case 'K':
{
unsigned int x;
-
+
x = avr_get_constant (str, 63);
str = input_line_pointer;
op_mask |= (x & 0xf) | ((x & 0x30) << 2);
case 's':
{
unsigned int x;
-
+
x = avr_get_constant (str, 7);
str = input_line_pointer;
if (*op == 'S')
case 'P':
{
unsigned int x;
-
+
x = avr_get_constant (str, 63);
str = input_line_pointer;
op_mask |= (x & 0xf) | ((x & 0x30) << 5);
case 'p':
{
unsigned int x;
-
+
x = avr_get_constant (str, 31);
str = input_line_pointer;
op_mask |= x << 3;
}
break;
-
+
case '?':
break;
-
+
default:
as_bad (_("unknown constraint `%c'"), *op);
}
-
+
*line = str;
return op_mask;
}
&& (!S_IS_DEFINED (fixp->fx_addsy)
|| (S_GET_SEGMENT (fixp->fx_addsy) != sec)))
return 0;
-
+
return fixp->fx_frag->fr_address + fixp->fx_where;
}
else if (fixp->fx_pcrel)
{
segT s = S_GET_SEGMENT (fixp->fx_addsy);
-
+
if (fixp->fx_addsy && (s == seg || s == absolute_section))
{
value = S_GET_VALUE (fixp->fx_addsy) + *valuep;
else
{
value = fixp->fx_offset;
-
+
if (fixp->fx_subsy != (symbolS *) NULL)
{
if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section)
}
}
}
-
+
switch (fixp->fx_r_type)
{
default:
if (value & 1)
as_bad_where (fixp->fx_file, fixp->fx_line,
_("odd address operand: %ld"), value);
-
+
/* Instruction addresses are always right-shifted by 1. */
value >>= 1;
--value; /* Correct PC. */
-
+
if (value < -64 || value > 63)
as_bad_where (fixp->fx_file, fixp->fx_line,
_("operand out of range: %ld"), value);
if (value & 1)
as_bad_where (fixp->fx_file, fixp->fx_line,
_("odd address operand: %ld"), value);
-
+
/* Instruction addresses are always right-shifted by 1. */
value >>= 1;
--value; /* Correct PC. */
case BFD_RELOC_AVR_CALL:
{
unsigned long x;
-
+
x = bfd_getl16 (where);
if (value & 1)
as_bad_where (fixp->fx_file, fixp->fx_line,
tmp = str;
str = extract_word (str, op, sizeof (op));
-
+
if (op[0])
{
mod = (int) hash_find (avr_mod_hash, op);
-
+
if (mod)
{
int closes = 0;
-
+
mod -= 10;
str = skip_space (str);
-
+
if (*str == '(')
{
int neg_p = 0;
-
+
++str;
-
+
if (strncmp ("pm(", str, 3) == 0
|| strncmp ("-(pm(", str, 5) == 0)
{
}
else
as_bad (_("illegal expression"));
-
+
if (*str == '-')
{
neg_p = 1;
else
str += 3;
}
-
+
if (*str == '-' && *(str + 1) == '(')
{
neg_p ^= 1;
++closes;
str += 2;
}
-
+
input_line_pointer = str;
expression (exp);
-
+
do
{
if (*input_line_pointer != ')')
input_line_pointer++;
}
while (closes--);
-
+
return neg_p ? EXP_MOD_NEG_RELOC (mod) : EXP_MOD_RELOC (mod);
}
}
}
-
+
input_line_pointer = tmp;
expression (exp);
{
char *pm_name = "pm";
int len = strlen (pm_name);
-
+
if (strncasecmp (input_line_pointer, pm_name, len) == 0)
{
input_line_pointer = skip_space (input_line_pointer + len);
-
+
if (*input_line_pointer == '(')
{
input_line_pointer = skip_space (input_line_pointer + 1);
exp_mod_pm = 1;
expression (exp);
-
+
if (*input_line_pointer == ')')
++input_line_pointer;
else
as_bad (_("`)' required"));
exp_mod_pm = 0;
}
-
+
return;
}
-
+
input_line_pointer = tmp;
}
}
-
+
expression (exp);
}
#error AVR support requires BFD_ASSEMBLER
#endif
-
#define TC_AVR
/* By convention, you should define this macro in the `.h' file. For
example, `tc-m68k.h' defines `TC_M68K'. You might have to use this
if it is necessary to add CPU specific code to the object format
- file. */
+ file. */
#define TARGET_FORMAT "elf32-avr"
/* This macro is the BFD target name to use when creating the output
- file. This will normally depend upon the `OBJ_FMT' macro. */
+ file. This will normally depend upon the `OBJ_FMT' macro. */
#define TARGET_ARCH bfd_arch_avr
-/* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */
+/* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */
#define TARGET_MACH 0
/* This macro is the BFD machine number to pass to
- `bfd_set_arch_mach'. If it is not defined, GAS will use 0. */
+ `bfd_set_arch_mach'. If it is not defined, GAS will use 0. */
#define TARGET_BYTES_BIG_ENDIAN 0
/* You should define this macro to be non-zero if the target is big
- endian, and zero if the target is little endian. */
+ endian, and zero if the target is little endian. */
#define ONLY_STANDARD_ESCAPES
/* If you define this macro, GAS will warn about the use of
- nonstandard escape sequences in a string. */
+ nonstandard escape sequences in a string. */
#define md_operand(x)
/* GAS will call this function for any expression that can not be
recognized. When the function is called, `input_line_pointer'
- will point to the start of the expression. */
+ will point to the start of the expression. */
void avr_parse_cons_expression (expressionS *exp, int nbytes);
#define TC_CONS_FIX_NEW(FRAG,WHERE,N,EXP) avr_cons_fix_new(FRAG,WHERE,N,EXP)
/* You may define this macro to generate a fixup for a data
- allocation pseudo-op. */
+ allocation pseudo-op. */
#define md_number_to_chars number_to_chars_littleendian
/* This should just call either `number_to_chars_bigendian' or
`number_to_chars_littleendian', whichever is appropriate. On
targets like the MIPS which support options to change the
endianness, which function to call is a runtime decision. On
- other targets, `md_number_to_chars' can be a simple macro. */
+ other targets, `md_number_to_chars' can be a simple macro. */
#define WORKING_DOT_WORD
/*
`md_long_jump_size' to the size of a long jump (a jump that can go
anywhere in the function), You should define
`md_create_short_jump' to create a short jump around a long jump,
- and define `md_create_long_jump' to create a long jump. */
+ and define `md_create_long_jump' to create a long jump. */
#define MD_APPLY_FIX3
/* If you define this macro, it means that `tc_gen_reloc' may return
multiple relocation entries for a single fixup. In this case, the
return value of `tc_gen_reloc' is a pointer to a null terminated
- array. */
+ array. */
-#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
+#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
/* If you define this macro, it should return the offset between the
address of a PC relative fixup and the position from which the PC
relative adjustment should be made. On many processors, the base
of a PC relative instruction is the next instruction, so this
- macro would return the length of an instruction. */
+ macro would return the length of an instruction. */
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
/* The number of bytes to put into a word in a listing. This affects
the way the bytes are clumped together in the listing. For
example, a value of 2 might print `1234 5678' where a value of 1
- would print `12 34 56 78'. The default value is 4. */
+ would print `12 34 56 78'. The default value is 4. */
#define LEX_DOLLAR 0
/* AVR port uses `$' as a logical line separator */
/* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30
- Copyright (C) 1998, 1999 Free Software Foundation.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of GAS, the GNU Assembler.
return;
}
/* Check if instruction is a parallel instruction by seeing if the first
- character is a q. */
+ character is a q. */
if (*token_start == 'q')
{
if (tic30_parallel_insn (token_start))
int numops = insn.tm->operands;
/* If operands are not the same, then see if any of the operands are not
required. Then recheck with number of given operands. If they are still not
- the same, then give an error, otherwise carry on. */
+ the same, then give an error, otherwise carry on. */
for (i = 0; i < insn.tm->operands; i++)
if (insn.tm->operand_types[i] & NotReq)
numops--;
if (insn.tm->opcode_modifier == AddressMode)
{
int addr_insn = 0;
- /* Store instruction uses the second operand for the address mode. */
+ /* Store instruction uses the second operand for the address mode. */
if ((insn.tm->operand_types[1] & (Indirect | Direct)) == (Indirect | Direct))
addr_insn = 1;
if (insn.operand_type[addr_insn]->op_type & (AllReg))
return;
}
}
- /* Now set the addressing mode for 3 operand instructions. */
+ /* Now set the addressing mode for 3 operand instructions. */
if ((insn.tm->operand_types[0] & op3T1) && (insn.tm->operand_types[1] & op3T2))
{
/* Set the addressing mode to the values used for 2 operand instructions in the
- G addressing field of the opcode. */
+ G addressing field of the opcode. */
char *p;
switch (insn.operand_type[0]->op_type)
{
}
/* Now make up the opcode for the 3 operand instructions. As in parallel
instructions, there will be no unresolved values, so they can be fully formed
- and added to the frag table. */
+ and added to the frag table. */
insn.opcode = insn.tm->base_opcode;
if (insn.operand_type[0]->op_type & Indirect)
{
char *p;
int am_insn = -1;
insn.opcode = insn.tm->base_opcode;
- /* Create frag for instruction - all instructions are 4 bytes long. */
+ /* Create frag for instruction - all instructions are 4 bytes long. */
p = frag_more (INSN_SIZE);
if ((insn.operands > 0) && (insn.tm->opcode_modifier == AddressMode))
{
md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
fix = fix_new_exp (frag_now, p + 3 - (frag_now->fr_literal), 1, &insn.operand_type[0]->direct.direct_expr, 0, 0);
/* Ensure that the assembler doesn't complain about fitting a 24-bit
- address into 8 bits. */
+ address into 8 bits. */
fix->fx_no_overflow = 1;
}
}
}
else if (insn.tm->operand_types[0] & NotReq)
{
- /* Check for NOP instruction without arguments. */
+ /* Check for NOP instruction without arguments. */
md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
}
else if (insn.tm->operands == 0)
{
- /* Check for instructions without operands. */
+ /* Check for instructions without operands. */
md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
}
}
int operands[2]; /* Number of given operands for each insn */
/* Type of operand given in instruction */
operand *operand_type[2][MAX_OPERANDS];
- int swap_operands; /* Whether to swap operands around. */
+ int swap_operands; /* Whether to swap operands around. */
unsigned p_field; /* Value of p field in multiply add/sub instructions */
unsigned opcode; /* Final opcode */
};
/* Get number of R register and indirect reference contained within the first
two operands of each instruction. This is required for the multiply
parallel instructions which require two R registers and two indirect
- references, but not in any particular place. */
+ references, but not in any particular place. */
if ((p_insn.operand_type[count][i]->op_type & Rn) && i < 2)
num_rn++;
else if ((p_insn.operand_type[count][i]->op_type & Indirect) && i < 2)
debug ("P field: %08X\n", p_insn.p_field);
/* Finalise opcode. This is easier for parallel instructions as they have to be
fully resolved, there are no memory addresses allowed, except through indirect
- addressing, so there are no labels to resolve. */
+ addressing, so there are no labels to resolve. */
{
p_insn.opcode = p_insn.tm->base_opcode;
switch (p_insn.tm->oporder)
}
break;
}
- } /* Opcode is finalised at this point for all parallel instructions. */
+ } /* Opcode is finalised at this point for all parallel instructions. */
{ /* Output opcode */
char *p;
p = frag_more (INSN_SIZE);
if (*(token + count) == '(')
{
/* Parenthesis found, so check if a displacement value is inside. If so, get
- the value and remove it from the buffer. */
+ the value and remove it from the buffer. */
if (is_digit_char (*(token + count + 1)))
{
char disp[10];
#undef END_OPERANDS
/* In order to get gas to ignore any | chars at the start of a line,
- this function returns true if a | is found in a line. */
+ this function returns true if a | is found in a line. */
int
tic30_unrecognized_line (c)
char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
value /= INSN_SIZE;
if (fixP->fx_size == 1)
- { /* Special fix for LDP instruction. */
+ { /* Special fix for LDP instruction. */
value = (value & 0x00FF0000) >> 16;
}
debug ("new value = %ld\n", (long) value);
debug ("fx_size = %d\n", fixP->fx_size);
/* Find the opcode that represents the current instruction in the fr_literal
storage area, and check bit 21. Bit 21 contains whether the current instruction
- is a delayed one or not, and then set the offset value appropriately. */
+ is a delayed one or not, and then set the offset value appropriately. */
if (fixP->fx_frag->fr_literal[fixP->fx_where - fixP->fx_size + 1] & 0x20)
offset = 3;
else
/* tc-tic30.h -- Header file for tc-tic30.c
- Copyright (C) 1998 Free Software Foundation.
+ Copyright (C) 1998, 2000 Free Software Foundation.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of GAS, the GNU Assembler.
/* Define this to 1 if you want the debug output to be on stdout,
otherwise stderr will be used. If stderr is used, there will be a
better synchronisation with the as_bad outputs, but you can't
- capture the output. */
+ capture the output. */
#define USE_STDOUT 0
#define tc_unrecognized_line tic30_unrecognized_line
/* This ensures that all new labels are unique. */
static int local_label_id;
-static struct hash_control *subsym_recurse_hash; /* Prevent infinite recurse. */
+static struct hash_control *subsym_recurse_hash; /* Prevent infinite recurse. */
static struct hash_control *math_hash; /* Built-in math functions. */
/* Allow maximum levels of macro nesting; level 0 is the main substitution
symbol table. The other assembler only does 32 levels, so there! */
md_flush_pending_output ();
#endif
- c = ','; /* Do loop. */
+ c = ','; /* Do loop. */
while (c == ',')
{
SKIP_WHITESPACE ();
#define _TC_TIC54X_H_
/* select the proper coff format (see obj-coff.h) */
-#define TC_TIC54X
+#define TC_TIC54X
#define TARGET_BYTES_BIG_ENDIAN 0
#define OCTETS_PER_BYTE_POWER 1
#define MAX_OPERANDS 4
#define PARALLEL_SEPARATOR '|'
#define LABELS_WITHOUT_COLONS 1
-/* accept 0FFFFh, 1010b, etc. */
+/* accept 0FFFFh, 1010b, etc. */
#define NUMBERS_WITH_SUFFIX 1
/* $ is section program counter */
#define DOLLAR_DOT 1
/* accept parallel lines like
- add #1,a || ld #1, b
+ add #1,a || ld #1, b
(may also be split across lines)
*/
#define DOUBLEBAR_PARALLEL 1
/* affects preprocessor */
#define KEEP_WHITE_AROUND_COLON 1
-/* We need the extra field in the fixup struct to put the relocation in. */
+/* We need the extra field in the fixup struct to put the relocation in. */
#define NEED_FX_R_TYPE
#define tc_frob_label(sym) tic54x_define_label (sym)
extern void tic54x_define_label PARAMS((symbolS *));
-#define md_start_line_hook() tic54x_start_line_hook()
+#define md_start_line_hook() tic54x_start_line_hook()
extern void tic54x_start_line_hook ();
#define md_estimate_size_before_relax(f,s) \
#define md_convert_frag(b,s,f) tic54x_convert_frag(b,s,f)
extern void tic54x_convert_frag(bfd *, segT, fragS *);
-/* Other things we don't support... */
+/* Other things we don't support... */
/* Define away the call to md_operand in the expression parsing code.
This is called whenever the expression parser can't parse the input
- and gives the assembler backend a chance to deal with it instead. */
+ and gives the assembler backend a chance to deal with it instead. */
#define md_operand(X)
/* tc-tic80.c -- Assemble for the TI TMS320C80 (MV)
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
str++;
/* Isolate the mnemonic from the rest of the string by finding the first
- whitespace character and zapping it to a null byte. */
+ whitespace character and zapping it to a null byte. */
for (scan = str; *scan != '\000' && !isspace (*scan); scan++)
;
/* This file is tc-tic80.h
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define TARGET_FORMAT "coff-tic80"
#define BFD_ARCH TARGET_ARCH
-/* We need the extra field in the fixup struct to put the relocation in. */
+/* We need the extra field in the fixup struct to put the relocation in. */
#define NEED_FX_R_TYPE
/* Define md_number_to_chars as the appropriate standard big endian or
little endian function. Should we someday support endianness as a
- runtime decision, this will need to change. */
+ runtime decision, this will need to change. */
#define md_number_to_chars number_to_chars_littleendian
/* Define away the call to md_operand in the expression parsing code.
This is called whenever the expression parser can't parse the input
- and gives the assembler backend a chance to deal with it instead. */
+ and gives the assembler backend a chance to deal with it instead. */
#define md_operand(x)
extern short tc_coff_fix2rtype ();
#endif /* OBJ_COFF */
-
-/* end of tc-tic80.h */