* tc.h (struct relax_type, relax_typeS): Move from here..

* as.h: ..to here.  Make rlx_forward and rlx_backward an offsetT.
	* ecoff.c (ecoff_new_file): Add appfile param.
	* ecoff.h (ecoff_new_file): Likewise.
	* itbl-lex.h: New file.
	* itbl-lex.l: Include itbl-lex.h.
	* itbl-parse.y: Likewise.
	(insntbl_line, yyparse, yylex): Move to itbl-lex.h.
	* read.c (s_app_file_string): Mark appfile possibly unused.
	* subsegs.c (seg_not_empty_p): Make sec possibly unused.
	* subsegs.h (struct seg_info_trash): Delete.
	(seg_info): Use segment_info_type instead.
	* config/obj-coff.c (struct filename_list): Make filename const char *.
	* config/obj-ecoff.h (obj_app_file): Pass app to ecoff_new_file.
	* config/obj-elf.c (elf_file_symbol): Similarly.
	* config/tc-a29k.c (md_apply_fix3): Make val a valueT.  Don't use
	signed right shift.
	* config/tc-arc.c (md_operand): Warning fix.
	* config/tc-arm.c (arm_parse_reloc): Only define when OBJ_ELF.
	(md_begin): Rearrange #if defined OBJ_COFF || defined OBJ_ELF.
	* config/tc-cris.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Use do while.
	* config/tc-frv.c (frv_force_relocation): Warning fix.
	* config/tc-m68k.c (md_parse_option): Delete unused var.
	* config/tc-mcore.c (mylog2): Rename from log2 throughout.
	* config/tc-sparc.c: Likewise.
	(s_common): Warning fix.
	* config/tc-mips.c (append_insn): Use unsigned long long expressions.
	* config/tc-mmix.c (PUSHJSTUB_MAX, PUSHJSTUB_MIN): Define from
	addressT.
	* config/tc-s390.c (s390_insn): Delete test of unsigned >= 0.
	* config/tc-sh.c (sh_cfi_frame_initial_instructions,
	sh_regname_to_dw2regnum): Only define for OBJ_ELF.
	* config/tc-tic4x.c (tic4x_insert_reg): Use ISLOWER.
	(tic4x_do_align): Use TIC_NOP_OPCODE.
	* config/tc-tic4x.h (TIC_NOP_OPCODE): Rename from NOP_OPCODE.
	* config/tc-vax.c: Include netinet/in.h.
	(tc_headers_hook): Formatting.
	* config/tc-xstormy16.c (md_pcrel_from_section): Correct parens.
This commit is contained in:
Alan Modra 2005-02-17 13:46:05 +00:00
parent c68dac40b0
commit f17c130bd8
30 changed files with 212 additions and 166 deletions

View File

