Banish PARAMS and PTR. Convert to ISO C.
Delete unnecessary forward declarations.
This commit is contained in:
parent
11fa8e4313
commit
5a49b8acf4
38 changed files with 921 additions and 1959 deletions
|
@ -1,3 +1,16 @@
|
|||
2008-08-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* as.c, as.h, ecoff.c, hash.c, macro.c, symbols.c, config/obj-evax.c,
|
||||
config/obj-som.c, config/tc-alpha.c, config/tc-arm.c, config/tc-bfin.c,
|
||||
config/tc-bfin.h, config/tc-crx.c, config/tc-frv.c, config/tc-frv.h,
|
||||
config/tc-hppa.h, config/tc-i386.c, config/tc-i860.c, config/tc-i960.h,
|
||||
config/tc-ia64.c, config/tc-ia64.h, config/tc-m32c.c, config/tc-m32c.h,
|
||||
config/tc-m68k.c, config/tc-maxq.c, config/tc-s390.c, config/tc-s390.h,
|
||||
config/tc-sparc.c, config/tc-sparc.h, config/tc-spu.c, config/tc-spu.h,
|
||||
config/tc-tic4x.c, config/tc-tic4x.h, config/tc-tic54x.c,
|
||||
config/tc-tic54x.h, config/tc-vax.c, doc/internals.texi: Banish PARAMS
|
||||
and PTR. Convert to ISO C. Delete unnecessary forward declarations.
|
||||
|
||||
2008-08-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* config/tc-arm.c (s_unreq): Adjust hash_delete call.
|
||||
|
|
2
gas/as.c
2
gas/as.c
|
@ -50,7 +50,7 @@
|
|||
|
||||
#ifdef HAVE_SBRK
|
||||
#ifdef NEED_DECLARATION_SBRK
|
||||
extern PTR sbrk ();
|
||||
extern void *sbrk ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
6
gas/as.h
6
gas/as.h
|
@ -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, 2004, 2005, 2006, 2007
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -171,8 +171,8 @@ extern int ffs (int);
|
|||
extern void free ();
|
||||
#endif
|
||||
#ifdef NEED_DECLARATION_MALLOC
|
||||
extern PTR malloc ();
|
||||
extern PTR realloc ();
|
||||
extern void *malloc ();
|
||||
extern void *realloc ();
|
||||
#endif
|
||||
#ifdef NEED_DECLARATION_STRSTR
|
||||
extern char *strstr ();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* obj-evax.c - EVAX (openVMS/Alpha) object file format.
|
||||
Copyright 1996, 1997, 2007 Free Software Foundation, Inc.
|
||||
Copyright 1996, 1997, 2007, 2008 Free Software Foundation, Inc.
|
||||
Contributed by Klaus Kämpf (kkaempf@progis.de) of
|
||||
proGIS Software, Aachen, Germany.
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "as.h"
|
||||
|
||||
static void s_evax_weak PARAMS ((int));
|
||||
static void s_evax_weak (int);
|
||||
|
||||
const pseudo_typeS obj_pseudo_table[] =
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOM object file format.
|
||||
Copyright 1993, 1994, 1998, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
2007 Free Software Foundation, Inc.
|
||||
2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -263,7 +263,7 @@ obj_som_init_stab_section (segT seg)
|
|||
/* Fill in the counts in the first entry in a .stabs section. */
|
||||
|
||||
static void
|
||||
adjust_stab_sections (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
|
||||
adjust_stab_sections (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
|
||||
{
|
||||
asection *strsec;
|
||||
char *p;
|
||||
|
@ -292,7 +292,7 @@ adjust_stab_sections (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
|
|||
void
|
||||
som_frob_file (void)
|
||||
{
|
||||
bfd_map_over_sections (stdoutput, adjust_stab_sections, (PTR) 0);
|
||||
bfd_map_over_sections (stdoutput, adjust_stab_sections, (void *) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
|
||||
Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
2001, 2002, 2003, 2004, 2005, 2007, 2008 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.
|
||||
|
@ -3723,7 +3723,7 @@ s_alpha_stab (int n)
|
|||
static void
|
||||
s_alpha_coff_wrapper (int which)
|
||||
{
|
||||
static void (* const fns[]) PARAMS ((int)) = {
|
||||
static void (* const fns[]) (int) = {
|
||||
ecoff_directive_begin,
|
||||
ecoff_directive_bend,
|
||||
ecoff_directive_def,
|
||||
|
@ -4739,7 +4739,6 @@ const pseudo_typeS md_pseudo_table[] =
|
|||
|
||||
/* @@@ GP selection voodoo. All of this seems overly complicated and
|
||||
unnecessary; which is the primary reason it's for ECOFF only. */
|
||||
static inline void maybe_set_gp PARAMS ((asection *));
|
||||
|
||||
static inline void
|
||||
maybe_set_gp (asection *sec)
|
||||
|
|
|
@ -1988,7 +1988,7 @@ insert_reg_alias (char *str, int number, int type)
|
|||
new->builtin = FALSE;
|
||||
new->neon = NULL;
|
||||
|
||||
if (hash_insert (arm_reg_hsh, name, (PTR) new))
|
||||
if (hash_insert (arm_reg_hsh, name, (void *) new))
|
||||
abort ();
|
||||
|
||||
return new;
|
||||
|
@ -19602,25 +19602,25 @@ md_begin (void)
|
|||
as_fatal (_("virtual memory exhausted"));
|
||||
|
||||
for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
|
||||
hash_insert (arm_ops_hsh, insns[i].template, (PTR) (insns + i));
|
||||
hash_insert (arm_ops_hsh, insns[i].template, (void *) (insns + i));
|
||||
for (i = 0; i < sizeof (conds) / sizeof (struct asm_cond); i++)
|
||||
hash_insert (arm_cond_hsh, conds[i].template, (PTR) (conds + i));
|
||||
hash_insert (arm_cond_hsh, conds[i].template, (void *) (conds + i));
|
||||
for (i = 0; i < sizeof (shift_names) / sizeof (struct asm_shift_name); i++)
|
||||
hash_insert (arm_shift_hsh, shift_names[i].name, (PTR) (shift_names + i));
|
||||
hash_insert (arm_shift_hsh, shift_names[i].name, (void *) (shift_names + i));
|
||||
for (i = 0; i < sizeof (psrs) / sizeof (struct asm_psr); i++)
|
||||
hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i));
|
||||
hash_insert (arm_psr_hsh, psrs[i].template, (void *) (psrs + i));
|
||||
for (i = 0; i < sizeof (v7m_psrs) / sizeof (struct asm_psr); i++)
|
||||
hash_insert (arm_v7m_psr_hsh, v7m_psrs[i].template, (PTR) (v7m_psrs + i));
|
||||
hash_insert (arm_v7m_psr_hsh, v7m_psrs[i].template, (void *) (v7m_psrs + i));
|
||||
for (i = 0; i < sizeof (reg_names) / sizeof (struct reg_entry); i++)
|
||||
hash_insert (arm_reg_hsh, reg_names[i].name, (PTR) (reg_names + i));
|
||||
hash_insert (arm_reg_hsh, reg_names[i].name, (void *) (reg_names + i));
|
||||
for (i = 0;
|
||||
i < sizeof (barrier_opt_names) / sizeof (struct asm_barrier_opt);
|
||||
i++)
|
||||
hash_insert (arm_barrier_opt_hsh, barrier_opt_names[i].template,
|
||||
(PTR) (barrier_opt_names + i));
|
||||
(void *) (barrier_opt_names + i));
|
||||
#ifdef OBJ_ELF
|
||||
for (i = 0; i < sizeof (reloc_names) / sizeof (struct reloc_entry); i++)
|
||||
hash_insert (arm_reloc_hsh, reloc_names[i].name, (PTR) (reloc_names + i));
|
||||
hash_insert (arm_reloc_hsh, reloc_names[i].name, (void *) (reloc_names + i));
|
||||
#endif
|
||||
|
||||
set_constant_flonums ();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-bfin.c -- Assembler for the ADI Blackfin.
|
||||
Copyright 2005, 2006, 2007
|
||||
Copyright 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -37,8 +37,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|||
extern YY_BUFFER_STATE yy_scan_string (const char *yy_str);
|
||||
extern void yy_delete_buffer (YY_BUFFER_STATE b);
|
||||
static parse_state parse (char *line);
|
||||
static void bfin_s_bss PARAMS ((int));
|
||||
static int md_chars_to_number PARAMS ((char *, int));
|
||||
|
||||
/* Global variables. */
|
||||
struct bfin_insn *insn;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-bfin.h - header file for tc-bfin.c
|
||||
Copyright 2005, 2007
|
||||
Copyright 2005, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -39,8 +39,8 @@
|
|||
|
||||
#define WORKING_DOT_WORD
|
||||
|
||||
extern void bfin_start_line_hook PARAMS ((void));
|
||||
extern bfd_boolean bfin_start_label PARAMS ((char *));
|
||||
extern void bfin_start_line_hook (void);
|
||||
extern bfd_boolean bfin_start_label (char *);
|
||||
|
||||
#define md_start_line_hook() bfin_start_line_hook()
|
||||
#define md_number_to_chars number_to_chars_littleendian
|
||||
|
@ -50,7 +50,7 @@ extern bfd_boolean bfin_start_label PARAMS ((char *));
|
|||
#define LEX_BR 6
|
||||
|
||||
#define TC_EOL_IN_INSN(PTR) (bfin_eol_in_insn(PTR) ? 1 : 0)
|
||||
extern bfd_boolean bfin_eol_in_insn PARAMS ((char *));
|
||||
extern bfd_boolean bfin_eol_in_insn (char *);
|
||||
|
||||
/* Almost all instructions of Blackfin contain an = character. */
|
||||
#define TC_EQUAL_IN_INSN(C, NAME) 1
|
||||
|
@ -63,14 +63,14 @@ extern bfd_boolean bfin_eol_in_insn PARAMS ((char *));
|
|||
|
||||
#define TC_START_LABEL(ch ,ptr) (ch == ':' && bfin_start_label (ptr))
|
||||
#define tc_fix_adjustable(FIX) bfin_fix_adjustable (FIX)
|
||||
extern bfd_boolean bfin_fix_adjustable PARAMS ((struct fix *));
|
||||
extern bfd_boolean bfin_fix_adjustable (struct fix *);
|
||||
|
||||
#define TC_FORCE_RELOCATION(FIX) bfin_force_relocation (FIX)
|
||||
extern int bfin_force_relocation PARAMS ((struct fix *));
|
||||
extern int bfin_force_relocation (struct fix *);
|
||||
|
||||
/* Call md_pcrel_from_section(), not md_pcrel_from(). */
|
||||
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
|
||||
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
||||
extern long md_pcrel_from_section (struct fix *, segT);
|
||||
|
||||
/* Values passed to md_apply_fix3 don't include symbol values. */
|
||||
#define MD_APPLY_SYM_VALUE(FIX) 0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-crx.c -- Assembler code for the CRX CPU core.
|
||||
Copyright 2004, 2007 Free Software Foundation, Inc.
|
||||
Copyright 2004, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Tomer Levi, NSC, Israel.
|
||||
Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
|
||||
|
@ -538,7 +538,7 @@ md_begin (void)
|
|||
const char *mnemonic = crx_instruction[i].mnemonic;
|
||||
|
||||
hashret = hash_insert (crx_inst_hash, mnemonic,
|
||||
(PTR) &crx_instruction[i]);
|
||||
(void *) &crx_instruction[i]);
|
||||
|
||||
if (hashret != NULL && *hashret != '\0')
|
||||
as_fatal (_("Can't hash `%s': %s\n"), crx_instruction[i].mnemonic,
|
||||
|
@ -566,7 +566,7 @@ md_begin (void)
|
|||
for (regtab = crx_regtab;
|
||||
regtab < (crx_regtab + NUMREGS); regtab++)
|
||||
{
|
||||
hashret = hash_insert (reg_hash, regtab->name, (PTR) regtab);
|
||||
hashret = hash_insert (reg_hash, regtab->name, (void *) regtab);
|
||||
if (hashret)
|
||||
as_fatal (_("Internal Error: Can't hash %s: %s"),
|
||||
regtab->name,
|
||||
|
@ -584,7 +584,8 @@ md_begin (void)
|
|||
for (copregtab = crx_copregtab; copregtab < (crx_copregtab + NUMCOPREGS);
|
||||
copregtab++)
|
||||
{
|
||||
hashret = hash_insert (copreg_hash, copregtab->name, (PTR) copregtab);
|
||||
hashret = hash_insert (copreg_hash, copregtab->name,
|
||||
(void *) copregtab);
|
||||
if (hashret)
|
||||
as_fatal (_("Internal Error: Can't hash %s: %s"),
|
||||
copregtab->name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-frv.c -- Assembler for the Fujitsu FRV.
|
||||
Copyright 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation. Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -187,9 +187,8 @@ static int tomcat_doubles = 0;
|
|||
static int tomcat_singles = 0;
|
||||
|
||||
/* Forward reference to static functions */
|
||||
static void frv_set_flags PARAMS ((int));
|
||||
static void frv_pic_ptr PARAMS ((int));
|
||||
static void frv_frob_file_section PARAMS ((bfd *, asection *, PTR));
|
||||
static void frv_set_flags (int);
|
||||
static void frv_pic_ptr (int);
|
||||
|
||||
/* The target specific pseudo-ops which we support. */
|
||||
const pseudo_typeS md_pseudo_table[] =
|
||||
|
@ -263,9 +262,7 @@ size_t md_longopts_size = sizeof (md_longopts);
|
|||
static int g_switch_value = 8;
|
||||
|
||||
int
|
||||
md_parse_option (c, arg)
|
||||
int c;
|
||||
char * arg;
|
||||
md_parse_option (int c, char *arg)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
|
@ -484,7 +481,7 @@ md_show_usage (FILE * stream)
|
|||
|
||||
|
||||
void
|
||||
md_begin ()
|
||||
md_begin (void)
|
||||
{
|
||||
/* Initialize the `cgen' interface. */
|
||||
|
||||
|
@ -519,11 +516,8 @@ frv_md_fdpic_enabled (void)
|
|||
|
||||
int chain_num = 0;
|
||||
|
||||
struct vliw_insn_list *frv_insert_vliw_insn PARAMS ((bfd_boolean));
|
||||
|
||||
struct vliw_insn_list *
|
||||
frv_insert_vliw_insn (count)
|
||||
bfd_boolean count;
|
||||
static struct vliw_insn_list *
|
||||
frv_insert_vliw_insn (bfd_boolean count)
|
||||
{
|
||||
struct vliw_insn_list *vliw_insn_list_entry;
|
||||
struct vliw_chain *vliw_chain_entry;
|
||||
|
@ -592,14 +586,10 @@ frv_insert_vliw_insn (count)
|
|||
|
||||
/* Check a vliw insn for an insn of type containing the sym passed in label_sym. */
|
||||
|
||||
static struct vliw_insn_list *frv_find_in_vliw
|
||||
PARAMS ((enum vliw_insn_type, struct vliw_chain *, symbolS *));
|
||||
|
||||
static struct vliw_insn_list *
|
||||
frv_find_in_vliw (vliw_insn_type, this_chain, label_sym)
|
||||
enum vliw_insn_type vliw_insn_type;
|
||||
struct vliw_chain *this_chain;
|
||||
symbolS *label_sym;
|
||||
frv_find_in_vliw (enum vliw_insn_type vliw_insn_type,
|
||||
struct vliw_chain *this_chain,
|
||||
symbolS *label_sym)
|
||||
{
|
||||
|
||||
struct vliw_insn_list *the_insn;
|
||||
|
@ -630,11 +620,8 @@ enum vliw_nop_type
|
|||
VLIW_DOUBLE_THEN_SINGLE_NOP
|
||||
};
|
||||
|
||||
static void frv_debug_tomcat PARAMS ((struct vliw_chain *));
|
||||
|
||||
static void
|
||||
frv_debug_tomcat (start_chain)
|
||||
struct vliw_chain *start_chain;
|
||||
frv_debug_tomcat (struct vliw_chain *start_chain)
|
||||
{
|
||||
struct vliw_chain *this_chain;
|
||||
struct vliw_insn_list *this_insn;
|
||||
|
@ -660,11 +647,8 @@ frv_debug_tomcat (start_chain)
|
|||
}
|
||||
}
|
||||
|
||||
static void frv_adjust_vliw_count PARAMS ((struct vliw_chain *));
|
||||
|
||||
static void
|
||||
frv_adjust_vliw_count (this_chain)
|
||||
struct vliw_chain *this_chain;
|
||||
frv_adjust_vliw_count (struct vliw_chain *this_chain)
|
||||
{
|
||||
struct vliw_insn_list *this_insn;
|
||||
|
||||
|
@ -683,14 +667,10 @@ frv_adjust_vliw_count (this_chain)
|
|||
/* Insert the desired nop combination in the vliw chain before insert_before_insn.
|
||||
Rechain the vliw insn. */
|
||||
|
||||
static struct vliw_chain *frv_tomcat_shuffle
|
||||
PARAMS ((enum vliw_nop_type, struct vliw_chain *, struct vliw_insn_list *));
|
||||
|
||||
static struct vliw_chain *
|
||||
frv_tomcat_shuffle (this_nop_type, vliw_to_split, insert_before_insn)
|
||||
enum vliw_nop_type this_nop_type;
|
||||
struct vliw_chain *vliw_to_split;
|
||||
struct vliw_insn_list *insert_before_insn;
|
||||
frv_tomcat_shuffle (enum vliw_nop_type this_nop_type,
|
||||
struct vliw_chain *vliw_to_split,
|
||||
struct vliw_insn_list *insert_before_insn)
|
||||
{
|
||||
|
||||
bfd_boolean pack_prev = FALSE;
|
||||
|
@ -854,10 +834,8 @@ frv_tomcat_shuffle (this_nop_type, vliw_to_split, insert_before_insn)
|
|||
return return_me;
|
||||
}
|
||||
|
||||
static void frv_tomcat_analyze_vliw_chains PARAMS ((void));
|
||||
|
||||
static void
|
||||
frv_tomcat_analyze_vliw_chains ()
|
||||
frv_tomcat_analyze_vliw_chains (void)
|
||||
{
|
||||
struct vliw_chain *vliw1 = NULL;
|
||||
struct vliw_chain *vliw2 = NULL;
|
||||
|
@ -974,7 +952,7 @@ workaround_top:
|
|||
}
|
||||
|
||||
void
|
||||
frv_tomcat_workaround ()
|
||||
frv_tomcat_workaround (void)
|
||||
{
|
||||
if (frv_mach != bfd_mach_frvtomcat)
|
||||
return;
|
||||
|
@ -1109,8 +1087,7 @@ target_implements_insn_p (const CGEN_INSN *insn)
|
|||
}
|
||||
|
||||
void
|
||||
md_assemble (str)
|
||||
char * str;
|
||||
md_assemble (char *str)
|
||||
{
|
||||
frv_insn insn;
|
||||
char *errmsg;
|
||||
|
@ -1239,8 +1216,7 @@ md_assemble (str)
|
|||
We just ignore it. */
|
||||
|
||||
void
|
||||
md_operand (expressionP)
|
||||
expressionS * expressionP;
|
||||
md_operand (expressionS *expressionP)
|
||||
{
|
||||
if (* input_line_pointer == '#')
|
||||
{
|
||||
|
@ -1250,17 +1226,14 @@ md_operand (expressionP)
|
|||
}
|
||||
|
||||
valueT
|
||||
md_section_align (segment, size)
|
||||
segT segment;
|
||||
valueT size;
|
||||
md_section_align (segT segment, valueT size)
|
||||
{
|
||||
int align = bfd_get_section_alignment (stdoutput, segment);
|
||||
return ((size + (1 << align) - 1) & (-1 << align));
|
||||
}
|
||||
|
||||
symbolS *
|
||||
md_undefined_symbol (name)
|
||||
char * name ATTRIBUTE_UNUSED;
|
||||
md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1277,9 +1250,7 @@ const relax_typeS md_relax_table[] =
|
|||
};
|
||||
|
||||
long
|
||||
frv_relax_frag (fragP, stretch)
|
||||
fragS *fragP ATTRIBUTE_UNUSED;
|
||||
long stretch ATTRIBUTE_UNUSED;
|
||||
frv_relax_frag (fragS *fragP ATTRIBUTE_UNUSED, long stretch ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1296,9 +1267,7 @@ frv_relax_frag (fragP, stretch)
|
|||
0 value. */
|
||||
|
||||
int
|
||||
md_estimate_size_before_relax (fragP, segment)
|
||||
fragS * fragP;
|
||||
segT segment ATTRIBUTE_UNUSED;
|
||||
md_estimate_size_before_relax (fragS *fragP, segT segment ATTRIBUTE_UNUSED)
|
||||
{
|
||||
switch (fragP->fr_subtype)
|
||||
{
|
||||
|
@ -1319,10 +1288,9 @@ md_estimate_size_before_relax (fragP, segment)
|
|||
fragP->fr_subtype is the subtype of what the address relaxed to. */
|
||||
|
||||
void
|
||||
md_convert_frag (abfd, sec, fragP)
|
||||
bfd * abfd ATTRIBUTE_UNUSED;
|
||||
segT sec ATTRIBUTE_UNUSED;
|
||||
fragS * fragP;
|
||||
md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
segT sec ATTRIBUTE_UNUSED,
|
||||
fragS *fragP)
|
||||
{
|
||||
switch (fragP->fr_subtype)
|
||||
{
|
||||
|
@ -1343,9 +1311,7 @@ md_convert_frag (abfd, sec, fragP)
|
|||
given a PC relative reloc. */
|
||||
|
||||
long
|
||||
md_pcrel_from_section (fixP, sec)
|
||||
fixS * fixP;
|
||||
segT sec;
|
||||
md_pcrel_from_section (fixS *fixP, segT sec)
|
||||
{
|
||||
if (TC_FORCE_RELOCATION (fixP)
|
||||
|| (fixP->fx_addsy != (symbolS *) NULL
|
||||
|
@ -1366,10 +1332,9 @@ md_pcrel_from_section (fixP, sec)
|
|||
*FIXP may be modified if desired. */
|
||||
|
||||
bfd_reloc_code_real_type
|
||||
md_cgen_lookup_reloc (insn, operand, fixP)
|
||||
const CGEN_INSN * insn ATTRIBUTE_UNUSED;
|
||||
const CGEN_OPERAND * operand;
|
||||
fixS * fixP;
|
||||
md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED,
|
||||
const CGEN_OPERAND *operand,
|
||||
fixS *fixP)
|
||||
{
|
||||
switch (operand->type)
|
||||
{
|
||||
|
@ -1418,8 +1383,7 @@ md_cgen_lookup_reloc (insn, operand, fixP)
|
|||
relaxing. */
|
||||
|
||||
int
|
||||
frv_force_relocation (fix)
|
||||
fixS * fix;
|
||||
frv_force_relocation (fixS *fix)
|
||||
{
|
||||
switch (fix->fx_r_type < BFD_RELOC_UNUSED
|
||||
? (int) fix->fx_r_type
|
||||
|
@ -1467,10 +1431,7 @@ frv_force_relocation (fix)
|
|||
/* Apply a fixup that could be resolved within the assembler. */
|
||||
|
||||
void
|
||||
md_apply_fix (fixP, valP, seg)
|
||||
fixS * fixP;
|
||||
valueT * valP;
|
||||
segT seg;
|
||||
md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
||||
{
|
||||
if (fixP->fx_addsy == 0)
|
||||
switch (fixP->fx_cgen.opinfo)
|
||||
|
@ -1549,23 +1510,19 @@ md_apply_fix (fixP, valP, seg)
|
|||
/* Write a value out to the object file, using the appropriate endianness. */
|
||||
|
||||
void
|
||||
frv_md_number_to_chars (buf, val, n)
|
||||
char * buf;
|
||||
valueT val;
|
||||
int n;
|
||||
frv_md_number_to_chars (char *buf, valueT val, int n)
|
||||
{
|
||||
number_to_chars_bigendian (buf, val, n);
|
||||
}
|
||||
|
||||
char *
|
||||
md_atof (int type, char * litP, int * sizeP)
|
||||
md_atof (int type, char *litP, int *sizeP)
|
||||
{
|
||||
return ieee_md_atof (type, litP, sizeP, TRUE);
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
frv_fix_adjustable (fixP)
|
||||
fixS * fixP;
|
||||
frv_fix_adjustable (fixS *fixP)
|
||||
{
|
||||
bfd_reloc_code_real_type reloc_type;
|
||||
|
||||
|
@ -1591,8 +1548,7 @@ frv_fix_adjustable (fixP)
|
|||
|
||||
/* Allow user to set flags bits. */
|
||||
void
|
||||
frv_set_flags (arg)
|
||||
int arg ATTRIBUTE_UNUSED;
|
||||
frv_set_flags (int arg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
flagword new_flags = get_absolute_expression ();
|
||||
flagword new_mask = ~ (flagword)0;
|
||||
|
@ -1614,8 +1570,7 @@ frv_set_flags (arg)
|
|||
BFD_RELOC_32 at that time. */
|
||||
|
||||
void
|
||||
frv_pic_ptr (nbytes)
|
||||
int nbytes;
|
||||
frv_pic_ptr (int nbytes)
|
||||
{
|
||||
expressionS exp;
|
||||
char *p;
|
||||
|
@ -1694,10 +1649,7 @@ frv_pic_ptr (nbytes)
|
|||
not possible, issue an error. */
|
||||
|
||||
static void
|
||||
frv_frob_file_section (abfd, sec, ptr)
|
||||
bfd *abfd;
|
||||
asection *sec;
|
||||
PTR ptr ATTRIBUTE_UNUSED;
|
||||
frv_frob_file_section (bfd *abfd, asection *sec, void *ptr ATTRIBUTE_UNUSED)
|
||||
{
|
||||
segment_info_type *seginfo = seg_info (sec);
|
||||
fixS *fixp;
|
||||
|
@ -1839,14 +1791,13 @@ frv_frob_file_section (abfd, sec, ptr)
|
|||
for any relocations that pic won't support. */
|
||||
|
||||
void
|
||||
frv_frob_file ()
|
||||
frv_frob_file (void)
|
||||
{
|
||||
bfd_map_over_sections (stdoutput, frv_frob_file_section, (PTR)0);
|
||||
bfd_map_over_sections (stdoutput, frv_frob_file_section, (void *) 0);
|
||||
}
|
||||
|
||||
void
|
||||
frv_frob_label (this_label)
|
||||
symbolS *this_label;
|
||||
frv_frob_label (symbolS *this_label)
|
||||
{
|
||||
struct vliw_insn_list *vliw_insn_list_entry;
|
||||
|
||||
|
@ -1862,14 +1813,13 @@ frv_frob_label (this_label)
|
|||
}
|
||||
|
||||
fixS *
|
||||
frv_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
|
||||
fragS * frag;
|
||||
int where;
|
||||
const CGEN_INSN * insn;
|
||||
int length;
|
||||
const CGEN_OPERAND * operand;
|
||||
int opinfo;
|
||||
expressionS * exp;
|
||||
frv_cgen_record_fixup_exp (fragS *frag,
|
||||
int where,
|
||||
const CGEN_INSN *insn,
|
||||
int length,
|
||||
const CGEN_OPERAND *operand,
|
||||
int opinfo,
|
||||
expressionS *exp)
|
||||
{
|
||||
fixS * fixP = gas_cgen_record_fixup_exp (frag, where, insn, length,
|
||||
operand, opinfo, exp);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-frv.h -- Header file for tc-frv.c.
|
||||
Copyright 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
Copyright 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -42,21 +42,21 @@ extern bfd_boolean frv_md_fdpic_enabled (void);
|
|||
/* Values passed to md_apply_fix don't include the symbol value. */
|
||||
#define MD_APPLY_SYM_VALUE(FIX) 0
|
||||
|
||||
extern void frv_tomcat_workaround PARAMS ((void));
|
||||
extern void frv_tomcat_workaround (void);
|
||||
#define md_cleanup frv_tomcat_workaround
|
||||
|
||||
#define md_number_to_chars frv_md_number_to_chars
|
||||
|
||||
extern long frv_relax_frag PARAMS ((fragS *, long));
|
||||
extern long frv_relax_frag (fragS *, long);
|
||||
#define md_relax_frag(segment, fragP, stretch) frv_relax_frag(fragP, stretch)
|
||||
|
||||
#define tc_fix_adjustable(FIX) frv_fix_adjustable (FIX)
|
||||
struct fix;
|
||||
extern bfd_boolean frv_fix_adjustable PARAMS ((struct fix *));
|
||||
extern bfd_boolean frv_fix_adjustable (struct fix *);
|
||||
|
||||
/* When relaxing, we need to emit various relocs we otherwise wouldn't. */
|
||||
#define TC_FORCE_RELOCATION(fix) frv_force_relocation (fix)
|
||||
extern int frv_force_relocation PARAMS ((struct fix *));
|
||||
extern int frv_force_relocation (struct fix *);
|
||||
|
||||
/* If we simplify subtractions that aren't SUB_SAME or SUB_ABS, we end
|
||||
up with PCrel fixups, but since we don't have any PCrel relocs, we
|
||||
|
@ -66,7 +66,7 @@ extern int frv_force_relocation PARAMS ((struct fix *));
|
|||
#undef GAS_CGEN_MAX_FIXUPS
|
||||
#define GAS_CGEN_MAX_FIXUPS 1
|
||||
|
||||
void frv_frob_label PARAMS ((symbolS *));
|
||||
void frv_frob_label (symbolS *);
|
||||
#define tc_frob_label(sym) frv_frob_label(sym)
|
||||
|
||||
#define tc_gen_reloc gas_cgen_tc_gen_reloc
|
||||
|
@ -75,12 +75,12 @@ void frv_frob_label PARAMS ((symbolS *));
|
|||
|
||||
/* Call md_pcrel_from_section(), not md_pcrel_from(). */
|
||||
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
|
||||
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
||||
extern long md_pcrel_from_section (struct fix *, segT);
|
||||
|
||||
/* After all of the symbols have been adjusted, go over the file looking
|
||||
for any relocations that pic won't support. */
|
||||
#define tc_frob_file() frv_frob_file ()
|
||||
extern void frv_frob_file PARAMS ((void));
|
||||
extern void frv_frob_file (void);
|
||||
|
||||
/* We don't want 0x00 for code alignment because this generates `add.p
|
||||
gr0, gr0, gr0' patterns. Although it's fine as a nop instruction,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-hppa.h -- Header file for the PA
|
||||
Copyright 1989, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -198,7 +198,7 @@ void elf_hppa_final_processing (void);
|
|||
|
||||
int hppa_force_reg_syms_absolute (expressionS *, operatorT, expressionS *);
|
||||
|
||||
#define TC_FIX_TYPE PTR
|
||||
#define TC_FIX_TYPE void *
|
||||
#define TC_INIT_FIX_DATA(FIX) ((FIX)->tc_fix_data = NULL)
|
||||
|
||||
#ifdef OBJ_ELF
|
||||
|
|
|
@ -2010,7 +2010,7 @@ md_begin ()
|
|||
core_optab->end = optab;
|
||||
hash_err = hash_insert (op_hash,
|
||||
(optab - 1)->name,
|
||||
(PTR) core_optab);
|
||||
(void *) core_optab);
|
||||
if (hash_err)
|
||||
{
|
||||
as_fatal (_("Internal Error: Can't hash %s: %s"),
|
||||
|
@ -2033,7 +2033,7 @@ md_begin ()
|
|||
|
||||
for (regtab = i386_regtab; regtab_size--; regtab++)
|
||||
{
|
||||
hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab);
|
||||
hash_err = hash_insert (reg_hash, regtab->reg_name, (void *) regtab);
|
||||
if (hash_err)
|
||||
as_fatal (_("Internal Error: Can't hash %s: %s"),
|
||||
regtab->reg_name,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-i860.c -- Assembler for the Intel i860 architecture.
|
||||
Copyright 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2006, 2007 Free Software Foundation, Inc.
|
||||
2003, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
Brought back from the dead and completely reworked
|
||||
by Jason Eckhardt <jle@cygnus.com>.
|
||||
|
@ -221,7 +221,7 @@ md_begin (void)
|
|||
while (i860_opcodes[i].name != NULL)
|
||||
{
|
||||
const char *name = i860_opcodes[i].name;
|
||||
retval = hash_insert (op_hash, name, (PTR)&i860_opcodes[i]);
|
||||
retval = hash_insert (op_hash, name, (void *) &i860_opcodes[i]);
|
||||
if (retval != NULL)
|
||||
{
|
||||
fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-i960.h - Basic 80960 instruction formats.
|
||||
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2007
|
||||
2000, 2001, 2002, 2003, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -131,7 +131,7 @@ struct relocation_info
|
|||
/* reloc_callj() may replace a 'call' with a 'calls' or a
|
||||
'bal', in which cases it modifies *fixP as appropriate.
|
||||
In the case of a 'calls', no further work is required. */
|
||||
extern int reloc_callj PARAMS ((struct fix *));
|
||||
extern int reloc_callj (struct fix *);
|
||||
|
||||
#define TC_FORCE_RELOCATION_ABS(FIX) \
|
||||
(TC_FORCE_RELOCATION (FIX) \
|
||||
|
@ -155,7 +155,7 @@ extern int reloc_callj PARAMS ((struct fix *));
|
|||
}
|
||||
#endif
|
||||
|
||||
extern int i960_validate_fix PARAMS ((struct fix *, segT));
|
||||
extern int i960_validate_fix (struct fix *, segT);
|
||||
#define TC_VALIDATE_FIX(FIX,SEGTYPE,LABEL) \
|
||||
if (!i960_validate_fix (FIX, SEGTYPE)) goto LABEL
|
||||
|
||||
|
@ -169,14 +169,14 @@ extern int i960_validate_fix PARAMS ((struct fix *, segT));
|
|||
#define MD_APPLY_SYM_VALUE(FIX) 0
|
||||
#endif
|
||||
|
||||
extern void brtab_emit PARAMS ((void));
|
||||
extern void brtab_emit (void);
|
||||
#define md_end() brtab_emit ()
|
||||
|
||||
extern void tc_set_bal_of_call PARAMS ((symbolS *, symbolS *));
|
||||
extern void tc_set_bal_of_call (symbolS *, symbolS *);
|
||||
|
||||
extern struct symbol *tc_get_bal_of_call PARAMS ((symbolS *));
|
||||
extern struct symbol *tc_get_bal_of_call (symbolS *);
|
||||
|
||||
extern void i960_handle_align PARAMS ((struct frag *));
|
||||
extern void i960_handle_align (struct frag *);
|
||||
#define HANDLE_ALIGN(FRAG) i960_handle_align (FRAG)
|
||||
#define NO_RELOC -1
|
||||
|
||||
|
|
1093
gas/config/tc-ia64.c
1093
gas/config/tc-ia64.c
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* tc-ia64.h -- Header file for tc-ia64.c.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
|
@ -34,10 +34,10 @@
|
|||
#define MD_FLAGS_DEFAULT EF_IA_64_ABI64
|
||||
#endif /* TE_HPUX */
|
||||
|
||||
extern void (*ia64_number_to_chars) PARAMS ((char *, valueT, int));
|
||||
extern void (*ia64_number_to_chars) (char *, valueT, int);
|
||||
#define md_number_to_chars (*ia64_number_to_chars)
|
||||
|
||||
extern void ia64_elf_section_change_hook PARAMS ((void));
|
||||
extern void ia64_elf_section_change_hook (void);
|
||||
#define md_elf_section_change_hook ia64_elf_section_change_hook
|
||||
|
||||
/* We record the endian for this section. 0 means default, 1 means
|
||||
|
@ -49,10 +49,10 @@ struct ia64_segment_info_type
|
|||
|
||||
#define TC_SEGMENT_INFO_TYPE struct ia64_segment_info_type
|
||||
|
||||
extern void ia64_adjust_symtab PARAMS ((void));
|
||||
extern void ia64_adjust_symtab (void);
|
||||
#define tc_adjust_symtab() ia64_adjust_symtab ()
|
||||
|
||||
extern void ia64_frob_file PARAMS ((void));
|
||||
extern void ia64_frob_file (void);
|
||||
#define tc_frob_file() ia64_frob_file ()
|
||||
|
||||
/* We need to set the default object file format in ia64_init and not in
|
||||
|
@ -61,10 +61,10 @@ extern void ia64_frob_file PARAMS ((void));
|
|||
md_parse_args. */
|
||||
|
||||
#define HOST_SPECIAL_INIT ia64_init
|
||||
extern void ia64_init PARAMS ((int, char **));
|
||||
extern void ia64_init (int, char **);
|
||||
|
||||
#define TARGET_FORMAT ia64_target_format()
|
||||
extern const char *ia64_target_format PARAMS ((void));
|
||||
extern const char *ia64_target_format (void);
|
||||
|
||||
#define TARGET_ARCH bfd_arch_ia64
|
||||
#define DOUBLESLASH_LINE_COMMENTS /* allow //-style comments */
|
||||
|
@ -90,34 +90,32 @@ struct ia64_fix
|
|||
enum ia64_opnd opnd;
|
||||
};
|
||||
|
||||
extern void ia64_end_of_source PARAMS((void));
|
||||
extern void ia64_start_line PARAMS((void));
|
||||
extern int ia64_unrecognized_line PARAMS((int ch));
|
||||
extern void ia64_frob_label PARAMS((struct symbol *sym));
|
||||
extern void ia64_end_of_source (void);
|
||||
extern void ia64_start_line (void);
|
||||
extern int ia64_unrecognized_line (int);
|
||||
extern void ia64_frob_label (struct symbol *);
|
||||
#ifdef TE_HPUX
|
||||
extern int ia64_frob_symbol PARAMS((struct symbol *sym));
|
||||
extern int ia64_frob_symbol (struct symbol *);
|
||||
#endif
|
||||
extern void ia64_flush_pending_output PARAMS((void));
|
||||
extern int ia64_parse_name PARAMS((char *name, expressionS *e, char *nextP));
|
||||
extern int ia64_optimize_expr PARAMS((expressionS *l, operatorT op,
|
||||
expressionS *r));
|
||||
extern void ia64_cons_align PARAMS((int));
|
||||
extern void ia64_flush_insns PARAMS((void));
|
||||
extern int ia64_fix_adjustable PARAMS((struct fix *fix));
|
||||
extern int ia64_force_relocation PARAMS((struct fix *));
|
||||
extern void ia64_cons_fix_new PARAMS ((fragS *f, int where, int nbytes,
|
||||
expressionS *exp));
|
||||
extern void ia64_validate_fix PARAMS ((struct fix *fix));
|
||||
extern char * ia64_canonicalize_symbol_name PARAMS ((char *));
|
||||
extern int ia64_elf_section_letter PARAMS ((int, char **));
|
||||
extern flagword ia64_elf_section_flags PARAMS ((flagword, int, int));
|
||||
extern int ia64_elf_section_type PARAMS ((const char *, size_t len));
|
||||
extern long ia64_pcrel_from_section PARAMS ((struct fix *fix, segT sec));
|
||||
extern void ia64_md_do_align PARAMS ((int, const char *, int, int));
|
||||
extern void ia64_handle_align PARAMS ((fragS *f));
|
||||
extern void ia64_after_parse_args PARAMS ((void));
|
||||
extern void ia64_dwarf2_emit_offset PARAMS ((symbolS *, unsigned int));
|
||||
extern void ia64_check_label PARAMS ((symbolS *));
|
||||
extern void ia64_flush_pending_output (void);
|
||||
extern int ia64_parse_name (char *, expressionS *, char *);
|
||||
extern int ia64_optimize_expr (expressionS *, operatorT, expressionS *);
|
||||
extern void ia64_cons_align (int);
|
||||
extern void ia64_flush_insns (void);
|
||||
extern int ia64_fix_adjustable (struct fix *);
|
||||
extern int ia64_force_relocation (struct fix *);
|
||||
extern void ia64_cons_fix_new (fragS *, int, int, expressionS *);
|
||||
extern void ia64_validate_fix (struct fix *);
|
||||
extern char * ia64_canonicalize_symbol_name (char *);
|
||||
extern int ia64_elf_section_letter (int, char **);
|
||||
extern flagword ia64_elf_section_flags (flagword, int, int);
|
||||
extern int ia64_elf_section_type (const char *, size_t);
|
||||
extern long ia64_pcrel_from_section (struct fix *, segT);
|
||||
extern void ia64_md_do_align (int, const char *, int, int);
|
||||
extern void ia64_handle_align (fragS *);
|
||||
extern void ia64_after_parse_args (void);
|
||||
extern void ia64_dwarf2_emit_offset (symbolS *, unsigned int);
|
||||
extern void ia64_check_label (symbolS *);
|
||||
extern int ia64_estimate_size_before_relax (fragS *, asection *);
|
||||
extern void ia64_convert_frag (fragS *);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-m32c.c -- Assembler for the Renesas M32C.
|
||||
Copyright (C) 2005, 2006, 2007 Free Software Foundation.
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation.
|
||||
Contributed by RedHat.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -1303,8 +1303,6 @@ m32c_fix_adjustable (fixS * fixP)
|
|||
}
|
||||
|
||||
/* Worker function for m32c_is_colon_insn(). */
|
||||
static char restore_colon PARAMS ((int));
|
||||
|
||||
static char
|
||||
restore_colon (int advance_i_l_p_by)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-m32c.h -- Header file for tc-m32c.c.
|
||||
Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -36,7 +36,7 @@ extern void m32c_md_end (void);
|
|||
extern void m32c_start_line_hook (void);
|
||||
|
||||
/* call md_pcrel_from_section, not md_pcrel_from */
|
||||
long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
||||
long md_pcrel_from_section (struct fix *, segT);
|
||||
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
|
||||
|
||||
/* Permit temporary numeric labels. */
|
||||
|
@ -48,14 +48,14 @@ long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
|||
#define WORKING_DOT_WORD
|
||||
|
||||
#define md_apply_fix m32c_apply_fix
|
||||
extern void m32c_apply_fix PARAMS ((struct fix *, valueT *, segT));
|
||||
extern void m32c_apply_fix (struct fix *, valueT *, segT);
|
||||
|
||||
#define tc_fix_adjustable(fixP) m32c_fix_adjustable (fixP)
|
||||
extern bfd_boolean m32c_fix_adjustable PARAMS ((struct fix *));
|
||||
extern bfd_boolean m32c_fix_adjustable (struct fix *);
|
||||
|
||||
/* When relaxing, we need to emit various relocs we otherwise wouldn't. */
|
||||
#define TC_FORCE_RELOCATION(fix) m32c_force_relocation (fix)
|
||||
extern int m32c_force_relocation PARAMS ((struct fix *));
|
||||
extern int m32c_force_relocation (struct fix *);
|
||||
|
||||
#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
|
||||
m32c_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
|
||||
|
@ -64,7 +64,7 @@ extern void m32c_cons_fix_new (fragS *, int, int, expressionS *);
|
|||
extern const struct relax_type md_relax_table[];
|
||||
#define TC_GENERIC_RELAX_TABLE md_relax_table
|
||||
|
||||
extern void m32c_prepare_relax_scan PARAMS ((fragS *, offsetT *, relax_substateT state));
|
||||
extern void m32c_prepare_relax_scan (fragS *, offsetT *, relax_substateT);
|
||||
#define md_prepare_relax_scan(FRAGP, ADDR, AIM, STATE, TYPE) \
|
||||
m32c_prepare_relax_scan(FRAGP, &AIM, STATE)
|
||||
|
||||
|
@ -73,7 +73,7 @@ extern void m32c_prepare_relax_scan PARAMS ((fragS *, offsetT *, relax_substateT
|
|||
|
||||
/* Call md_pcrel_from_section(), not md_pcrel_from(). */
|
||||
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
|
||||
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
||||
extern long md_pcrel_from_section (struct fix *, segT);
|
||||
|
||||
/* We need a special version of the TC_START_LABEL macro so that we
|
||||
allow the :Z, :S, :Q and :G suffixes to be
|
||||
|
@ -85,6 +85,6 @@ extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
|||
the local variable 'c' which is passed to this macro as 'character'. */
|
||||
#define TC_START_LABEL(character, i_l_p) \
|
||||
((character) != ':' ? 0 : (character = m32c_is_colon_insn (s)) ? 0 : ((character = ':'), 1))
|
||||
extern char m32c_is_colon_insn PARAMS ((char *));
|
||||
extern char m32c_is_colon_insn (char *);
|
||||
|
||||
#define H_TICK_HEX 1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* tc-m68k.c -- Assemble for the m68k family
|
||||
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -4469,7 +4470,7 @@ md_begin (void)
|
|||
{
|
||||
const char *name = m68k_opcode_aliases[i].primary;
|
||||
const char *alias = m68k_opcode_aliases[i].alias;
|
||||
PTR val = hash_find (op_hash, name);
|
||||
void *val = hash_find (op_hash, name);
|
||||
|
||||
if (!val)
|
||||
as_fatal (_("Internal Error: Can't find %s in hash table"), name);
|
||||
|
@ -4508,7 +4509,7 @@ md_begin (void)
|
|||
{
|
||||
const char *name = mri_aliases[i].primary;
|
||||
const char *alias = mri_aliases[i].alias;
|
||||
PTR val = hash_find (op_hash, name);
|
||||
void *val = hash_find (op_hash, name);
|
||||
|
||||
if (!val)
|
||||
as_fatal (_("Internal Error: Can't find %s in hash table"), name);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-maxq.c -- assembler code for a MAXQ chip.
|
||||
|
||||
Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by HCL Technologies Pvt. Ltd.
|
||||
|
||||
|
@ -2844,7 +2844,7 @@ md_begin (void)
|
|||
{
|
||||
hash_err = hash_insert (op_hash,
|
||||
(optab - 1)->name,
|
||||
(PTR) core_optab);
|
||||
(void *) core_optab);
|
||||
}
|
||||
}
|
||||
else if (max_version == bfd_mach_maxq20)
|
||||
|
@ -2854,7 +2854,7 @@ md_begin (void)
|
|||
#endif
|
||||
hash_err = hash_insert (op_hash,
|
||||
(optab - 1)->name,
|
||||
(PTR) core_optab);
|
||||
(void *) core_optab);
|
||||
#if MAXQ10S
|
||||
}
|
||||
}
|
||||
|
@ -2884,7 +2884,7 @@ md_begin (void)
|
|||
{
|
||||
case bfd_mach_maxq10:
|
||||
if ((reg_tab->arch == MAXQ10) || (reg_tab->arch == MAX))
|
||||
hash_err = hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab);
|
||||
hash_err = hash_insert (reg_hash, reg_tab->reg_name, (void *) reg_tab);
|
||||
break;
|
||||
|
||||
case bfd_mach_maxq20:
|
||||
|
@ -2892,7 +2892,7 @@ md_begin (void)
|
|||
{
|
||||
#endif
|
||||
hash_err =
|
||||
hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab);
|
||||
hash_insert (reg_hash, reg_tab->reg_name, (void *) reg_tab);
|
||||
#if MAXQ10S
|
||||
}
|
||||
break;
|
||||
|
@ -2910,7 +2910,7 @@ md_begin (void)
|
|||
for (reg_tab = new_reg_table;
|
||||
reg_tab < (new_reg_table + num_of_reg - 1); reg_tab++)
|
||||
{
|
||||
hash_err = hash_insert (reg_hash, reg_tab->reg_name, (PTR) reg_tab);
|
||||
hash_err = hash_insert (reg_hash, reg_tab->reg_name, (void *) reg_tab);
|
||||
|
||||
if (hash_err)
|
||||
as_fatal (_("Internal Error : Can't Hash %s : %s"),
|
||||
|
@ -2924,7 +2924,7 @@ md_begin (void)
|
|||
memtab < mem_table + ARRAY_SIZE (mem_table);
|
||||
memtab++)
|
||||
{
|
||||
hash_err = hash_insert (mem_hash, memtab->name, (PTR) memtab);
|
||||
hash_err = hash_insert (mem_hash, memtab->name, (void *) memtab);
|
||||
if (hash_err)
|
||||
as_fatal (_("Internal Error : Can't Hash %s : %s"),
|
||||
memtab->name, hash_err);
|
||||
|
@ -2936,7 +2936,7 @@ md_begin (void)
|
|||
bittab < bit_table + ARRAY_SIZE (bit_table);
|
||||
bittab++)
|
||||
{
|
||||
hash_err = hash_insert (bit_hash, bittab->name, (PTR) bittab);
|
||||
hash_err = hash_insert (bit_hash, bittab->name, (void *) bittab);
|
||||
if (hash_err)
|
||||
as_fatal (_("Internal Error : Can't Hash %s : %s"),
|
||||
bittab->name, hash_err);
|
||||
|
@ -2949,7 +2949,7 @@ md_begin (void)
|
|||
memsyntab++)
|
||||
{
|
||||
hash_err =
|
||||
hash_insert (mem_syntax_hash, memsyntab->name, (PTR) memsyntab);
|
||||
hash_insert (mem_syntax_hash, memsyntab->name, (void *) memsyntab);
|
||||
if (hash_err)
|
||||
as_fatal (_("Internal Error : Can't Hash %s : %s"),
|
||||
memsyntab->name, hash_err);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-s390.c -- Assemble for the S390
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
|
||||
|
@ -77,11 +77,11 @@ int s390_cie_data_alignment;
|
|||
/* The target specific pseudo-ops which we support. */
|
||||
|
||||
/* Define the prototypes for the pseudo-ops */
|
||||
static void s390_byte PARAMS ((int));
|
||||
static void s390_elf_cons PARAMS ((int));
|
||||
static void s390_bss PARAMS ((int));
|
||||
static void s390_insn PARAMS ((int));
|
||||
static void s390_literals PARAMS ((int));
|
||||
static void s390_byte (int);
|
||||
static void s390_elf_cons (int);
|
||||
static void s390_bss (int);
|
||||
static void s390_insn (int);
|
||||
static void s390_literals (int);
|
||||
|
||||
const pseudo_typeS md_pseudo_table[] =
|
||||
{
|
||||
|
@ -205,24 +205,11 @@ static const struct pd_reg pre_defined_registers[] =
|
|||
|
||||
#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct pd_reg))
|
||||
|
||||
static int reg_name_search
|
||||
PARAMS ((const struct pd_reg *, int, const char *));
|
||||
static bfd_boolean register_name PARAMS ((expressionS *));
|
||||
static void init_default_arch PARAMS ((void));
|
||||
static void s390_insert_operand
|
||||
PARAMS ((unsigned char *, const struct s390_operand *, offsetT, char *,
|
||||
unsigned int));
|
||||
static char *md_gather_operands
|
||||
PARAMS ((char *, unsigned char *, const struct s390_opcode *));
|
||||
|
||||
/* Given NAME, find the register number associated with that name, return
|
||||
the integer value associated with the given name or -1 on failure. */
|
||||
|
||||
static int
|
||||
reg_name_search (regs, regcount, name)
|
||||
const struct pd_reg *regs;
|
||||
int regcount;
|
||||
const char *name;
|
||||
reg_name_search (const struct pd_reg *regs, int regcount, const char *name)
|
||||
{
|
||||
int middle, low, high;
|
||||
int cmp;
|
||||
|
@ -260,8 +247,7 @@ reg_name_search (regs, regcount, name)
|
|||
*/
|
||||
|
||||
static bfd_boolean
|
||||
register_name (expressionP)
|
||||
expressionS *expressionP;
|
||||
register_name (expressionS *expressionP)
|
||||
{
|
||||
int reg_number;
|
||||
char *name;
|
||||
|
@ -325,7 +311,7 @@ size_t md_longopts_size = sizeof (md_longopts);
|
|||
/* Initialize the default opcode arch and word size from the default
|
||||
architecture name if not specified by an option. */
|
||||
static void
|
||||
init_default_arch ()
|
||||
init_default_arch (void)
|
||||
{
|
||||
if (strcmp (default_arch, "s390") == 0)
|
||||
{
|
||||
|
@ -358,7 +344,7 @@ init_default_arch ()
|
|||
|
||||
/* Called by TARGET_FORMAT. */
|
||||
const char *
|
||||
s390_target_format ()
|
||||
s390_target_format (void)
|
||||
{
|
||||
/* We don't get a chance to initialize anything before we're called,
|
||||
so handle that now. */
|
||||
|
@ -368,9 +354,7 @@ s390_target_format ()
|
|||
}
|
||||
|
||||
int
|
||||
md_parse_option (c, arg)
|
||||
int c;
|
||||
char *arg;
|
||||
md_parse_option (int c, char *arg)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
|
@ -457,8 +441,7 @@ md_parse_option (c, arg)
|
|||
}
|
||||
|
||||
void
|
||||
md_show_usage (stream)
|
||||
FILE *stream;
|
||||
md_show_usage (FILE *stream)
|
||||
{
|
||||
fprintf (stream, _("\
|
||||
S390 options:\n\
|
||||
|
@ -477,7 +460,7 @@ md_show_usage (stream)
|
|||
opened. */
|
||||
|
||||
void
|
||||
md_begin ()
|
||||
md_begin (void)
|
||||
{
|
||||
register const struct s390_opcode *op;
|
||||
const struct s390_opcode *op_end;
|
||||
|
@ -500,7 +483,7 @@ md_begin ()
|
|||
op_end = s390_opformats + s390_num_opformats;
|
||||
for (op = s390_opformats; op < op_end; op++)
|
||||
{
|
||||
retval = hash_insert (s390_opformat_hash, op->name, (PTR) op);
|
||||
retval = hash_insert (s390_opformat_hash, op->name, (void *) op);
|
||||
if (retval != (const char *) NULL)
|
||||
{
|
||||
as_bad (_("Internal assembler error for instruction format %s"),
|
||||
|
@ -521,7 +504,7 @@ md_begin ()
|
|||
break;
|
||||
op++;
|
||||
}
|
||||
retval = hash_insert (s390_opcode_hash, op->name, (PTR) op);
|
||||
retval = hash_insert (s390_opcode_hash, op->name, (void *) op);
|
||||
if (retval != (const char *) NULL)
|
||||
{
|
||||
as_bad (_("Internal assembler error for instruction %s"),
|
||||
|
@ -543,7 +526,7 @@ md_begin ()
|
|||
|
||||
/* Called after all assembly has been done. */
|
||||
void
|
||||
s390_md_end ()
|
||||
s390_md_end (void)
|
||||
{
|
||||
if (s390_arch_size == 64)
|
||||
bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_64);
|
||||
|
@ -554,12 +537,11 @@ s390_md_end ()
|
|||
/* Insert an operand value into an instruction. */
|
||||
|
||||
static void
|
||||
s390_insert_operand (insn, operand, val, file, line)
|
||||
unsigned char *insn;
|
||||
const struct s390_operand *operand;
|
||||
offsetT val;
|
||||
char *file;
|
||||
unsigned int line;
|
||||
s390_insert_operand (unsigned char *insn,
|
||||
const struct s390_operand *operand,
|
||||
offsetT val,
|
||||
char *file,
|
||||
unsigned int line)
|
||||
{
|
||||
addressT uval;
|
||||
int offset;
|
||||
|
@ -643,14 +625,9 @@ struct map_tls
|
|||
bfd_reloc_code_real_type reloc;
|
||||
};
|
||||
|
||||
static bfd_reloc_code_real_type s390_tls_suffix
|
||||
PARAMS ((char **, expressionS *));
|
||||
|
||||
/* Parse tls marker and return the desired relocation. */
|
||||
static bfd_reloc_code_real_type
|
||||
s390_tls_suffix (str_p, exp_p)
|
||||
char **str_p;
|
||||
expressionS *exp_p;
|
||||
s390_tls_suffix (char **str_p, expressionS *exp_p)
|
||||
{
|
||||
static struct map_tls mapping[] =
|
||||
{
|
||||
|
@ -723,17 +700,10 @@ struct map_bfd
|
|||
elf_suffix_type suffix;
|
||||
};
|
||||
|
||||
static elf_suffix_type s390_elf_suffix PARAMS ((char **, expressionS *));
|
||||
static int s390_exp_compare PARAMS ((expressionS *exp1, expressionS *exp2));
|
||||
static elf_suffix_type s390_lit_suffix
|
||||
PARAMS ((char **, expressionS *, elf_suffix_type));
|
||||
|
||||
|
||||
/* Parse @got/@plt/@gotoff. and return the desired relocation. */
|
||||
static elf_suffix_type
|
||||
s390_elf_suffix (str_p, exp_p)
|
||||
char **str_p;
|
||||
expressionS *exp_p;
|
||||
s390_elf_suffix (char **str_p, expressionS *exp_p)
|
||||
{
|
||||
static struct map_bfd mapping[] =
|
||||
{
|
||||
|
@ -840,9 +810,7 @@ static int lp_count = 0;
|
|||
static int lpe_count = 0;
|
||||
|
||||
static int
|
||||
s390_exp_compare (exp1, exp2)
|
||||
expressionS *exp1;
|
||||
expressionS *exp2;
|
||||
s390_exp_compare (expressionS *exp1, expressionS *exp2)
|
||||
{
|
||||
if (exp1->X_op != exp2->X_op)
|
||||
return 0;
|
||||
|
@ -894,10 +862,7 @@ s390_exp_compare (exp1, exp2)
|
|||
/* Test for @lit and if its present make an entry in the literal pool and
|
||||
modify the current expression to be an offset into the literal pool. */
|
||||
static elf_suffix_type
|
||||
s390_lit_suffix (str_p, exp_p, suffix)
|
||||
char **str_p;
|
||||
expressionS *exp_p;
|
||||
elf_suffix_type suffix;
|
||||
s390_lit_suffix (char **str_p, expressionS *exp_p, elf_suffix_type suffix)
|
||||
{
|
||||
bfd_reloc_code_real_type reloc;
|
||||
char tmp_name[64];
|
||||
|
@ -1040,8 +1005,7 @@ s390_lit_suffix (str_p, exp_p, suffix)
|
|||
/* Like normal .long/.short/.word, except support @got, etc.
|
||||
clobbers input_line_pointer, checks end-of-line. */
|
||||
static void
|
||||
s390_elf_cons (nbytes)
|
||||
register int nbytes; /* 1=.byte, 2=.word, 4=.long */
|
||||
s390_elf_cons (int nbytes /* 1=.byte, 2=.word, 4=.long */)
|
||||
{
|
||||
expressionS exp;
|
||||
elf_suffix_type suffix;
|
||||
|
@ -1170,10 +1134,9 @@ struct s390_fixup
|
|||
/* This routine is called for each instruction to be assembled. */
|
||||
|
||||
static char *
|
||||
md_gather_operands (str, insn, opcode)
|
||||
char *str;
|
||||
unsigned char *insn;
|
||||
const struct s390_opcode *opcode;
|
||||
md_gather_operands (char *str,
|
||||
unsigned char *insn,
|
||||
const struct s390_opcode *opcode)
|
||||
{
|
||||
struct s390_fixup fixups[MAX_INSN_FIXUPS];
|
||||
const struct s390_operand *operand;
|
||||
|
@ -1545,8 +1508,7 @@ md_gather_operands (str, insn, opcode)
|
|||
/* This routine is called for each instruction to be assembled. */
|
||||
|
||||
void
|
||||
md_assemble (str)
|
||||
char *str;
|
||||
md_assemble (char *str)
|
||||
{
|
||||
const struct s390_opcode *opcode;
|
||||
unsigned char insn[6];
|
||||
|
@ -1598,8 +1560,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
|||
#endif
|
||||
|
||||
void
|
||||
s390_bss (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s390_bss (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* We don't support putting frags in the BSS segment, we fake it
|
||||
by marking in_bss, then looking at s_skip for clues. */
|
||||
|
@ -1611,8 +1572,7 @@ s390_bss (ignore)
|
|||
/* Pseudo-op handling. */
|
||||
|
||||
void
|
||||
s390_insn (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s390_insn (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
expressionS exp;
|
||||
const struct s390_opcode *opformat;
|
||||
|
@ -1681,8 +1641,7 @@ s390_insn (ignore)
|
|||
pseudo-op, but it can also take a single ASCII string. */
|
||||
|
||||
static void
|
||||
s390_byte (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s390_byte (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (*input_line_pointer != '\"')
|
||||
{
|
||||
|
@ -1717,8 +1676,7 @@ s390_byte (ignore)
|
|||
@lit suffix. */
|
||||
|
||||
static void
|
||||
s390_literals (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s390_literals (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct s390_lpe *lpe;
|
||||
|
||||
|
@ -1785,9 +1743,7 @@ md_atof (int type, char *litp, int *sizep)
|
|||
/* Align a section (I don't know why this is machine dependent). */
|
||||
|
||||
valueT
|
||||
md_section_align (seg, addr)
|
||||
asection *seg;
|
||||
valueT addr;
|
||||
md_section_align (asection *seg, valueT addr)
|
||||
{
|
||||
int align = bfd_get_section_alignment (stdoutput, seg);
|
||||
|
||||
|
@ -1797,9 +1753,8 @@ md_section_align (seg, addr)
|
|||
/* We don't have any form of relaxing. */
|
||||
|
||||
int
|
||||
md_estimate_size_before_relax (fragp, seg)
|
||||
fragS *fragp ATTRIBUTE_UNUSED;
|
||||
asection *seg ATTRIBUTE_UNUSED;
|
||||
md_estimate_size_before_relax (fragS *fragp ATTRIBUTE_UNUSED,
|
||||
asection *seg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
abort ();
|
||||
return 0;
|
||||
|
@ -1808,17 +1763,15 @@ md_estimate_size_before_relax (fragp, seg)
|
|||
/* Convert a machine dependent frag. We never generate these. */
|
||||
|
||||
void
|
||||
md_convert_frag (abfd, sec, fragp)
|
||||
bfd *abfd ATTRIBUTE_UNUSED;
|
||||
asection *sec ATTRIBUTE_UNUSED;
|
||||
fragS *fragp ATTRIBUTE_UNUSED;
|
||||
md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
asection *sec ATTRIBUTE_UNUSED,
|
||||
fragS *fragp ATTRIBUTE_UNUSED)
|
||||
{
|
||||
abort ();
|
||||
}
|
||||
|
||||
symbolS *
|
||||
md_undefined_symbol (name)
|
||||
char *name;
|
||||
md_undefined_symbol (char *name)
|
||||
{
|
||||
if (*name == '_' && *(name + 1) == 'G'
|
||||
&& strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
|
||||
|
@ -1841,9 +1794,7 @@ md_undefined_symbol (name)
|
|||
given a PC relative reloc. */
|
||||
|
||||
long
|
||||
md_pcrel_from_section (fixp, sec)
|
||||
fixS *fixp;
|
||||
segT sec ATTRIBUTE_UNUSED;
|
||||
md_pcrel_from_section (fixS *fixp, segT sec ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return fixp->fx_frag->fr_address + fixp->fx_where;
|
||||
}
|
||||
|
@ -1853,8 +1804,7 @@ md_pcrel_from_section (fixp, sec)
|
|||
to make sure that the dynamic relocations are done correctly, so in
|
||||
some cases we force the original symbol to be used. */
|
||||
int
|
||||
tc_s390_fix_adjustable (fixP)
|
||||
fixS *fixP;
|
||||
tc_s390_fix_adjustable (fixS *fixP)
|
||||
{
|
||||
/* Don't adjust references to merge sections. */
|
||||
if ((S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0)
|
||||
|
@ -1912,8 +1862,7 @@ tc_s390_fix_adjustable (fixP)
|
|||
/* Return true if we must always emit a reloc for a type and false if
|
||||
there is some hope of resolving it at assembly time. */
|
||||
int
|
||||
tc_s390_force_relocation (fixp)
|
||||
struct fix *fixp;
|
||||
tc_s390_force_relocation (struct fix *fixp)
|
||||
{
|
||||
/* Ensure we emit a relocation for every reference to the global
|
||||
offset table or to the procedure link table. */
|
||||
|
@ -1960,10 +1909,7 @@ tc_s390_force_relocation (fixp)
|
|||
fixup. */
|
||||
|
||||
void
|
||||
md_apply_fix (fixP, valP, seg)
|
||||
fixS *fixP;
|
||||
valueT *valP;
|
||||
segT seg ATTRIBUTE_UNUSED;
|
||||
md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *where;
|
||||
valueT value = *valP;
|
||||
|
@ -2247,9 +2193,7 @@ md_apply_fix (fixP, valP, seg)
|
|||
/* Generate a reloc for a fixup. */
|
||||
|
||||
arelent *
|
||||
tc_gen_reloc (seg, fixp)
|
||||
asection *seg ATTRIBUTE_UNUSED;
|
||||
fixS *fixp;
|
||||
tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
|
||||
{
|
||||
bfd_reloc_code_real_type code;
|
||||
arelent *reloc;
|
||||
|
@ -2284,7 +2228,7 @@ tc_gen_reloc (seg, fixp)
|
|||
}
|
||||
|
||||
void
|
||||
s390_cfi_frame_initial_instructions ()
|
||||
s390_cfi_frame_initial_instructions (void)
|
||||
{
|
||||
cfi_add_CFA_def_cfa (15, s390_arch_size == 64 ? 160 : 96);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-s390.h -- Header file for tc-s390.c.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
Written by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
|
||||
|
@ -25,25 +25,25 @@
|
|||
struct fix;
|
||||
|
||||
#define TC_FORCE_RELOCATION(FIX) tc_s390_force_relocation(FIX)
|
||||
extern int tc_s390_force_relocation PARAMS ((struct fix *));
|
||||
extern int tc_s390_force_relocation (struct fix *);
|
||||
|
||||
/* Don't resolve foo@PLT-bar to offset@PLT. */
|
||||
#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \
|
||||
(! SEG_NORMAL (SEG) || TC_FORCE_RELOCATION (FIX))
|
||||
|
||||
#define tc_fix_adjustable(X) tc_s390_fix_adjustable(X)
|
||||
extern int tc_s390_fix_adjustable PARAMS ((struct fix *));
|
||||
extern int tc_s390_fix_adjustable (struct fix *);
|
||||
|
||||
/* Values passed to md_apply_fix don't include symbol values. */
|
||||
#define MD_APPLY_SYM_VALUE(FIX) 0
|
||||
|
||||
/* The target BFD architecture. */
|
||||
#define TARGET_ARCH bfd_arch_s390
|
||||
extern enum bfd_architecture s390_arch PARAMS ((void));
|
||||
extern enum bfd_architecture s390_arch (void);
|
||||
|
||||
/* The target BFD format. */
|
||||
#define TARGET_FORMAT s390_target_format()
|
||||
extern const char *s390_target_format PARAMS ((void));
|
||||
extern const char *s390_target_format (void);
|
||||
|
||||
/* Set the endianness we are using. */
|
||||
#define TARGET_BYTES_BIG_ENDIAN 1
|
||||
|
@ -75,20 +75,20 @@ extern int target_big_endian;
|
|||
|
||||
/* call md_pcrel_from_section, not md_pcrel_from */
|
||||
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section(FIX, SEC)
|
||||
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
||||
extern long md_pcrel_from_section (struct fix *, segT);
|
||||
|
||||
#define md_operand(x)
|
||||
|
||||
extern void s390_md_end PARAMS ((void));
|
||||
extern void s390_md_end (void);
|
||||
#define md_end() s390_md_end ()
|
||||
|
||||
#define TARGET_USE_CFIPOP 1
|
||||
|
||||
#define tc_cfi_frame_initial_instructions s390_cfi_frame_initial_instructions
|
||||
extern void s390_cfi_frame_initial_instructions PARAMS ((void));
|
||||
extern void s390_cfi_frame_initial_instructions (void);
|
||||
|
||||
#define tc_regname_to_dw2regnum tc_s390_regname_to_dw2regnum
|
||||
extern int tc_s390_regname_to_dw2regnum PARAMS ((char *regname));
|
||||
extern int tc_s390_regname_to_dw2regnum (char *regname);
|
||||
|
||||
extern int s390_cie_data_alignment;
|
||||
|
||||
|
|
|
@ -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, 2005, 2006, 2007
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -37,21 +37,10 @@
|
|||
#define U0xffffffff ((((unsigned long) 1 << 16) << 16) - 1)
|
||||
#define U0x80000000 ((((unsigned long) 1 << 16) << 15))
|
||||
|
||||
static struct sparc_arch *lookup_arch PARAMS ((char *));
|
||||
static void init_default_arch PARAMS ((void));
|
||||
static int sparc_ip PARAMS ((char *, const struct sparc_opcode **));
|
||||
static int in_signed_range PARAMS ((bfd_signed_vma, bfd_signed_vma));
|
||||
static int in_unsigned_range PARAMS ((bfd_vma, bfd_vma));
|
||||
static int in_bitfield_range PARAMS ((bfd_signed_vma, bfd_signed_vma));
|
||||
static int sparc_ffs PARAMS ((unsigned int));
|
||||
static void synthetize_setuw PARAMS ((const struct sparc_opcode *));
|
||||
static void synthetize_setsw PARAMS ((const struct sparc_opcode *));
|
||||
static void synthetize_setx PARAMS ((const struct sparc_opcode *));
|
||||
static bfd_vma BSR PARAMS ((bfd_vma, int));
|
||||
static int cmp_reg_entry PARAMS ((const PTR, const PTR));
|
||||
static int parse_keyword_arg PARAMS ((int (*) (const char *), char **, int *));
|
||||
static int parse_const_expr_arg PARAMS ((char **, int *));
|
||||
static int get_expression PARAMS ((char *str));
|
||||
static int sparc_ip (char *, const struct sparc_opcode **);
|
||||
static int parse_keyword_arg (int (*) (const char *), char **, int *);
|
||||
static int parse_const_expr_arg (char **, int *);
|
||||
static int get_expression (char *);
|
||||
|
||||
/* Default architecture. */
|
||||
/* ??? The default value should be V8, but sparclite support was added
|
||||
|
@ -131,17 +120,16 @@ int sparc_cie_data_alignment;
|
|||
/* Handle of the OPCODE hash table. */
|
||||
static struct hash_control *op_hash;
|
||||
|
||||
static int mylog2 PARAMS ((int));
|
||||
static void s_data1 PARAMS ((void));
|
||||
static void s_seg PARAMS ((int));
|
||||
static void s_proc PARAMS ((int));
|
||||
static void s_reserve PARAMS ((int));
|
||||
static void s_common PARAMS ((int));
|
||||
static void s_empty PARAMS ((int));
|
||||
static void s_uacons PARAMS ((int));
|
||||
static void s_ncons PARAMS ((int));
|
||||
static void s_data1 (void);
|
||||
static void s_seg (int);
|
||||
static void s_proc (int);
|
||||
static void s_reserve (int);
|
||||
static void s_common (int);
|
||||
static void s_empty (int);
|
||||
static void s_uacons (int);
|
||||
static void s_ncons (int);
|
||||
#ifdef OBJ_ELF
|
||||
static void s_register PARAMS ((int));
|
||||
static void s_register (int);
|
||||
#endif
|
||||
|
||||
const pseudo_typeS md_pseudo_table[] =
|
||||
|
@ -217,8 +205,7 @@ struct sparc_it
|
|||
|
||||
struct sparc_it the_insn, set_insn;
|
||||
|
||||
static void output_insn
|
||||
PARAMS ((const struct sparc_opcode *, struct sparc_it *));
|
||||
static void output_insn (const struct sparc_opcode *, struct sparc_it *);
|
||||
|
||||
/* Table of arguments to -A.
|
||||
The sparc_opcode_arch table in sparc-opc.c is insufficient and incorrect
|
||||
|
@ -260,8 +247,7 @@ static struct sparc_arch {
|
|||
static enum sparc_arch_types default_arch_type;
|
||||
|
||||
static struct sparc_arch *
|
||||
lookup_arch (name)
|
||||
char *name;
|
||||
lookup_arch (char *name)
|
||||
{
|
||||
struct sparc_arch *sa;
|
||||
|
||||
|
@ -277,7 +263,7 @@ lookup_arch (name)
|
|||
architecture name. */
|
||||
|
||||
static void
|
||||
init_default_arch ()
|
||||
init_default_arch (void)
|
||||
{
|
||||
struct sparc_arch *sa = lookup_arch (default_arch);
|
||||
|
||||
|
@ -296,7 +282,7 @@ init_default_arch ()
|
|||
/* Called by TARGET_FORMAT. */
|
||||
|
||||
const char *
|
||||
sparc_target_format ()
|
||||
sparc_target_format (void)
|
||||
{
|
||||
/* We don't get a chance to initialize anything before we're called,
|
||||
so handle that now. */
|
||||
|
@ -451,9 +437,7 @@ struct option md_longopts[] = {
|
|||
size_t md_longopts_size = sizeof (md_longopts);
|
||||
|
||||
int
|
||||
md_parse_option (c, arg)
|
||||
int c;
|
||||
char *arg;
|
||||
md_parse_option (int c, char *arg)
|
||||
{
|
||||
/* We don't get a chance to initialize anything before we're called,
|
||||
so handle that now. */
|
||||
|
@ -622,8 +606,7 @@ md_parse_option (c, arg)
|
|||
}
|
||||
|
||||
void
|
||||
md_show_usage (stream)
|
||||
FILE *stream;
|
||||
md_show_usage (FILE *stream)
|
||||
{
|
||||
const struct sparc_arch *arch;
|
||||
int column;
|
||||
|
@ -791,9 +774,7 @@ struct priv_reg_entry v9a_asr_table[] =
|
|||
};
|
||||
|
||||
static int
|
||||
cmp_reg_entry (parg, qarg)
|
||||
const PTR parg;
|
||||
const PTR qarg;
|
||||
cmp_reg_entry (const void *parg, const void *qarg)
|
||||
{
|
||||
const struct priv_reg_entry *p = (const struct priv_reg_entry *) parg;
|
||||
const struct priv_reg_entry *q = (const struct priv_reg_entry *) qarg;
|
||||
|
@ -806,7 +787,7 @@ cmp_reg_entry (parg, qarg)
|
|||
need. */
|
||||
|
||||
void
|
||||
md_begin ()
|
||||
md_begin (void)
|
||||
{
|
||||
register const char *retval = NULL;
|
||||
int lose = 0;
|
||||
|
@ -824,7 +805,7 @@ md_begin ()
|
|||
while (i < (unsigned int) sparc_num_opcodes)
|
||||
{
|
||||
const char *name = sparc_opcodes[i].name;
|
||||
retval = hash_insert (op_hash, name, (PTR) &sparc_opcodes[i]);
|
||||
retval = hash_insert (op_hash, name, (void *) &sparc_opcodes[i]);
|
||||
if (retval != NULL)
|
||||
{
|
||||
as_bad (_("Internal error: can't hash `%s': %s\n"),
|
||||
|
@ -860,7 +841,8 @@ md_begin ()
|
|||
}
|
||||
else
|
||||
{
|
||||
retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn);
|
||||
retval = hash_insert (op_hash, native_op_table[i].name,
|
||||
(void *) insn);
|
||||
if (retval != NULL)
|
||||
{
|
||||
as_bad (_("Internal error: can't hash `%s': %s\n"),
|
||||
|
@ -904,7 +886,7 @@ md_begin ()
|
|||
/* Called after all assembly has been done. */
|
||||
|
||||
void
|
||||
sparc_md_end ()
|
||||
sparc_md_end (void)
|
||||
{
|
||||
unsigned long mach = bfd_mach_sparc;
|
||||
|
||||
|
@ -932,9 +914,8 @@ sparc_md_end ()
|
|||
|
||||
/* Return non-zero if VAL is in the range -(MAX+1) to MAX. */
|
||||
|
||||
static INLINE int
|
||||
in_signed_range (val, max)
|
||||
bfd_signed_vma val, max;
|
||||
static inline int
|
||||
in_signed_range (bfd_signed_vma val, bfd_signed_vma max)
|
||||
{
|
||||
if (max <= 0)
|
||||
abort ();
|
||||
|
@ -954,9 +935,8 @@ in_signed_range (val, max)
|
|||
|
||||
/* Return non-zero if VAL is in the range 0 to MAX. */
|
||||
|
||||
static INLINE int
|
||||
in_unsigned_range (val, max)
|
||||
bfd_vma val, max;
|
||||
static inline int
|
||||
in_unsigned_range (bfd_vma val, bfd_vma max)
|
||||
{
|
||||
if (val > max)
|
||||
return 0;
|
||||
|
@ -966,9 +946,8 @@ in_unsigned_range (val, max)
|
|||
/* Return non-zero if VAL is in the range -(MAX/2+1) to MAX.
|
||||
(e.g. -15 to +31). */
|
||||
|
||||
static INLINE int
|
||||
in_bitfield_range (val, max)
|
||||
bfd_signed_vma val, max;
|
||||
static inline int
|
||||
in_bitfield_range (bfd_signed_vma val, bfd_signed_vma max)
|
||||
{
|
||||
if (max <= 0)
|
||||
abort ();
|
||||
|
@ -980,8 +959,7 @@ in_bitfield_range (val, max)
|
|||
}
|
||||
|
||||
static int
|
||||
sparc_ffs (mask)
|
||||
unsigned int mask;
|
||||
sparc_ffs (unsigned int mask)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -995,9 +973,7 @@ sparc_ffs (mask)
|
|||
|
||||
/* Implement big shift right. */
|
||||
static bfd_vma
|
||||
BSR (val, amount)
|
||||
bfd_vma val;
|
||||
int amount;
|
||||
BSR (bfd_vma val, int amount)
|
||||
{
|
||||
if (sizeof (bfd_vma) <= 4 && amount >= 32)
|
||||
as_fatal (_("Support for 64-bit arithmetic not compiled in."));
|
||||
|
@ -1034,8 +1010,7 @@ static unsigned long last_opcode;
|
|||
/* Handle the set and setuw synthetic instructions. */
|
||||
|
||||
static void
|
||||
synthetize_setuw (insn)
|
||||
const struct sparc_opcode *insn;
|
||||
synthetize_setuw (const struct sparc_opcode *insn)
|
||||
{
|
||||
int need_hi22_p = 0;
|
||||
int rd = (the_insn.opcode & RD (~0)) >> 25;
|
||||
|
@ -1093,8 +1068,7 @@ synthetize_setuw (insn)
|
|||
/* Handle the setsw synthetic instruction. */
|
||||
|
||||
static void
|
||||
synthetize_setsw (insn)
|
||||
const struct sparc_opcode *insn;
|
||||
synthetize_setsw (const struct sparc_opcode *insn)
|
||||
{
|
||||
int low32, rd, opc;
|
||||
|
||||
|
@ -1145,8 +1119,7 @@ synthetize_setsw (insn)
|
|||
/* Handle the setsw synthetic instruction. */
|
||||
|
||||
static void
|
||||
synthetize_setx (insn)
|
||||
const struct sparc_opcode *insn;
|
||||
synthetize_setx (const struct sparc_opcode *insn)
|
||||
{
|
||||
int upper32, lower32;
|
||||
int tmpreg = (the_insn.opcode & RS1 (~0)) >> 14;
|
||||
|
@ -1312,8 +1285,7 @@ synthetize_setx (insn)
|
|||
/* Main entry point to assemble one instruction. */
|
||||
|
||||
void
|
||||
md_assemble (str)
|
||||
char *str;
|
||||
md_assemble (char *str)
|
||||
{
|
||||
const struct sparc_opcode *insn;
|
||||
int special_case;
|
||||
|
@ -1394,9 +1366,7 @@ md_assemble (str)
|
|||
/* Subroutine of md_assemble to do the actual parsing. */
|
||||
|
||||
static int
|
||||
sparc_ip (str, pinsn)
|
||||
char *str;
|
||||
const struct sparc_opcode **pinsn;
|
||||
sparc_ip (char *str, const struct sparc_opcode **pinsn)
|
||||
{
|
||||
char *error_message = "";
|
||||
char *s;
|
||||
|
@ -2832,10 +2802,9 @@ sparc_ip (str, pinsn)
|
|||
If successful, INPUT_POINTER is updated. */
|
||||
|
||||
static int
|
||||
parse_keyword_arg (lookup_fn, input_pointerP, valueP)
|
||||
int (*lookup_fn) PARAMS ((const char *));
|
||||
char **input_pointerP;
|
||||
int *valueP;
|
||||
parse_keyword_arg (int (*lookup_fn) (const char *),
|
||||
char **input_pointerP,
|
||||
int *valueP)
|
||||
{
|
||||
int value;
|
||||
char c, *p, *q;
|
||||
|
@ -2860,9 +2829,7 @@ parse_keyword_arg (lookup_fn, input_pointerP, valueP)
|
|||
The result is a boolean indicating success. */
|
||||
|
||||
static int
|
||||
parse_const_expr_arg (input_pointerP, valueP)
|
||||
char **input_pointerP;
|
||||
int *valueP;
|
||||
parse_const_expr_arg (char **input_pointerP, int *valueP)
|
||||
{
|
||||
char *save = input_line_pointer;
|
||||
expressionS exp;
|
||||
|
@ -2892,8 +2859,7 @@ parse_const_expr_arg (input_pointerP, valueP)
|
|||
/* Subroutine of sparc_ip to parse an expression. */
|
||||
|
||||
static int
|
||||
get_expression (str)
|
||||
char *str;
|
||||
get_expression (char *str)
|
||||
{
|
||||
char *save_in;
|
||||
segT seg;
|
||||
|
@ -2920,9 +2886,7 @@ get_expression (str)
|
|||
/* Subroutine of md_assemble to output one insn. */
|
||||
|
||||
static void
|
||||
output_insn (insn, the_insn)
|
||||
const struct sparc_opcode *insn;
|
||||
struct sparc_it *the_insn;
|
||||
output_insn (const struct sparc_opcode *insn, struct sparc_it *the_insn)
|
||||
{
|
||||
char *toP = frag_more (4);
|
||||
|
||||
|
@ -2968,10 +2932,7 @@ md_atof (int type, char *litP, int *sizeP)
|
|||
endianness. */
|
||||
|
||||
void
|
||||
md_number_to_chars (buf, val, n)
|
||||
char *buf;
|
||||
valueT val;
|
||||
int n;
|
||||
md_number_to_chars (char *buf, valueT val, int n)
|
||||
{
|
||||
if (target_big_endian)
|
||||
number_to_chars_bigendian (buf, val, n);
|
||||
|
@ -2988,10 +2949,7 @@ md_number_to_chars (buf, val, n)
|
|||
hold. */
|
||||
|
||||
void
|
||||
md_apply_fix (fixP, valP, segment)
|
||||
fixS *fixP;
|
||||
valueT *valP;
|
||||
segT segment ATTRIBUTE_UNUSED;
|
||||
md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
|
||||
offsetT val = * (offsetT *) valP;
|
||||
|
@ -3379,9 +3337,7 @@ md_apply_fix (fixP, valP, segment)
|
|||
format. */
|
||||
|
||||
arelent **
|
||||
tc_gen_reloc (section, fixp)
|
||||
asection *section;
|
||||
fixS *fixp;
|
||||
tc_gen_reloc (asection *section, fixS *fixp)
|
||||
{
|
||||
static arelent *relocs[3];
|
||||
arelent *reloc;
|
||||
|
@ -3609,8 +3565,7 @@ tc_gen_reloc (section, fixp)
|
|||
/* We have no need to default values of symbols. */
|
||||
|
||||
symbolS *
|
||||
md_undefined_symbol (name)
|
||||
char *name ATTRIBUTE_UNUSED;
|
||||
md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -3618,9 +3573,7 @@ md_undefined_symbol (name)
|
|||
/* Round up a section size to the appropriate boundary. */
|
||||
|
||||
valueT
|
||||
md_section_align (segment, size)
|
||||
segT segment ATTRIBUTE_UNUSED;
|
||||
valueT size;
|
||||
md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size)
|
||||
{
|
||||
#ifndef OBJ_ELF
|
||||
/* This is not right for ELF; a.out wants it, and COFF will force
|
||||
|
@ -3643,8 +3596,7 @@ md_section_align (segment, size)
|
|||
its size. This gets us to the following instruction.
|
||||
(??? Is this right? FIXME-SOON) */
|
||||
long
|
||||
md_pcrel_from (fixP)
|
||||
fixS *fixP;
|
||||
md_pcrel_from (fixS *fixP)
|
||||
{
|
||||
long ret;
|
||||
|
||||
|
@ -3660,8 +3612,7 @@ md_pcrel_from (fixP)
|
|||
of two. */
|
||||
|
||||
static int
|
||||
mylog2 (value)
|
||||
int value;
|
||||
mylog2 (int value)
|
||||
{
|
||||
int shift;
|
||||
|
||||
|
@ -3681,8 +3632,7 @@ static int max_alignment = 15;
|
|||
#endif
|
||||
|
||||
static void
|
||||
s_reserve (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s_reserve (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *name;
|
||||
char *p;
|
||||
|
@ -3826,8 +3776,7 @@ s_reserve (ignore)
|
|||
}
|
||||
|
||||
static void
|
||||
s_common (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s_common (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *name;
|
||||
char c;
|
||||
|
@ -4006,8 +3955,7 @@ s_common (ignore)
|
|||
invalid delay slot usage. */
|
||||
|
||||
static void
|
||||
s_empty (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s_empty (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* The easy way to implement is to just forget about the last
|
||||
instruction. */
|
||||
|
@ -4015,8 +3963,7 @@ s_empty (ignore)
|
|||
}
|
||||
|
||||
static void
|
||||
s_seg (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s_seg (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
||||
if (strncmp (input_line_pointer, "\"text\"", 6) == 0)
|
||||
|
@ -4051,15 +3998,14 @@ s_seg (ignore)
|
|||
}
|
||||
|
||||
static void
|
||||
s_data1 ()
|
||||
s_data1 (void)
|
||||
{
|
||||
subseg_set (data_section, 1);
|
||||
demand_empty_rest_of_line ();
|
||||
}
|
||||
|
||||
static void
|
||||
s_proc (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s_proc (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
while (!is_end_of_line[(unsigned char) *input_line_pointer])
|
||||
{
|
||||
|
@ -4083,8 +4029,7 @@ static const char *sparc_cons_special_reloc;
|
|||
to be aligned. */
|
||||
|
||||
static void
|
||||
s_uacons (bytes)
|
||||
int bytes;
|
||||
s_uacons (int bytes)
|
||||
{
|
||||
/* Tell sparc_cons_align not to align this value. */
|
||||
sparc_no_align_cons = 1;
|
||||
|
@ -4097,8 +4042,7 @@ s_uacons (bytes)
|
|||
sparc_arch_size 64 it is equivalent to .xword. */
|
||||
|
||||
static void
|
||||
s_ncons (bytes)
|
||||
int bytes ATTRIBUTE_UNUSED;
|
||||
s_ncons (int bytes ATTRIBUTE_UNUSED)
|
||||
{
|
||||
cons (sparc_arch_size == 32 ? 4 : 8);
|
||||
}
|
||||
|
@ -4112,8 +4056,7 @@ s_ncons (bytes)
|
|||
*/
|
||||
|
||||
static void
|
||||
s_register (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
s_register (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char c;
|
||||
int reg;
|
||||
|
@ -4201,7 +4144,7 @@ s_register (ignore)
|
|||
symbols which need it. */
|
||||
|
||||
void
|
||||
sparc_adjust_symtab ()
|
||||
sparc_adjust_symtab (void)
|
||||
{
|
||||
symbolS *sym;
|
||||
|
||||
|
@ -4232,8 +4175,7 @@ sparc_adjust_symtab ()
|
|||
option to check for it. */
|
||||
|
||||
void
|
||||
sparc_cons_align (nbytes)
|
||||
int nbytes;
|
||||
sparc_cons_align (int nbytes)
|
||||
{
|
||||
int nalign;
|
||||
char *p;
|
||||
|
@ -4268,8 +4210,7 @@ sparc_cons_align (nbytes)
|
|||
/* This is called from HANDLE_ALIGN in tc-sparc.h. */
|
||||
|
||||
void
|
||||
sparc_handle_align (fragp)
|
||||
fragS *fragp;
|
||||
sparc_handle_align (fragS *fragp)
|
||||
{
|
||||
int count, fix;
|
||||
char *p;
|
||||
|
@ -4325,7 +4266,7 @@ sparc_handle_align (fragp)
|
|||
/* Some special processing for a Sparc ELF file. */
|
||||
|
||||
void
|
||||
sparc_elf_final_processing ()
|
||||
sparc_elf_final_processing (void)
|
||||
{
|
||||
/* Set the Sparc ELF flag bits. FIXME: There should probably be some
|
||||
sort of BFD interface for this. */
|
||||
|
@ -4352,9 +4293,7 @@ sparc_elf_final_processing ()
|
|||
}
|
||||
|
||||
void
|
||||
sparc_cons (exp, size)
|
||||
expressionS *exp;
|
||||
int size;
|
||||
sparc_cons (expressionS *exp, int size)
|
||||
{
|
||||
char *save;
|
||||
|
||||
|
@ -4495,11 +4434,10 @@ sparc_cons (exp, size)
|
|||
we want to handle little endian relocs specially. */
|
||||
|
||||
void
|
||||
cons_fix_new_sparc (frag, where, nbytes, exp)
|
||||
fragS *frag;
|
||||
int where;
|
||||
unsigned int nbytes;
|
||||
expressionS *exp;
|
||||
cons_fix_new_sparc (fragS *frag,
|
||||
int where,
|
||||
unsigned int nbytes,
|
||||
expressionS *exp)
|
||||
{
|
||||
bfd_reloc_code_real_type r;
|
||||
|
||||
|
@ -4552,7 +4490,7 @@ cons_fix_new_sparc (frag, where, nbytes, exp)
|
|||
}
|
||||
|
||||
void
|
||||
sparc_cfi_frame_initial_instructions ()
|
||||
sparc_cfi_frame_initial_instructions (void)
|
||||
{
|
||||
cfi_add_CFA_def_cfa (14, sparc_arch_size == 64 ? 0x7ff : 0);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-sparc.h - Macros and type defines for the sparc.
|
||||
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2005, 2007
|
||||
1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -45,7 +45,7 @@ struct frag;
|
|||
#define ELF64_TARGET_FORMAT "elf64-sparc"
|
||||
#endif
|
||||
|
||||
extern const char *sparc_target_format PARAMS ((void));
|
||||
extern const char *sparc_target_format (void);
|
||||
#define TARGET_FORMAT sparc_target_format ()
|
||||
|
||||
#define RELOC_EXPANSION_POSSIBLE
|
||||
|
@ -67,10 +67,10 @@ extern int sparc_pic_code;
|
|||
|
||||
/* We require .word, et. al., to be aligned correctly. */
|
||||
#define md_cons_align(nbytes) sparc_cons_align (nbytes)
|
||||
extern void sparc_cons_align PARAMS ((int));
|
||||
extern void sparc_cons_align (int);
|
||||
|
||||
#define HANDLE_ALIGN(fragp) sparc_handle_align (fragp)
|
||||
extern void sparc_handle_align PARAMS ((struct frag *));
|
||||
extern void sparc_handle_align (struct frag *);
|
||||
|
||||
#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 4)
|
||||
|
||||
|
@ -125,7 +125,7 @@ extern void sparc_handle_align PARAMS ((struct frag *));
|
|||
|
||||
/* Finish up the entire symtab. */
|
||||
#define tc_adjust_symtab() sparc_adjust_symtab ()
|
||||
extern void sparc_adjust_symtab PARAMS ((void));
|
||||
extern void sparc_adjust_symtab (void);
|
||||
#endif
|
||||
|
||||
#ifdef OBJ_AOUT
|
||||
|
@ -143,23 +143,23 @@ extern void sparc_adjust_symtab PARAMS ((void));
|
|||
#endif
|
||||
|
||||
#define elf_tc_final_processing sparc_elf_final_processing
|
||||
extern void sparc_elf_final_processing PARAMS ((void));
|
||||
extern void sparc_elf_final_processing (void);
|
||||
|
||||
#define md_operand(x)
|
||||
|
||||
extern void sparc_md_end PARAMS ((void));
|
||||
extern void sparc_md_end (void);
|
||||
#define md_end() sparc_md_end ()
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef OBJ_ELF
|
||||
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) sparc_cons (EXP, NBYTES)
|
||||
extern void sparc_cons PARAMS ((expressionS *, int));
|
||||
extern void sparc_cons (expressionS *, int);
|
||||
#endif
|
||||
|
||||
#define TC_CONS_FIX_NEW cons_fix_new_sparc
|
||||
extern void cons_fix_new_sparc
|
||||
PARAMS ((struct frag *, int, unsigned int, struct expressionS *));
|
||||
(struct frag *, int, unsigned int, struct expressionS *);
|
||||
|
||||
#define TC_FIX_TYPE valueT
|
||||
|
||||
|
@ -181,13 +181,13 @@ extern void cons_fix_new_sparc
|
|||
#define TARGET_USE_CFIPOP 1
|
||||
|
||||
#define tc_cfi_frame_initial_instructions sparc_cfi_frame_initial_instructions
|
||||
extern void sparc_cfi_frame_initial_instructions PARAMS ((void));
|
||||
extern void sparc_cfi_frame_initial_instructions (void);
|
||||
|
||||
#define tc_regname_to_dw2regnum sparc_regname_to_dw2regnum
|
||||
extern int sparc_regname_to_dw2regnum PARAMS ((char *regname));
|
||||
extern int sparc_regname_to_dw2regnum (char *regname);
|
||||
|
||||
#define tc_cfi_emit_pcrel_expr sparc_cfi_emit_pcrel_expr
|
||||
extern void sparc_cfi_emit_pcrel_expr PARAMS ((expressionS *, unsigned int));
|
||||
extern void sparc_cfi_emit_pcrel_expr (expressionS *, unsigned int);
|
||||
|
||||
extern int sparc_cie_data_alignment;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* spu.c -- Assembler for the IBM Synergistic Processing Unit (SPU)
|
||||
|
||||
Copyright 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -99,7 +99,7 @@ const pseudo_typeS md_pseudo_table[] =
|
|||
/* Likewise for eqv. */
|
||||
{"eqv", NULL, 0},
|
||||
{".eqv", s_set, -1},
|
||||
{"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
|
||||
{"file", (void (*) (int)) dwarf2_directive_file, 0 },
|
||||
{"loc", dwarf2_directive_loc, 0},
|
||||
{0,0,0}
|
||||
};
|
||||
|
@ -120,7 +120,8 @@ md_begin (void)
|
|||
{
|
||||
/* hash each mnemonic and record its position */
|
||||
|
||||
retval = hash_insert (op_hash, spu_opcodes[i].mnemonic, (PTR)&spu_opcodes[i]);
|
||||
retval = hash_insert (op_hash, spu_opcodes[i].mnemonic,
|
||||
(void *) &spu_opcodes[i]);
|
||||
|
||||
if (retval != NULL && strcmp (retval, "exists") != 0)
|
||||
as_fatal (_("Can't hash instruction '%s':%s"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* spu.h -- Assembler for spu
|
||||
|
||||
Copyright 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -99,7 +99,7 @@ extern symbolS *section_symbol (asection *);
|
|||
} while (0)
|
||||
|
||||
/* Fill in rs_align_code fragments. */
|
||||
extern void spu_handle_align PARAMS ((fragS *));
|
||||
extern void spu_handle_align (fragS *);
|
||||
#define HANDLE_ALIGN(frag) spu_handle_align (frag)
|
||||
|
||||
#define MAX_MEM_FOR_RS_ALIGN_CODE (7 + 8)
|
||||
|
|
|
@ -144,78 +144,17 @@ tic4x_insn_t;
|
|||
static tic4x_insn_t the_insn; /* Info about our instruction. */
|
||||
static tic4x_insn_t *insn = &the_insn;
|
||||
|
||||
static int tic4x_gen_to_words
|
||||
PARAMS ((FLONUM_TYPE, LITTLENUM_TYPE *, int ));
|
||||
static char *tic4x_atof
|
||||
PARAMS ((char *, char, LITTLENUM_TYPE * ));
|
||||
static void tic4x_insert_reg
|
||||
PARAMS ((char *, int ));
|
||||
static void tic4x_insert_sym
|
||||
PARAMS ((char *, int ));
|
||||
static char *tic4x_expression
|
||||
PARAMS ((char *, expressionS *));
|
||||
static char *tic4x_expression_abs
|
||||
PARAMS ((char *, offsetT *));
|
||||
static void tic4x_emit_char
|
||||
PARAMS ((char, int));
|
||||
static void tic4x_seg_alloc
|
||||
PARAMS ((char *, segT, int, symbolS *));
|
||||
static void tic4x_asg
|
||||
PARAMS ((int));
|
||||
static void tic4x_bss
|
||||
PARAMS ((int));
|
||||
static void tic4x_globl
|
||||
PARAMS ((int));
|
||||
static void tic4x_cons
|
||||
PARAMS ((int));
|
||||
static void tic4x_stringer
|
||||
PARAMS ((int));
|
||||
static void tic4x_eval
|
||||
PARAMS ((int));
|
||||
static void tic4x_newblock
|
||||
PARAMS ((int));
|
||||
static void tic4x_sect
|
||||
PARAMS ((int));
|
||||
static void tic4x_set
|
||||
PARAMS ((int));
|
||||
static void tic4x_usect
|
||||
PARAMS ((int));
|
||||
static void tic4x_version
|
||||
PARAMS ((int));
|
||||
static void tic4x_init_regtable
|
||||
PARAMS ((void));
|
||||
static void tic4x_init_symbols
|
||||
PARAMS ((void));
|
||||
static int tic4x_inst_insert (const tic4x_inst_t *);
|
||||
static tic4x_inst_t *tic4x_inst_make
|
||||
PARAMS ((char *, unsigned long, char *));
|
||||
static int tic4x_inst_add (const tic4x_inst_t *);
|
||||
void tic4x_end
|
||||
PARAMS ((void));
|
||||
static int tic4x_indirect_parse
|
||||
PARAMS ((tic4x_operand_t *, const tic4x_indirect_t *));
|
||||
static char *tic4x_operand_parse
|
||||
PARAMS ((char *, tic4x_operand_t *));
|
||||
static int tic4x_operands_match
|
||||
PARAMS ((tic4x_inst_t *, tic4x_insn_t *, int));
|
||||
static void tic4x_insn_check
|
||||
PARAMS ((tic4x_insn_t *));
|
||||
static void tic4x_insn_output
|
||||
PARAMS ((tic4x_insn_t *));
|
||||
static int tic4x_operands_parse
|
||||
PARAMS ((char *, tic4x_operand_t *, int ));
|
||||
void tic4x_cleanup
|
||||
PARAMS ((void));
|
||||
int tic4x_unrecognized_line
|
||||
PARAMS ((int));
|
||||
static int tic4x_pc_offset
|
||||
PARAMS ((unsigned int));
|
||||
int tic4x_do_align
|
||||
PARAMS ((int, const char *, int, int));
|
||||
void tic4x_start_line
|
||||
PARAMS ((void));
|
||||
arelent *tc_gen_reloc
|
||||
PARAMS ((asection *, fixS *));
|
||||
static void tic4x_asg (int);
|
||||
static void tic4x_bss (int);
|
||||
static void tic4x_globl (int);
|
||||
static void tic4x_cons (int);
|
||||
static void tic4x_stringer (int);
|
||||
static void tic4x_eval (int);
|
||||
static void tic4x_newblock (int);
|
||||
static void tic4x_sect (int);
|
||||
static void tic4x_set (int);
|
||||
static void tic4x_usect (int);
|
||||
static void tic4x_version (int);
|
||||
|
||||
|
||||
const pseudo_typeS
|
||||
|
@ -300,10 +239,7 @@ extern FLONUM_TYPE generic_floating_point_number;
|
|||
|
||||
/* Turn generic_floating_point_number into a real short/float/double. */
|
||||
static int
|
||||
tic4x_gen_to_words (flonum, words, precision)
|
||||
FLONUM_TYPE flonum;
|
||||
LITTLENUM_TYPE *words;
|
||||
int precision;
|
||||
tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision)
|
||||
{
|
||||
int return_value = 0;
|
||||
LITTLENUM_TYPE *p; /* Littlenum pointer. */
|
||||
|
@ -617,10 +553,7 @@ tic4x_gen_to_words (flonum, words, precision)
|
|||
|
||||
/* Returns pointer past text consumed. */
|
||||
static char *
|
||||
tic4x_atof (str, what_kind, words)
|
||||
char *str;
|
||||
char what_kind;
|
||||
LITTLENUM_TYPE *words;
|
||||
tic4x_atof (char *str, char what_kind, LITTLENUM_TYPE *words)
|
||||
{
|
||||
/* Extra bits for zeroed low-order bits. The 1st MAX_PRECISION are
|
||||
zeroed, the last contain flonum bits. */
|
||||
|
@ -693,9 +626,7 @@ tic4x_atof (str, what_kind, words)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_insert_reg (regname, regnum)
|
||||
char *regname;
|
||||
int regnum;
|
||||
tic4x_insert_reg (char *regname, int regnum)
|
||||
{
|
||||
char buf[32];
|
||||
int i;
|
||||
|
@ -711,9 +642,7 @@ tic4x_insert_reg (regname, regnum)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_insert_sym (symname, value)
|
||||
char *symname;
|
||||
int value;
|
||||
tic4x_insert_sym (char *symname, int value)
|
||||
{
|
||||
symbolS *symbolP;
|
||||
|
||||
|
@ -724,9 +653,7 @@ tic4x_insert_sym (symname, value)
|
|||
}
|
||||
|
||||
static char *
|
||||
tic4x_expression (str, exp)
|
||||
char *str;
|
||||
expressionS *exp;
|
||||
tic4x_expression (char *str, expressionS *exp)
|
||||
{
|
||||
char *s;
|
||||
char *t;
|
||||
|
@ -740,9 +667,7 @@ tic4x_expression (str, exp)
|
|||
}
|
||||
|
||||
static char *
|
||||
tic4x_expression_abs (str, value)
|
||||
char *str;
|
||||
offsetT *value;
|
||||
tic4x_expression_abs (char *str, offsetT *value)
|
||||
{
|
||||
char *s;
|
||||
char *t;
|
||||
|
@ -756,9 +681,7 @@ tic4x_expression_abs (str, value)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_emit_char (c,b)
|
||||
char c;
|
||||
int b;
|
||||
tic4x_emit_char (char c, int b)
|
||||
{
|
||||
expressionS exp;
|
||||
|
||||
|
@ -768,11 +691,10 @@ tic4x_emit_char (c,b)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_seg_alloc (name, seg, size, symbolP)
|
||||
char *name ATTRIBUTE_UNUSED;
|
||||
segT seg ATTRIBUTE_UNUSED;
|
||||
int size;
|
||||
symbolS *symbolP;
|
||||
tic4x_seg_alloc (char *name ATTRIBUTE_UNUSED,
|
||||
segT seg ATTRIBUTE_UNUSED,
|
||||
int size,
|
||||
symbolS *symbolP)
|
||||
{
|
||||
/* Note that the size is in words
|
||||
so we multiply it by 4 to get the number of bytes to allocate. */
|
||||
|
@ -794,8 +716,7 @@ tic4x_seg_alloc (name, seg, size, symbolP)
|
|||
|
||||
/* .asg ["]character-string["], symbol */
|
||||
static void
|
||||
tic4x_asg (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_asg (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char c;
|
||||
char *name;
|
||||
|
@ -823,17 +744,16 @@ tic4x_asg (x)
|
|||
strcpy (tmp, name);
|
||||
name = tmp;
|
||||
if (hash_find (tic4x_asg_hash, name))
|
||||
hash_replace (tic4x_asg_hash, name, (PTR) str);
|
||||
hash_replace (tic4x_asg_hash, name, (void *) str);
|
||||
else
|
||||
hash_insert (tic4x_asg_hash, name, (PTR) str);
|
||||
hash_insert (tic4x_asg_hash, name, (void *) str);
|
||||
*input_line_pointer = c;
|
||||
demand_empty_rest_of_line ();
|
||||
}
|
||||
|
||||
/* .bss symbol, size */
|
||||
static void
|
||||
tic4x_bss (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_bss (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char c;
|
||||
char *name;
|
||||
|
@ -887,8 +807,7 @@ tic4x_bss (x)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_globl (ignore)
|
||||
int ignore ATTRIBUTE_UNUSED;
|
||||
tic4x_globl (int ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *name;
|
||||
int c;
|
||||
|
@ -917,8 +836,7 @@ tic4x_globl (ignore)
|
|||
|
||||
/* Handle .byte, .word. .int, .long */
|
||||
static void
|
||||
tic4x_cons (bytes)
|
||||
int bytes;
|
||||
tic4x_cons (int bytes)
|
||||
{
|
||||
register unsigned int c;
|
||||
do
|
||||
|
@ -961,8 +879,7 @@ tic4x_cons (bytes)
|
|||
|
||||
/* Handle .ascii, .asciz, .string */
|
||||
static void
|
||||
tic4x_stringer (append_zero)
|
||||
int append_zero; /*ex: bytes */
|
||||
tic4x_stringer (int append_zero)
|
||||
{
|
||||
int bytes;
|
||||
register unsigned int c;
|
||||
|
@ -1015,8 +932,7 @@ tic4x_stringer (append_zero)
|
|||
|
||||
/* .eval expression, symbol */
|
||||
static void
|
||||
tic4x_eval (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_eval (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char c;
|
||||
offsetT value;
|
||||
|
@ -1038,8 +954,7 @@ tic4x_eval (x)
|
|||
|
||||
/* Reset local labels. */
|
||||
static void
|
||||
tic4x_newblock (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_newblock (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
dollar_label_clear ();
|
||||
}
|
||||
|
@ -1047,8 +962,7 @@ tic4x_newblock (x)
|
|||
/* .sect "section-name" [, value] */
|
||||
/* .sect ["]section-name[:subsection-name]["] [, value] */
|
||||
static void
|
||||
tic4x_sect (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_sect (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char c;
|
||||
char *section_name;
|
||||
|
@ -1121,8 +1035,7 @@ tic4x_sect (x)
|
|||
|
||||
/* symbol[:] .set value or .set symbol, value */
|
||||
static void
|
||||
tic4x_set (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_set (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
symbolS *symbolP;
|
||||
|
||||
|
@ -1152,8 +1065,7 @@ tic4x_set (x)
|
|||
|
||||
/* [symbol] .usect ["]section-name["], size-in-words [, alignment-flag] */
|
||||
static void
|
||||
tic4x_usect (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_usect (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char c;
|
||||
char *name;
|
||||
|
@ -1219,8 +1131,7 @@ tic4x_usect (x)
|
|||
|
||||
/* .version cpu-version. */
|
||||
static void
|
||||
tic4x_version (x)
|
||||
int x ATTRIBUTE_UNUSED;
|
||||
tic4x_version (int x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
offsetT temp;
|
||||
|
||||
|
@ -1237,7 +1148,7 @@ tic4x_version (x)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_init_regtable ()
|
||||
tic4x_init_regtable (void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1255,7 +1166,7 @@ tic4x_init_regtable ()
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_init_symbols ()
|
||||
tic4x_init_symbols (void)
|
||||
{
|
||||
/* The TI tools accept case insensitive versions of these symbols,
|
||||
we don't !
|
||||
|
@ -1321,7 +1232,7 @@ tic4x_inst_insert (const tic4x_inst_t *inst)
|
|||
if (!strcmp (inst->name, prev_name) || inst->name[0] == '\0')
|
||||
return 1;
|
||||
|
||||
retval = hash_insert (tic4x_op_hash, inst->name, (PTR) inst);
|
||||
retval = hash_insert (tic4x_op_hash, inst->name, (void *) inst);
|
||||
if (retval != NULL)
|
||||
fprintf (stderr, "internal error: can't hash `%s': %s\n",
|
||||
inst->name, retval);
|
||||
|
@ -1332,10 +1243,7 @@ tic4x_inst_insert (const tic4x_inst_t *inst)
|
|||
|
||||
/* Make a new instruction template. */
|
||||
static tic4x_inst_t *
|
||||
tic4x_inst_make (name, opcode, args)
|
||||
char *name;
|
||||
unsigned long opcode;
|
||||
char *args;
|
||||
tic4x_inst_make (char *name, unsigned long opcode, char *args)
|
||||
{
|
||||
static tic4x_inst_t *insts = NULL;
|
||||
static char *names = NULL;
|
||||
|
@ -1436,7 +1344,7 @@ tic4x_inst_add (const tic4x_inst_t *insts)
|
|||
set up all the tables, etc., that the MD part of the assembler will
|
||||
need. */
|
||||
void
|
||||
md_begin ()
|
||||
md_begin (void)
|
||||
{
|
||||
int ok = 1;
|
||||
unsigned int i;
|
||||
|
@ -1493,16 +1401,15 @@ md_begin ()
|
|||
}
|
||||
|
||||
void
|
||||
tic4x_end ()
|
||||
tic4x_end (void)
|
||||
{
|
||||
bfd_set_arch_mach (stdoutput, bfd_arch_tic4x,
|
||||
IS_CPU_TIC4X (tic4x_cpu) ? bfd_mach_tic4x : bfd_mach_tic3x);
|
||||
}
|
||||
|
||||
static int
|
||||
tic4x_indirect_parse (operand, indirect)
|
||||
tic4x_operand_t *operand;
|
||||
const tic4x_indirect_t *indirect;
|
||||
tic4x_indirect_parse (tic4x_operand_t *operand,
|
||||
const tic4x_indirect_t *indirect)
|
||||
{
|
||||
char *n = indirect->name;
|
||||
char *s = input_line_pointer;
|
||||
|
@ -1600,9 +1507,7 @@ tic4x_indirect_parse (operand, indirect)
|
|||
}
|
||||
|
||||
static char *
|
||||
tic4x_operand_parse (s, operand)
|
||||
char *s;
|
||||
tic4x_operand_t *operand;
|
||||
tic4x_operand_parse (char *s, tic4x_operand_t *operand)
|
||||
{
|
||||
unsigned int i;
|
||||
char c;
|
||||
|
@ -1766,10 +1671,7 @@ tic4x_operand_parse (s, operand)
|
|||
}
|
||||
|
||||
static int
|
||||
tic4x_operands_match (inst, insn, check)
|
||||
tic4x_inst_t *inst;
|
||||
tic4x_insn_t *insn;
|
||||
int check;
|
||||
tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *insn, int check)
|
||||
{
|
||||
const char *args = inst->args;
|
||||
unsigned long opcode = inst->opcode;
|
||||
|
@ -2440,8 +2342,7 @@ tic4x_operands_match (inst, insn, check)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_insn_check (insn)
|
||||
tic4x_insn_t *insn;
|
||||
tic4x_insn_check (tic4x_insn_t *insn)
|
||||
{
|
||||
|
||||
if (!strcmp(insn->name, "lda"))
|
||||
|
@ -2472,8 +2373,7 @@ tic4x_insn_check (insn)
|
|||
}
|
||||
|
||||
static void
|
||||
tic4x_insn_output (insn)
|
||||
tic4x_insn_t *insn;
|
||||
tic4x_insn_output (tic4x_insn_t *insn)
|
||||
{
|
||||
char *dst;
|
||||
|
||||
|
@ -2498,10 +2398,7 @@ tic4x_insn_output (insn)
|
|||
|
||||
/* Parse the operands. */
|
||||
int
|
||||
tic4x_operands_parse (s, operands, num_operands)
|
||||
char *s;
|
||||
tic4x_operand_t *operands;
|
||||
int num_operands;
|
||||
tic4x_operands_parse (char *s, tic4x_operand_t *operands, int num_operands)
|
||||
{
|
||||
if (!*s)
|
||||
return num_operands;
|
||||
|
@ -2522,8 +2419,7 @@ tic4x_operands_parse (s, operands, num_operands)
|
|||
by the generic front end. We just parse mnemonic and operands, and
|
||||
produce the bytes of data and relocation. */
|
||||
void
|
||||
md_assemble (str)
|
||||
char *str;
|
||||
md_assemble (char *str)
|
||||
{
|
||||
int ok = 0;
|
||||
char *s;
|
||||
|
@ -2648,7 +2544,7 @@ md_assemble (str)
|
|||
}
|
||||
|
||||
void
|
||||
tic4x_cleanup ()
|
||||
tic4x_cleanup (void)
|
||||
{
|
||||
if (insn->in_use)
|
||||
md_assemble (NULL);
|
||||
|
@ -2733,10 +2629,7 @@ md_atof (int type, char *litP, int *sizeP)
|
|||
}
|
||||
|
||||
void
|
||||
md_apply_fix (fixP, value, seg)
|
||||
fixS *fixP;
|
||||
valueT *value;
|
||||
segT seg ATTRIBUTE_UNUSED;
|
||||
md_apply_fix (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
|
||||
valueT val = *value;
|
||||
|
@ -2780,43 +2673,39 @@ md_apply_fix (fixP, value, seg)
|
|||
|
||||
/* Should never be called for tic4x. */
|
||||
void
|
||||
md_convert_frag (headers, sec, fragP)
|
||||
bfd *headers ATTRIBUTE_UNUSED;
|
||||
segT sec ATTRIBUTE_UNUSED;
|
||||
fragS *fragP ATTRIBUTE_UNUSED;
|
||||
md_convert_frag (bfd *headers ATTRIBUTE_UNUSED,
|
||||
segT sec ATTRIBUTE_UNUSED,
|
||||
fragS *fragP ATTRIBUTE_UNUSED)
|
||||
{
|
||||
as_fatal ("md_convert_frag");
|
||||
}
|
||||
|
||||
/* Should never be called for tic4x. */
|
||||
void
|
||||
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
||||
char *ptr ATTRIBUTE_UNUSED;
|
||||
addressT from_addr ATTRIBUTE_UNUSED;
|
||||
addressT to_addr ATTRIBUTE_UNUSED;
|
||||
fragS *frag ATTRIBUTE_UNUSED;
|
||||
symbolS *to_symbol ATTRIBUTE_UNUSED;
|
||||
md_create_short_jump (char *ptr ATTRIBUTE_UNUSED,
|
||||
addressT from_addr ATTRIBUTE_UNUSED,
|
||||
addressT to_addr ATTRIBUTE_UNUSED,
|
||||
fragS *frag ATTRIBUTE_UNUSED,
|
||||
symbolS *to_symbol ATTRIBUTE_UNUSED)
|
||||
{
|
||||
as_fatal ("md_create_short_jmp\n");
|
||||
}
|
||||
|
||||
/* Should never be called for tic4x. */
|
||||
void
|
||||
md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
||||
char *ptr ATTRIBUTE_UNUSED;
|
||||
addressT from_addr ATTRIBUTE_UNUSED;
|
||||
addressT to_addr ATTRIBUTE_UNUSED;
|
||||
fragS *frag ATTRIBUTE_UNUSED;
|
||||
symbolS *to_symbol ATTRIBUTE_UNUSED;
|
||||
md_create_long_jump (char *ptr ATTRIBUTE_UNUSED,
|
||||
addressT from_addr ATTRIBUTE_UNUSED,
|
||||
addressT to_addr ATTRIBUTE_UNUSED,
|
||||
fragS *frag ATTRIBUTE_UNUSED,
|
||||
symbolS *to_symbol ATTRIBUTE_UNUSED)
|
||||
{
|
||||
as_fatal ("md_create_long_jump\n");
|
||||
}
|
||||
|
||||
/* Should never be called for tic4x. */
|
||||
int
|
||||
md_estimate_size_before_relax (fragP, segtype)
|
||||
register fragS *fragP ATTRIBUTE_UNUSED;
|
||||
segT segtype ATTRIBUTE_UNUSED;
|
||||
md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED,
|
||||
segT segtype ATTRIBUTE_UNUSED)
|
||||
{
|
||||
as_fatal ("md_estimate_size_before_relax\n");
|
||||
return 0;
|
||||
|
@ -2824,9 +2713,7 @@ md_estimate_size_before_relax (fragP, segtype)
|
|||
|
||||
|
||||
int
|
||||
md_parse_option (c, arg)
|
||||
int c;
|
||||
char *arg;
|
||||
md_parse_option (int c, char *arg)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
|
@ -2886,8 +2773,7 @@ md_parse_option (c, arg)
|
|||
}
|
||||
|
||||
void
|
||||
md_show_usage (stream)
|
||||
FILE *stream;
|
||||
md_show_usage (FILE *stream)
|
||||
{
|
||||
fprintf (stream,
|
||||
_("\nTIC4X options:\n"
|
||||
|
@ -2915,8 +2801,7 @@ md_show_usage (stream)
|
|||
definitions of TI C3x tools style local labels $n where n is a single
|
||||
decimal digit. */
|
||||
int
|
||||
tic4x_unrecognized_line (c)
|
||||
int c;
|
||||
tic4x_unrecognized_line (int c)
|
||||
{
|
||||
int lab;
|
||||
char *s;
|
||||
|
@ -2949,8 +2834,7 @@ tic4x_unrecognized_line (c)
|
|||
|
||||
/* Handle local labels peculiar to us referred to in an expression. */
|
||||
symbolS *
|
||||
md_undefined_symbol (name)
|
||||
char *name;
|
||||
md_undefined_symbol (char *name)
|
||||
{
|
||||
/* Look for local labels of the form $n. */
|
||||
if (name[0] == '$' && ISDIGIT (name[1]))
|
||||
|
@ -2982,23 +2866,19 @@ md_undefined_symbol (name)
|
|||
|
||||
/* Parse an operand that is machine-specific. */
|
||||
void
|
||||
md_operand (expressionP)
|
||||
expressionS *expressionP ATTRIBUTE_UNUSED;
|
||||
md_operand (expressionS *expressionP ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
/* Round up a section size to the appropriate boundary---do we need this? */
|
||||
valueT
|
||||
md_section_align (segment, size)
|
||||
segT segment ATTRIBUTE_UNUSED;
|
||||
valueT size;
|
||||
md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size)
|
||||
{
|
||||
return size; /* Byte (i.e., 32-bit) alignment is fine? */
|
||||
}
|
||||
|
||||
static int
|
||||
tic4x_pc_offset (op)
|
||||
unsigned int op;
|
||||
tic4x_pc_offset (unsigned int op)
|
||||
{
|
||||
/* Determine the PC offset for a C[34]x instruction.
|
||||
This could be simplified using some boolean algebra
|
||||
|
@ -3060,8 +2940,7 @@ tic4x_pc_offset (op)
|
|||
DBcondD, BcondD disp + PC + 3 => PC
|
||||
*/
|
||||
long
|
||||
md_pcrel_from (fixP)
|
||||
fixS *fixP;
|
||||
md_pcrel_from (fixS *fixP)
|
||||
{
|
||||
unsigned char *buf;
|
||||
unsigned int op;
|
||||
|
@ -3076,11 +2955,10 @@ md_pcrel_from (fixP)
|
|||
/* Fill the alignment area with NOP's on .text, unless fill-data
|
||||
was specified. */
|
||||
int
|
||||
tic4x_do_align (alignment, fill, len, max)
|
||||
int alignment ATTRIBUTE_UNUSED;
|
||||
const char *fill ATTRIBUTE_UNUSED;
|
||||
int len ATTRIBUTE_UNUSED;
|
||||
int max ATTRIBUTE_UNUSED;
|
||||
tic4x_do_align (int alignment ATTRIBUTE_UNUSED,
|
||||
const char *fill ATTRIBUTE_UNUSED,
|
||||
int len ATTRIBUTE_UNUSED,
|
||||
int max ATTRIBUTE_UNUSED)
|
||||
{
|
||||
unsigned long nop = TIC_NOP_OPCODE;
|
||||
|
||||
|
@ -3109,7 +2987,7 @@ tic4x_do_align (alignment, fill, len, max)
|
|||
|
||||
/* Look for and remove parallel instruction operator ||. */
|
||||
void
|
||||
tic4x_start_line ()
|
||||
tic4x_start_line (void)
|
||||
{
|
||||
char *s = input_line_pointer;
|
||||
|
||||
|
@ -3137,9 +3015,7 @@ tic4x_start_line ()
|
|||
}
|
||||
|
||||
arelent *
|
||||
tc_gen_reloc (seg, fixP)
|
||||
asection *seg ATTRIBUTE_UNUSED;
|
||||
fixS *fixP;
|
||||
tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixP)
|
||||
{
|
||||
arelent *reloc;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-tic4x.h -- Assemble for the Texas TMS320C[34]X.
|
||||
Copyright (C) 1997, 2002, 2003, 2005, 2007
|
||||
Copyright (C) 1997, 2002, 2003, 2005, 2007, 2008
|
||||
Free Software Foundation. Inc.
|
||||
|
||||
Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
|
||||
|
@ -74,21 +74,21 @@
|
|||
/* Accept numbers with a suffix, e.g. 0ffffh, 1010b. */
|
||||
#define NUMBERS_WITH_SUFFIX 1
|
||||
|
||||
extern int tic4x_unrecognized_line PARAMS ((int));
|
||||
extern int tic4x_unrecognized_line (int);
|
||||
#define tc_unrecognized_line(c) tic4x_unrecognized_line (c)
|
||||
|
||||
#define md_number_to_chars number_to_chars_littleendian
|
||||
|
||||
extern int tic4x_do_align PARAMS ((int, const char *, int, int));
|
||||
extern int tic4x_do_align (int, const char *, int, int);
|
||||
#define md_do_align(n,fill,len,max,label) if( tic4x_do_align (n,fill,len,max) ) goto label;
|
||||
|
||||
/* Start of line hook to remove parallel instruction operator || */
|
||||
extern void tic4x_start_line PARAMS ((void));
|
||||
extern void tic4x_start_line (void);
|
||||
#define md_start_line_hook() tic4x_start_line()
|
||||
|
||||
extern void tic4x_cleanup PARAMS ((void));
|
||||
extern void tic4x_cleanup (void);
|
||||
#define md_cleanup() tic4x_cleanup()
|
||||
|
||||
extern void tic4x_end PARAMS ((void));
|
||||
extern void tic4x_end (void);
|
||||
#define md_end() tic4x_end()
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/* tc-tic54x.h -- Header file for tc-tic54x.c
|
||||
Copyright 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
|
||||
Contributed by Timothy Wall (twall@alum.mit.edu)
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -66,11 +66,11 @@ struct bit_info
|
|||
|
||||
/* tell GAS whether the given token is indeed a code label */
|
||||
#define TC_START_LABEL_WITHOUT_COLON(c,ptr) tic54x_start_label(c,ptr)
|
||||
extern int tic54x_start_label PARAMS((int, char *));
|
||||
extern int tic54x_start_label (int, char *);
|
||||
|
||||
/* custom handling for relocations in cons expressions */
|
||||
#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) tic54x_cons_fix_new(FRAG,OFF,LEN,EXP)
|
||||
extern void tic54x_cons_fix_new PARAMS((fragS *,int,int,expressionS *));
|
||||
extern void tic54x_cons_fix_new (fragS *,int,int,expressionS *);
|
||||
|
||||
/* Define md_number_to_chars as the appropriate standard big endian or
|
||||
little endian function. Mostly littleendian, but longwords and floats are
|
||||
|
@ -93,9 +93,9 @@ extern void tic54x_macro_start (void);
|
|||
extern void tic54x_macro_end (void);
|
||||
#define md_macro_info(args) tic54x_macro_info(args)
|
||||
struct macro_struct;
|
||||
extern void tic54x_macro_info PARAMS((const struct macro_struct *));
|
||||
extern void tic54x_macro_info (const struct macro_struct *);
|
||||
#define tc_frob_label(sym) tic54x_define_label (sym)
|
||||
extern void tic54x_define_label PARAMS((symbolS *));
|
||||
extern void tic54x_define_label (symbolS *);
|
||||
|
||||
#define md_start_line_hook() tic54x_start_line_hook()
|
||||
extern void tic54x_start_line_hook (void);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-vax.c - vax-specific -
|
||||
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007
|
||||
2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -959,11 +959,11 @@ vip_begin (int synthetic_too, /* 1 means include jXXX op-codes. */
|
|||
op_hash = hash_new ();
|
||||
|
||||
for (vP = votstrs; *vP->vot_name && !retval; vP++)
|
||||
retval = hash_insert (op_hash, vP->vot_name, (PTR) &vP->vot_detail);
|
||||
retval = hash_insert (op_hash, vP->vot_name, (void *) &vP->vot_detail);
|
||||
|
||||
if (synthetic_too)
|
||||
for (vP = synthetic_votstrs; *vP->vot_name && !retval; vP++)
|
||||
retval = hash_insert (op_hash, vP->vot_name, (PTR) &vP->vot_detail);
|
||||
retval = hash_insert (op_hash, vP->vot_name, (void *) &vP->vot_detail);
|
||||
|
||||
#ifndef CONST_TABLE
|
||||
vip_op_defaults (immediate, indirect, displen);
|
||||
|
|
|
@ -1921,23 +1921,23 @@ Creates the hash table control structure.
|
|||
Destroy a hash table.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun @{@} PTR hash_delete (struct hash_control *, const char *, int)
|
||||
@deftypefun @{@} void *hash_delete (struct hash_control *, const char *, int)
|
||||
Deletes entry from the hash table, returns the value it had. If the last
|
||||
arg is non-zero, free memory allocated for this entry and all entries
|
||||
allocated more recently than this entry.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun @{@} PTR hash_replace (struct hash_control *, const char *, PTR)
|
||||
@deftypefun @{@} void *hash_replace (struct hash_control *, const char *, void *)
|
||||
Updates the value for an entry already in the table, returning the old value.
|
||||
If no entry was found, just returns NULL.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun @{@} @{const char *@} hash_insert (struct hash_control *, const char *, PTR)
|
||||
@deftypefun @{@} @{const char *@} hash_insert (struct hash_control *, const char *, void *)
|
||||
Inserting a value already in the table is an error.
|
||||
Returns an error message or NULL.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun @{@} @{const char *@} hash_jam (struct hash_control *, const char *, PTR)
|
||||
@deftypefun @{@} @{const char *@} hash_jam (struct hash_control *, const char *, void *)
|
||||
Inserts if the value isn't already present, updates it if it is.
|
||||
@end deftypefun
|
||||
|
||||
|
|
10
gas/ecoff.c
10
gas/ecoff.c
|
@ -1,6 +1,6 @@
|
|||
/* ECOFF debugging support.
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007
|
||||
2003, 2004, 2005, 2006, 2007, 2008
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
|
||||
|
@ -3890,7 +3890,7 @@ ecoff_build_symbols (const struct ecoff_debug_swap *backend,
|
|||
unsigned long offset)
|
||||
{
|
||||
const bfd_size_type external_sym_size = backend->external_sym_size;
|
||||
void (* const swap_sym_out) (bfd *, const SYMR *, PTR)
|
||||
void (* const swap_sym_out) (bfd *, const SYMR *, void *)
|
||||
= backend->swap_sym_out;
|
||||
char *sym_out;
|
||||
long isym;
|
||||
|
@ -4255,7 +4255,7 @@ ecoff_build_procs (const struct ecoff_debug_swap *backend,
|
|||
unsigned long offset)
|
||||
{
|
||||
const bfd_size_type external_pdr_size = backend->external_pdr_size;
|
||||
void (* const swap_pdr_out) (bfd *, const PDR *, PTR)
|
||||
void (* const swap_pdr_out) (bfd *, const PDR *, void *)
|
||||
= backend->swap_pdr_out;
|
||||
char *pdr_out;
|
||||
long iproc;
|
||||
|
@ -4540,7 +4540,7 @@ ecoff_build_fdr (const struct ecoff_debug_swap *backend,
|
|||
unsigned long offset)
|
||||
{
|
||||
const bfd_size_type external_fdr_size = backend->external_fdr_size;
|
||||
void (* const swap_fdr_out) (bfd *, const FDR *, PTR)
|
||||
void (* const swap_fdr_out) (bfd *, const FDR *, void *)
|
||||
= backend->swap_fdr_out;
|
||||
long ifile;
|
||||
char *fdr_out;
|
||||
|
@ -4876,7 +4876,7 @@ free_scope (scope_t *ptr)
|
|||
ptr->free = alloc_counts[(int) alloc_type_scope].free_list.f_scope;
|
||||
alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr;
|
||||
#else
|
||||
free ((PTR) ptr);
|
||||
free ((void *) ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ hash_jam (struct hash_control *table, const char *key, void *value)
|
|||
value stored for the entry. If the entry is not found in the hash
|
||||
table, this does nothing and returns NULL. */
|
||||
|
||||
PTR
|
||||
void *
|
||||
hash_replace (struct hash_control *table, const char *key, void *value)
|
||||
{
|
||||
struct hash_entry *p;
|
||||
|
@ -314,7 +314,7 @@ hash_replace (struct hash_control *table, const char *key, void *value)
|
|||
/* Find an entry in a hash table, returning its value. Returns NULL
|
||||
if the entry is not found. */
|
||||
|
||||
PTR
|
||||
void *
|
||||
hash_find (struct hash_control *table, const char *key)
|
||||
{
|
||||
struct hash_entry *p;
|
||||
|
@ -329,7 +329,7 @@ hash_find (struct hash_control *table, const char *key)
|
|||
/* As hash_find, but KEY is of length LEN and is not guaranteed to be
|
||||
NUL-terminated. */
|
||||
|
||||
PTR
|
||||
void *
|
||||
hash_find_n (struct hash_control *table, const char *key, size_t len)
|
||||
{
|
||||
struct hash_entry *p;
|
||||
|
@ -344,7 +344,7 @@ hash_find_n (struct hash_control *table, const char *key, size_t len)
|
|||
/* Delete an entry from a hash table. This returns the value stored
|
||||
for that entry, or NULL if there is no such entry. */
|
||||
|
||||
PTR
|
||||
void *
|
||||
hash_delete (struct hash_control *table, const char *key, int freeme)
|
||||
{
|
||||
struct hash_entry *p;
|
||||
|
|
|
@ -676,7 +676,7 @@ define_macro (int idx, sb *in, sb *label,
|
|||
if (hash_find (macro_hash, macro->name))
|
||||
error = _("Macro `%s' was already defined");
|
||||
if (!error)
|
||||
error = hash_jam (macro_hash, macro->name, (PTR) macro);
|
||||
error = hash_jam (macro_hash, macro->name, (void *) macro);
|
||||
|
||||
if (namep != NULL)
|
||||
*namep = macro->name;
|
||||
|
|
|
@ -204,7 +204,7 @@ local_symbol_make (const char *name, segT section, valueT value, fragS *frag)
|
|||
local_symbol_set_frag (ret, frag);
|
||||
ret->lsy_value = value;
|
||||
|
||||
hash_jam (local_hash, name_copy, (PTR) ret);
|
||||
hash_jam (local_hash, name_copy, (void *) ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -489,14 +489,14 @@ symbol_table_insert (symbolS *symbolP)
|
|||
if (LOCAL_SYMBOL_CHECK (symbolP))
|
||||
{
|
||||
error_string = hash_jam (local_hash, S_GET_NAME (symbolP),
|
||||
(PTR) symbolP);
|
||||
(void *) symbolP);
|
||||
if (error_string != NULL)
|
||||
as_fatal (_("inserting \"%s\" into symbol table failed: %s"),
|
||||
S_GET_NAME (symbolP), error_string);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((error_string = hash_jam (sy_hash, S_GET_NAME (symbolP), (PTR) symbolP)))
|
||||
if ((error_string = hash_jam (sy_hash, S_GET_NAME (symbolP), (void *) symbolP)))
|
||||
{
|
||||
as_fatal (_("inserting \"%s\" into symbol table failed: %s"),
|
||||
S_GET_NAME (symbolP), error_string);
|
||||
|
@ -1438,12 +1438,12 @@ exit_dont_set_value:
|
|||
return final_val;
|
||||
}
|
||||
|
||||
static void resolve_local_symbol (const char *, PTR);
|
||||
static void resolve_local_symbol (const char *, void *);
|
||||
|
||||
/* A static function passed to hash_traverse. */
|
||||
|
||||
static void
|
||||
resolve_local_symbol (const char *key ATTRIBUTE_UNUSED, PTR value)
|
||||
resolve_local_symbol (const char *key ATTRIBUTE_UNUSED, void *value)
|
||||
{
|
||||
if (value != NULL)
|
||||
resolve_symbol_value (value);
|
||||
|
|
Loading…
Add table
Reference in a new issue