@ -1,3 +1,44 @@
2005-02-17 Alan Modra <amodra@bigpond.net.au>
* tc.h (struct relax_type, relax_typeS): Move from here..
* as.h: ..to here. Make rlx_forward and rlx_backward an offsetT.
* ecoff.c (ecoff_new_file): Add appfile param.
* ecoff.h (ecoff_new_file): Likewise.
* itbl-lex.h: New file.
* itbl-lex.l: Include itbl-lex.h.
* itbl-parse.y: Likewise.
(insntbl_line, yyparse, yylex): Move to itbl-lex.h.
* read.c (s_app_file_string): Mark appfile possibly unused.
* subsegs.c (seg_not_empty_p): Make sec possibly unused.
* subsegs.h (struct seg_info_trash): Delete.
(seg_info): Use segment_info_type instead.
* config/obj-coff.c (struct filename_list): Make filename const char *.
* config/obj-ecoff.h (obj_app_file): Pass app to ecoff_new_file.
* config/obj-elf.c (elf_file_symbol): Similarly.
* config/tc-a29k.c (md_apply_fix3): Make val a valueT. Don't use
signed right shift.
* config/tc-arc.c (md_operand): Warning fix.
* config/tc-arm.c (arm_parse_reloc): Only define when OBJ_ELF.
(md_begin): Rearrange #if defined OBJ_COFF || defined OBJ_ELF.
* config/tc-cris.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Use do while.
* config/tc-frv.c (frv_force_relocation): Warning fix.
* config/tc-m68k.c (md_parse_option): Delete unused var.
* config/tc-mcore.c (mylog2): Rename from log2 throughout.
* config/tc-sparc.c: Likewise.
(s_common): Warning fix.
* config/tc-mips.c (append_insn): Use unsigned long long expressions.
* config/tc-mmix.c (PUSHJSTUB_MAX, PUSHJSTUB_MIN): Define from
addressT.
* config/tc-s390.c (s390_insn): Delete test of unsigned >= 0.
* config/tc-sh.c (sh_cfi_frame_initial_instructions,
sh_regname_to_dw2regnum): Only define for OBJ_ELF.
* config/tc-tic4x.c (tic4x_insert_reg): Use ISLOWER.
(tic4x_do_align): Use TIC_NOP_OPCODE.
* config/tc-tic4x.h (TIC_NOP_OPCODE): Rename from NOP_OPCODE.
* config/tc-vax.c: Include netinet/in.h.
(tc_headers_hook): Formatting.
* config/tc-xstormy16.c (md_pcrel_from_section): Correct parens.
2005-02-17 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (ia64_parse_name): Don't advance 'name' when

View File

@ -1,6 +1,6 @@
/* as.h - global header file
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003
1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -380,6 +380,22 @@ typedef unsigned int relax_substateT;
/* Enough bits for address, but still an integer type.
Could be a problem, cross-assembling for 64-bit machines. */
typedef addressT relax_addressT;
struct relax_type
{
/* Forward reach. Signed number. > 0. */
offsetT rlx_forward;
/* Backward reach. Signed number. < 0. */
offsetT rlx_backward;
/* Bytes length of this address. */
unsigned char rlx_length;
/* Next longer relax-state. 0 means there is no 'next' relax-state. */
relax_substateT rlx_more;
};
typedef struct relax_type relax_typeS;
/* main program "as.c" (command arguments etc). */

View File

@ -1,6 +1,6 @@
/* coff object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004
1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS.
@ -1859,7 +1859,7 @@ int function_lineoff = -1; /* Offset in line#s where the last function
into the string table. */
struct filename_list
{
char *filename;
const char *filename;
struct filename_list *next;
};

View File

@ -1,5 +1,5 @@
/* ECOFF object file format header file.
Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002
Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian@cygnus.com>.
@ -63,7 +63,7 @@ extern void ecoff_frob_file PARAMS ((void));
#define obj_symbol_new_hook ecoff_symbol_new_hook
/* Record file switches in the ECOFF symbol table. */
#define obj_app_file(name, app) ecoff_new_file (name)
#define obj_app_file(name, app) ecoff_new_file (name, app)
/* At the moment we don't want to do any stabs processing in read.c. */
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \

View File

@ -1,6 +1,6 @@
/* ELF object file format
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -260,7 +260,7 @@ elf_file_symbol (const char *s, int appfile)
}
#ifdef NEED_ECOFF_DEBUG
ecoff_new_file (s);
ecoff_new_file (s, appfile);
#endif
}

View File

@ -1,5 +1,6 @@
/* tc-a29k.c -- Assemble for the AMD 29000.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001,
2002, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -787,10 +788,10 @@ md_number_to_chars (buf, val, n)
void
md_apply_fix3 (fixP, valP, seg)
fixS *fixP;
valueT * valP;
valueT *valP;
segT seg ATTRIBUTE_UNUSED;
{
long val = *valP;
valueT val = *valP;
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
@ -864,9 +865,7 @@ md_apply_fix3 (fixP, valP, seg)
}
else if (fixP->fx_pcrel)
{
long v = val >> 17;
if (v != 0 && v != -1)
if (val + 0x20000 > 0x3ffff)
as_bad_where (fixP->fx_file, fixP->fx_line,
"call/jmp target out of range");
}

View File

@ -1,5 +1,5 @@
/* tc-arc.c -- Assembler for the ARC
Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
@ -1645,50 +1645,52 @@ md_operand (expressionP)
{
char *p = input_line_pointer;
if (*p == '%')
if (strncmp (p, "%st(", 4) == 0)
{
input_line_pointer += 4;
expression (expressionP);
if (*input_line_pointer != ')')
{
as_bad ("missing ')' in %%-op");
return;
}
++input_line_pointer;
arc_code_symbol (expressionP);
}
else
{
/* It could be a register. */
int i, l;
struct arc_ext_operand_value *ext_oper = arc_ext_operands;
p++;
if (*p != '%')
return;
while (ext_oper)
{
l = strlen (ext_oper->operand.name);
if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
{
input_line_pointer += l + 1;
expressionP->X_op = O_register;
expressionP->X_add_number = (int) &ext_oper->operand;
return;
}
ext_oper = ext_oper->next;
}
for (i = 0; i < arc_reg_names_count; i++)
{
l = strlen (arc_reg_names[i].name);
if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
{
input_line_pointer += l + 1;
expressionP->X_op = O_register;
expressionP->X_add_number = (int) &arc_reg_names[i];
break;
}
}
}
if (strncmp (p, "%st(", 4) == 0)
{
input_line_pointer += 4;
expression (expressionP);
if (*input_line_pointer != ')')
{
as_bad ("missing ')' in %%-op");
return;
}
++input_line_pointer;
arc_code_symbol (expressionP);
}
else
{
/* It could be a register. */
int i, l;
struct arc_ext_operand_value *ext_oper = arc_ext_operands;
p++;
while (ext_oper)
{
l = strlen (ext_oper->operand.name);
if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
{
input_line_pointer += l + 1;
expressionP->X_op = O_register;
expressionP->X_add_number = (int) &ext_oper->operand;
return;
}
ext_oper = ext_oper->next;
}
for (i = 0; i < arc_reg_names_count; i++)
{
l = strlen (arc_reg_names[i].name);
if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
{
input_line_pointer += l + 1;
expressionP->X_op = O_register;
expressionP->X_add_number = (int) &arc_reg_names[i];
break;
}
}
}
}
/* We have no need to default values of symbols.

View File

@ -1,6 +1,6 @@
/* tc-arm.c -- Assemble for the ARM
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@ -4551,6 +4551,7 @@ do_t_bkpt (char * str)
end_of_line (str);
}
#ifdef OBJ_ELF
static bfd_reloc_code_real_type
arm_parse_reloc (void)
{
@ -4591,6 +4592,7 @@ arm_parse_reloc (void)
return reloc_map[i].reloc;
}
#endif
/* ARM V5 branch-link-exchange (argument parse) for BLX(1) only.
Expects inst.instruction is set for BLX(1).
@ -11028,6 +11030,7 @@ md_begin (void)
cpu_variant = mcpu_cpu_opt | mfpu_opt;
#if defined OBJ_COFF || defined OBJ_ELF
{
unsigned int flags = 0;
@ -11038,7 +11041,6 @@ md_begin (void)
{
case EF_ARM_EABI_UNKNOWN:
#endif
#if defined OBJ_COFF || defined OBJ_ELF
/* Set the flags in the private structure. */
if (uses_apcs_26) flags |= F_APCS26;
if (support_interwork) flags |= F_INTERWORK;
@ -11064,7 +11066,7 @@ md_begin (void)
/* Using VFP conventions (even if soft-float). */
if (cpu_variant & FPU_VFP_EXT_NONE)
flags |= F_VFP_FLOAT;
#endif
#if defined OBJ_ELF
if (cpu_variant & FPU_ARCH_MAVERICK)
flags |= EF_ARM_MAVERICK_FLOAT;
@ -11078,7 +11080,6 @@ md_begin (void)
abort ();
}
#endif
#if defined OBJ_COFF || defined OBJ_ELF
bfd_set_private_flags (stdoutput, flags);
/* We have run out flags in the COFF header to encode the
@ -11098,8 +11099,8 @@ md_begin (void)
bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
}
}
#endif
}
#endif
/* Record the CPU type as well. */
switch (cpu_variant & ARM_CPU_MASK)

View File

@ -1,5 +1,6 @@
/* tc-cris.h -- Header file for tc-cris.c, the CRIS GAS port.
Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Axis Communications AB, Lund, Sweden.
Originally written for GAS 1.38.1 by Mikael Asker.
@ -152,7 +153,7 @@ extern void tc_cris_check_adjusted_broken_word PARAMS ((offsetT,
tc_cris_check_adjusted_broken_word ((offsetT) (new_offset), brokw)
/* We don't want any implicit alignment, so we do nothing. */
#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR)
#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) do { } while (0)
/* CRIS instructions, with operands and prefixes included, are a multiple
of two bytes long. */

View File

@ -1,5 +1,5 @@
/* tc-frv.c -- Assembler for the Fujitsu FRV.
Copyright 2002, 2003 Free Software Foundation.
Copyright 2002, 2003, 2004, 2005 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@ -1423,7 +1423,7 @@ frv_force_relocation (fix)
fixS * fix;
{
switch (fix->fx_r_type < BFD_RELOC_UNUSED
? fix->fx_r_type
? (int) fix->fx_r_type
: fix->fx_cgen.opinfo)
{
case BFD_RELOC_FRV_GPREL12:

View File

@ -1,6 +1,6 @@
/* tc-m68k.c -- Assemble for the m68k family
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -7092,7 +7092,6 @@ md_parse_option (int c, char *arg)
{
int i;
unsigned long arch;
const char *oarg = arg;
arg += 3;
if (*arg == 'm')

View File

@ -1,5 +1,6 @@
/* tc-mcore.c -- Assemble code for M*Core
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -42,7 +43,7 @@ static void mcore_cons PARAMS ((int));
static void mcore_float_cons PARAMS ((int));
static void mcore_stringer PARAMS ((int));
static void mcore_fill PARAMS ((int));
static int log2 PARAMS ((unsigned int));
static int mylog2 PARAMS ((unsigned int));
static char * parse_reg PARAMS ((char *, unsigned *));
static char * parse_creg PARAMS ((char *, unsigned *));
static char * parse_exp PARAMS ((char *, expressionS *));
@ -412,7 +413,7 @@ md_begin ()
/* Get a log2(val). */
static int
log2 (val)
mylog2 (val)
unsigned int val;
{
int log = -1;
@ -1146,7 +1147,7 @@ md_assemble (str)
op_end = parse_imm (op_end + 1, & reg, 1, 1 << 31);
/* Further restrict the immediate to a power of two. */
if ((reg & (reg - 1)) == 0)
reg = log2 (reg);
reg = mylog2 (reg);
else
{
reg = 0;
@ -1203,7 +1204,7 @@ md_assemble (str)
/* Further restrict the immediate to a power of two. */
if ((reg & (reg - 1)) == 0)
reg = log2 (reg);
reg = mylog2 (reg);
else
{
reg = 0;

View File

@ -1,6 +1,6 @@
/* tc-mips.c -- assemble code for a MIPS chip.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004 Free Software Foundation, Inc.
2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
Modified for ECOFF and R4000 support by Ian Lance Taylor of Cygnus
@ -2093,7 +2093,7 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
{
if (address_expr->X_op == O_constant)
{
valueT tmp;
unsigned int tmp;
switch (*reloc_type)
{
@ -2102,20 +2102,18 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
break;
case BFD_RELOC_MIPS_HIGHEST:
tmp = (address_expr->X_add_number
+ ((valueT) 0x8000 << 32) + 0x80008000) >> 16;
tmp >>= 16;
ip->insn_opcode |= (tmp >> 16) & 0xffff;
tmp = (address_expr->X_add_number + 0x800080008000ull) >> 48;
ip->insn_opcode |= tmp & 0xffff;
break;
case BFD_RELOC_MIPS_HIGHER:
tmp = (address_expr->X_add_number + 0x80008000) >> 16;
ip->insn_opcode |= (tmp >> 16) & 0xffff;
tmp = (address_expr->X_add_number + 0x80008000ull) >> 32;
ip->insn_opcode |= tmp & 0xffff;
break;
case BFD_RELOC_HI16_S:
ip->insn_opcode |= ((address_expr->X_add_number + 0x8000)
>> 16) & 0xffff;
tmp = (address_expr->X_add_number + 0x8000) >> 16;
ip->insn_opcode |= tmp & 0xffff;
break;
case BFD_RELOC_HI16:

View File

@ -1,5 +1,5 @@
/* tc-mmix.c -- Assembler for Don Knuth's MMIX.
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@ -301,22 +301,9 @@ struct obstack mmix_sym_obstack;
#define PUSHJ_4B GETA_3B
/* We'll very rarely have sections longer than LONG_MAX, but we'll make a
feeble attempt at getting 64-bit C99 or gcc-specific values (assuming
long long is 64 bits on the host). */
#ifdef LLONG_MIN
#define PUSHJSTUB_MIN LLONG_MIN
#elif defined (LONG_LONG_MIN)
#define PUSHJSTUB_MIN LONG_LONG_MIN
#else
#define PUSHJSTUB_MIN LONG_MIN
#endif
#ifdef LLONG_MAX
#define PUSHJSTUB_MAX LLONG_MAX
#elif defined (LONG_LONG_MAX)
#define PUSHJSTUB_MAX LONG_LONG_MAX
#else
#define PUSHJSTUB_MAX LONG_MAX
#endif
feeble attempt at getting 64-bit values. */
#define PUSHJSTUB_MAX ((offsetT) (((addressT) -1) >> 1))
#define PUSHJSTUB_MIN (-PUSHJSTUB_MAX - 1)
#define JMP_0F (65536 * 256 * 4 - 8)
#define JMP_0B (-65536 * 256 * 4 - 4)

View File

@ -1,5 +1,6 @@
/* tc-s390.c -- Assemble for the S390
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of GAS, the GNU Assembler.
@ -1596,13 +1597,10 @@ s390_insn (ignore)
if (exp.X_op == O_constant)
{
if ( ( opformat->oplen == 6
&& (addressT) exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 48))
|| ( opformat->oplen == 4
&& (addressT) exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 32))
|| ( opformat->oplen == 2
&& (addressT) exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 16)))
md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
else

View File

@ -4556,7 +4556,6 @@ sh_parse_name (char const *name, expressionS *exprP, char *nextcharP)
return 1;
}
#endif
void
sh_cfi_frame_initial_instructions (void)
@ -4606,4 +4605,5 @@ sh_regname_to_dw2regnum (const char *regname)
}
return regnum;
}
#endif /* OBJ_ELF */
#endif /* BFD_ASSEMBLER */

View File

@ -1,6 +1,6 @@
/* tc-sparc.c -- Assemble for the SPARC
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004
1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -133,7 +133,7 @@ int sparc_cie_data_alignment;
/* Handle of the OPCODE hash table. */
static struct hash_control *op_hash;
static int log2 PARAMS ((int));
static int mylog2 PARAMS ((int));
static void s_data1 PARAMS ((void));
static void s_seg PARAMS ((int));
static void s_proc PARAMS ((int));
@ -3637,7 +3637,7 @@ md_pcrel_from (fixP)
of two. */
static int
log2 (value)
mylog2 (value)
int value;
{
int shift;
@ -3739,7 +3739,7 @@ s_reserve (ignore)
if (align != 0)
{
temp = log2 (align);
temp = mylog2 (align);
if (temp < 0)
{
as_bad (_("alignment not a power of 2"));
@ -3877,7 +3877,7 @@ s_common (ignore)
if (temp > max_alignment)
{
temp = max_alignment;
as_warn (_("alignment too large; assuming %d"), temp);
as_warn (_("alignment too large; assuming %ld"), (long) temp);
}
#endif
@ -3902,7 +3902,7 @@ s_common (ignore)
if (temp == 0)
align = 0;
else
align = log2 (temp);
align = mylog2 (temp);
if (align < 0)
{
@ -4225,7 +4225,7 @@ sparc_cons_align (nbytes)
if (sparc_no_align_cons)
return;
nalign = log2 (nbytes);
nalign = mylog2 (nbytes);
if (nalign == 0)
return;

View File

@ -1,5 +1,5 @@
/* tc-tic4x.c -- Assemble for the Texas Instruments TMS320C[34]x.
Copyright (C) 1997,1998, 2002, 2003 Free Software Foundation.
Copyright (C) 1997,1998, 2002, 2003, 2005 Free Software Foundation.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
@ -708,7 +708,7 @@ tic4x_insert_reg (regname, regnum)
symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
&zero_address_frag));
for (i = 0; regname[i]; i++)
buf[i] = islower (regname[i]) ? TOUPPER (regname[i]) : regname[i];
buf[i] = ISLOWER (regname[i]) ? TOUPPER (regname[i]) : regname[i];
buf[i] = '\0';
symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
@ -3090,7 +3090,7 @@ tic4x_do_align (alignment, fill, len, max)
int len ATTRIBUTE_UNUSED;
int max ATTRIBUTE_UNUSED;
{
unsigned long nop = NOP_OPCODE;
unsigned long nop = TIC_NOP_OPCODE;
/* Because we are talking lwords, not bytes, adjust alignment to do words */
alignment += 2;

View File

@ -1,5 +1,5 @@
/* tc-tic4x.h -- Assemble for the Texas TMS320C[34]X.
Copyright (C) 1997, 2002, 2003 Free Software Foundation.
Copyright (C) 1997, 2002, 2003, 2005 Free Software Foundation.
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
@ -65,7 +65,7 @@
#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep (frag)
#define NEED_FX_R_TYPE
#define NOP_OPCODE 0x0c800000
#define TIC_NOP_OPCODE 0x0c800000
#define reloc_type int

View File

@ -1,5 +1,6 @@
/* tc-vax.c - vax-specific -
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002,
2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -29,6 +30,10 @@
#include "elf/vax.h"
#endif
#if defined (OBJ_AOUT) && !defined (BFD_ASSEMBLER) && defined (TE_NetBSD)
#include <netinet/in.h>
#endif
/* These chars start a comment anywhere in a source file (except inside
another comment */
const char comment_chars[] = "#";
@ -3407,7 +3412,7 @@ tc_headers_hook(headers)
{
#ifdef TE_NetBSD
N_SET_INFO(headers->header, OMAGIC, M_VAX4K_NETBSD, 0);
headers->header.a_info = htonl(headers->header.a_info);
headers->header.a_info = htonl (headers->header.a_info);
#endif
}
#endif /* !BFD_ASSEMBLER */

View File

@ -1,5 +1,5 @@
/* tc-xstormy16.c -- Assembler for the Sanyo XSTORMY16.
Copyright 2000, 2001, 2002, 2003 Free Software Foundation.
Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@ -344,10 +344,10 @@ md_pcrel_from_section (fixP, sec)
fixS * fixP;
segT sec;
{
if (fixP->fx_addsy != (symbolS *) NULL
&& (! S_IS_DEFINED (fixP->fx_addsy)
|| S_GET_SEGMENT (fixP->fx_addsy) != sec)
|| xstormy16_force_relocation (fixP))
if ((fixP->fx_addsy != (symbolS *) NULL
&& (! S_IS_DEFINED (fixP->fx_addsy)
|| S_GET_SEGMENT (fixP->fx_addsy) != sec))
|| xstormy16_force_relocation (fixP))
/* The symbol is undefined,
or it is defined but not in this section,
or the relocation will be relative to this symbol not the section symbol.

View File

@ -1,5 +1,6 @@
/* ECOFF debugging support.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
@ -2312,7 +2313,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
compiler output, only in hand coded assembler. */
void
ecoff_new_file (const char *name)
ecoff_new_file (const char *name, int appfile ATTRIBUTE_UNUSED)
{
if (cur_file_ptr != NULL && strcmp (cur_file_ptr->name, name) == 0)
return;

View File

@ -1,5 +1,5 @@
/* ecoff.h -- header file for ECOFF debugging support
Copyright 1993, 1994, 1995, 1996, 1997, 1998
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 2003, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
@ -38,7 +38,7 @@ extern void ecoff_read_begin_hook (void);
/* This function should be called when the assembler switches to a new
file. */
extern void ecoff_new_file (const char *);
extern void ecoff_new_file (const char *, int);
/* This function should be called when a new symbol is created, by
obj_symbol_new_hook. */

23
gas/itbl-lex.h Normal file
View File

@ -0,0 +1,23 @@
/* itbl-lex.h
Copyright 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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. */
extern int insntbl_line;
extern int yyparse (void);
extern int yylex (void);

View File

@ -1,5 +1,5 @@
/* itbl-lex.l
Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
Copyright 1997, 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -23,6 +23,7 @@
#include <string.h>
#include <stdlib.h>
#include "itbl-lex.h"
#include <itbl-parse.h>
#ifdef DEBUG

View File

@ -1,5 +1,5 @@
/* itbl-parse.y
Copyright 1997 Free Software Foundation, Inc.
Copyright 1997, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -247,6 +247,7 @@ FIXME! hex is ambiguous with any digit
*/
#include <stdio.h>
#include "itbl-lex.h"
#include "itbl-ops.h"
/* #define DEBUG */
@ -273,9 +274,6 @@ FIXME! hex is ambiguous with any digit
static int sbit, ebit;
static struct itbl_entry *insn=0;
extern int insntbl_line;
int yyparse PARAMS ((void));
int yylex PARAMS ((void));
static int yyerror PARAMS ((const char *));
%}

View File

@ -1599,7 +1599,7 @@ s_data (int ignore ATTRIBUTE_UNUSED)
.file. */
void
s_app_file_string (char *file, int appfile)
s_app_file_string (char *file, int appfile ATTRIBUTE_UNUSED)
{
#ifdef LISTING
if (listing)

View File

@ -1,6 +1,6 @@
/* subsegs.c - subsegments -
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2002, 2004
1999, 2000, 2002, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -602,7 +602,7 @@ subseg_text_p (segT sec)
seg_definitely_not_empty_p. */
int
seg_not_empty_p (segT sec)
seg_not_empty_p (segT sec ATTRIBUTE_UNUSED)
{
segment_info_type *seginfo = seg_info (sec);
frchainS *chain;

View File

@ -1,5 +1,5 @@
/* subsegs.h -> subsegs.c
Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000
Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -139,14 +139,7 @@ extern segment_info_type segment_info[];
extern frchainS *data0_frchainP;
extern frchainS *bss0_frchainP;
/* Dummy so stuff can compile. Should never be used. */
struct seg_info_trash {
struct {
unsigned stab_string_size : 1;
} stabu;
unsigned hadone : 1;
};
#define seg_info(S) (abort (), (struct seg_info_trash *) 0)
#define seg_info(S) (abort (), (segment_info_type *) 0)
#endif

View File

@ -1,6 +1,7 @@
/* tc.h - target cpu dependent
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2003, 2004
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2003,
2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -24,25 +25,6 @@
extern const pseudo_typeS md_pseudo_table[];
/* JF moved this here from as.h under the theory that nobody except MACHINE.c
and write.c care about it anyway. */
struct relax_type
{
/* Forward reach. Signed number. > 0. */
long rlx_forward;
/* Backward reach. Signed number. < 0. */
long rlx_backward;
/* Bytes length of this address. */
unsigned char rlx_length;
/* Next longer relax-state. 0 means there is no 'next' relax-state. */
relax_substateT rlx_more;
};
typedef struct relax_type relax_typeS;
extern const int md_reloc_size; /* Size of a relocation record. */
char * md_atof (int, char *, int *);