Delete unnecessary forward declarations.
+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.
#ifdef HAVE_SBRK
#ifdef NEED_DECLARATION_SBRK
-extern PTR sbrk ();
+extern void *sbrk ();
#endif
#endif
/* 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.
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 ();
/* 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.
#include "as.h"
-static void s_evax_weak PARAMS ((int));
+static void s_evax_weak (int);
const pseudo_typeS obj_pseudo_table[] =
{
/* 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.
/* 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;
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
/* 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.
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,
/* @@@ 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)
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;
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 ();
/* 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.
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;
/* 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.
#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
#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
#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
/* 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.
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,
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,
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,
/* 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.
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[] =
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)
{
\f
void
-md_begin ()
+md_begin (void)
{
/* Initialize the `cgen' interface. */
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;
/* 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;
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;
}
}
-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;
/* 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;
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;
}
void
-frv_tomcat_workaround ()
+frv_tomcat_workaround (void)
{
if (frv_mach != bfd_mach_frvtomcat)
return;
}
void
-md_assemble (str)
- char * str;
+md_assemble (char *str)
{
frv_insn insn;
char *errmsg;
We just ignore it. */
void
-md_operand (expressionP)
- expressionS * expressionP;
+md_operand (expressionS *expressionP)
{
if (* input_line_pointer == '#')
{
}
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;
}
};
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;
}
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)
{
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)
{
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
*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)
{
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
/* 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)
/* 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;
/* 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;
BFD_RELOC_32 at that time. */
void
-frv_pic_ptr (nbytes)
- int nbytes;
+frv_pic_ptr (int nbytes)
{
expressionS exp;
char *p;
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;
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;
}
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);
/* 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.
/* 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
#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
/* 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,
/* 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.
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
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"),
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,
/* 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>.
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"),
/* 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.
/* 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) \
}
#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
#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
/* This is the default endianness. */
static int default_big_endian = TARGET_BYTES_BIG_ENDIAN;
-void (*ia64_number_to_chars) PARAMS ((char *, valueT, int));
+void (*ia64_number_to_chars) (char *, valueT, int);
-static void ia64_float_to_chars_bigendian
- PARAMS ((char *, LITTLENUM_TYPE *, int));
-static void ia64_float_to_chars_littleendian
- PARAMS ((char *, LITTLENUM_TYPE *, int));
-static void (*ia64_float_to_chars)
- PARAMS ((char *, LITTLENUM_TYPE *, int));
+static void ia64_float_to_chars_bigendian (char *, LITTLENUM_TYPE *, int);
+static void ia64_float_to_chars_littleendian (char *, LITTLENUM_TYPE *, int);
+
+static void (*ia64_float_to_chars) (char *, LITTLENUM_TYPE *, int);
static struct hash_control *alias_hash;
static struct hash_control *alias_name_hash;
#define ENCODED_PSP_OFFSET(OFFSET) (((OFFSET) + 16) / 4)
-typedef void (*vbyte_func) PARAMS ((int, char *, char *));
+typedef void (*vbyte_func) (int, char *, char *);
/* Forward declarations: */
-static void set_section PARAMS ((char *name));
-static unsigned int set_regstack PARAMS ((unsigned int, unsigned int,
- unsigned int, unsigned int));
-static void dot_align (int);
-static void dot_radix PARAMS ((int));
-static void dot_special_section PARAMS ((int));
-static void dot_proc PARAMS ((int));
-static void dot_fframe PARAMS ((int));
-static void dot_vframe PARAMS ((int));
-static void dot_vframesp PARAMS ((int));
-static void dot_save PARAMS ((int));
-static void dot_restore PARAMS ((int));
-static void dot_restorereg PARAMS ((int));
-static void dot_handlerdata PARAMS ((int));
-static void dot_unwentry PARAMS ((int));
-static void dot_altrp PARAMS ((int));
-static void dot_savemem PARAMS ((int));
-static void dot_saveg PARAMS ((int));
-static void dot_savef PARAMS ((int));
-static void dot_saveb PARAMS ((int));
-static void dot_savegf PARAMS ((int));
-static void dot_spill PARAMS ((int));
-static void dot_spillreg PARAMS ((int));
-static void dot_spillmem PARAMS ((int));
-static void dot_label_state PARAMS ((int));
-static void dot_copy_state PARAMS ((int));
-static void dot_unwabi PARAMS ((int));
-static void dot_personality PARAMS ((int));
-static void dot_body PARAMS ((int));
-static void dot_prologue PARAMS ((int));
-static void dot_endp PARAMS ((int));
-static void dot_template PARAMS ((int));
-static void dot_regstk PARAMS ((int));
-static void dot_rot PARAMS ((int));
-static void dot_byteorder PARAMS ((int));
-static void dot_psr PARAMS ((int));
-static void dot_alias PARAMS ((int));
-static void dot_ln PARAMS ((int));
-static void cross_section PARAMS ((int ref, void (*cons) PARAMS((int)), int ua));
-static void dot_xdata PARAMS ((int));
-static void stmt_float_cons PARAMS ((int));
-static void stmt_cons_ua PARAMS ((int));
-static void dot_xfloat_cons PARAMS ((int));
-static void dot_xstringer PARAMS ((int));
-static void dot_xdata_ua PARAMS ((int));
-static void dot_xfloat_cons_ua PARAMS ((int));
-static void print_prmask PARAMS ((valueT mask));
-static void dot_pred_rel PARAMS ((int));
-static void dot_reg_val PARAMS ((int));
-static void dot_serialize PARAMS ((int));
-static void dot_dv_mode PARAMS ((int));
-static void dot_entry PARAMS ((int));
-static void dot_mem_offset PARAMS ((int));
-static void add_unwind_entry PARAMS((unw_rec_list *, int));
-static symbolS *declare_register PARAMS ((const char *name, unsigned int regnum));
-static void declare_register_set PARAMS ((const char *, unsigned int, unsigned int));
-static unsigned int operand_width PARAMS ((enum ia64_opnd));
-static enum operand_match_result operand_match PARAMS ((const struct ia64_opcode *idesc,
- int index,
- expressionS *e));
-static int parse_operand PARAMS ((expressionS *, int));
-static struct ia64_opcode * parse_operands PARAMS ((struct ia64_opcode *));
-static void build_insn PARAMS ((struct slot *, bfd_vma *));
-static void emit_one_bundle PARAMS ((void));
-static void fix_insn PARAMS ((fixS *, const struct ia64_operand *, valueT));
-static bfd_reloc_code_real_type ia64_gen_real_reloc_type PARAMS ((struct symbol *sym,
- bfd_reloc_code_real_type r_type));
-static void insn_group_break PARAMS ((int, int, int));
-static void mark_resource PARAMS ((struct ia64_opcode *, const struct ia64_dependency *,
- struct rsrc *, int depind, int path));
-static void add_qp_mutex PARAMS((valueT mask));
-static void add_qp_imply PARAMS((int p1, int p2));
-static void clear_qp_branch_flag PARAMS((valueT mask));
-static void clear_qp_mutex PARAMS((valueT mask));
-static void clear_qp_implies PARAMS((valueT p1_mask, valueT p2_mask));
-static int has_suffix_p PARAMS((const char *, const char *));
-static void clear_register_values PARAMS ((void));
-static void print_dependency PARAMS ((const char *action, int depind));
-static void instruction_serialization PARAMS ((void));
-static void data_serialization PARAMS ((void));
-static void remove_marked_resource PARAMS ((struct rsrc *));
-static int is_conditional_branch PARAMS ((struct ia64_opcode *));
-static int is_taken_branch PARAMS ((struct ia64_opcode *));
-static int is_interruption_or_rfi PARAMS ((struct ia64_opcode *));
-static int depends_on PARAMS ((int, struct ia64_opcode *));
-static int specify_resource PARAMS ((const struct ia64_dependency *,
- struct ia64_opcode *, int, struct rsrc [], int, int));
-static int check_dv PARAMS((struct ia64_opcode *idesc));
-static void check_dependencies PARAMS((struct ia64_opcode *));
-static void mark_resources PARAMS((struct ia64_opcode *));
-static void update_dependencies PARAMS((struct ia64_opcode *));
-static void note_register_values PARAMS((struct ia64_opcode *));
-static int qp_mutex PARAMS ((int, int, int));
-static int resources_match PARAMS ((struct rsrc *, struct ia64_opcode *, int, int, int));
-static void output_vbyte_mem PARAMS ((int, char *, char *));
-static void count_output PARAMS ((int, char *, char *));
-static void output_R1_format PARAMS ((vbyte_func, unw_record_type, int));
-static void output_R2_format PARAMS ((vbyte_func, int, int, unsigned long));
-static void output_R3_format PARAMS ((vbyte_func, unw_record_type, unsigned long));
-static void output_P1_format PARAMS ((vbyte_func, int));
-static void output_P2_format PARAMS ((vbyte_func, int, int));
-static void output_P3_format PARAMS ((vbyte_func, unw_record_type, int));
-static void output_P4_format PARAMS ((vbyte_func, unsigned char *, unsigned long));
-static void output_P5_format PARAMS ((vbyte_func, int, unsigned long));
-static void output_P6_format PARAMS ((vbyte_func, unw_record_type, int));
-static void output_P7_format PARAMS ((vbyte_func, unw_record_type, unsigned long, unsigned long));
-static void output_P8_format PARAMS ((vbyte_func, unw_record_type, unsigned long));
-static void output_P9_format PARAMS ((vbyte_func, int, int));
-static void output_P10_format PARAMS ((vbyte_func, int, int));
-static void output_B1_format PARAMS ((vbyte_func, unw_record_type, unsigned long));
-static void output_B2_format PARAMS ((vbyte_func, unsigned long, unsigned long));
-static void output_B3_format PARAMS ((vbyte_func, unsigned long, unsigned long));
-static void output_B4_format PARAMS ((vbyte_func, unw_record_type, unsigned long));
-static char format_ab_reg PARAMS ((int, int));
-static void output_X1_format PARAMS ((vbyte_func, unw_record_type, int, int, unsigned long,
- unsigned long));
-static void output_X2_format PARAMS ((vbyte_func, int, int, int, int, int, unsigned long));
-static void output_X3_format PARAMS ((vbyte_func, unw_record_type, int, int, int, unsigned long,
- unsigned long));
-static void output_X4_format PARAMS ((vbyte_func, int, int, int, int, int, int, unsigned long));
-static unw_rec_list *output_endp PARAMS ((void));
-static unw_rec_list *output_prologue PARAMS ((void));
-static unw_rec_list *output_prologue_gr PARAMS ((unsigned int, unsigned int));
-static unw_rec_list *output_body PARAMS ((void));
-static unw_rec_list *output_mem_stack_f PARAMS ((unsigned int));
-static unw_rec_list *output_mem_stack_v PARAMS ((void));
-static unw_rec_list *output_psp_gr PARAMS ((unsigned int));
-static unw_rec_list *output_psp_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_rp_when PARAMS ((void));
-static unw_rec_list *output_rp_gr PARAMS ((unsigned int));
-static unw_rec_list *output_rp_br PARAMS ((unsigned int));
-static unw_rec_list *output_rp_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_rp_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_pfs_when PARAMS ((void));
-static unw_rec_list *output_pfs_gr PARAMS ((unsigned int));
-static unw_rec_list *output_pfs_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_pfs_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_preds_when PARAMS ((void));
-static unw_rec_list *output_preds_gr PARAMS ((unsigned int));
-static unw_rec_list *output_preds_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_preds_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_fr_mem PARAMS ((unsigned int));
-static unw_rec_list *output_frgr_mem PARAMS ((unsigned int, unsigned int));
-static unw_rec_list *output_gr_gr PARAMS ((unsigned int, unsigned int));
-static unw_rec_list *output_gr_mem PARAMS ((unsigned int));
-static unw_rec_list *output_br_mem PARAMS ((unsigned int));
-static unw_rec_list *output_br_gr PARAMS ((unsigned int, unsigned int));
-static unw_rec_list *output_spill_base PARAMS ((unsigned int));
-static unw_rec_list *output_unat_when PARAMS ((void));
-static unw_rec_list *output_unat_gr PARAMS ((unsigned int));
-static unw_rec_list *output_unat_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_unat_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_lc_when PARAMS ((void));
-static unw_rec_list *output_lc_gr PARAMS ((unsigned int));
-static unw_rec_list *output_lc_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_lc_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_fpsr_when PARAMS ((void));
-static unw_rec_list *output_fpsr_gr PARAMS ((unsigned int));
-static unw_rec_list *output_fpsr_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_fpsr_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_priunat_when_gr PARAMS ((void));
-static unw_rec_list *output_priunat_when_mem PARAMS ((void));
-static unw_rec_list *output_priunat_gr PARAMS ((unsigned int));
-static unw_rec_list *output_priunat_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_priunat_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_bsp_when PARAMS ((void));
-static unw_rec_list *output_bsp_gr PARAMS ((unsigned int));
-static unw_rec_list *output_bsp_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_bsp_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_bspstore_when PARAMS ((void));
-static unw_rec_list *output_bspstore_gr PARAMS ((unsigned int));
-static unw_rec_list *output_bspstore_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_bspstore_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_rnat_when PARAMS ((void));
-static unw_rec_list *output_rnat_gr PARAMS ((unsigned int));
-static unw_rec_list *output_rnat_psprel PARAMS ((unsigned int));
-static unw_rec_list *output_rnat_sprel PARAMS ((unsigned int));
-static unw_rec_list *output_unwabi PARAMS ((unsigned long, unsigned long));
-static unw_rec_list *output_epilogue PARAMS ((unsigned long));
-static unw_rec_list *output_label_state PARAMS ((unsigned long));
-static unw_rec_list *output_copy_state PARAMS ((unsigned long));
-static unw_rec_list *output_spill_psprel PARAMS ((unsigned int, unsigned int, unsigned int,
- unsigned int));
-static unw_rec_list *output_spill_sprel PARAMS ((unsigned int, unsigned int, unsigned int,
- unsigned int));
-static unw_rec_list *output_spill_reg PARAMS ((unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int));
-static void process_one_record PARAMS ((unw_rec_list *, vbyte_func));
-static void process_unw_records PARAMS ((unw_rec_list *, vbyte_func));
-static int calc_record_size PARAMS ((unw_rec_list *));
-static void set_imask PARAMS ((unw_rec_list *, unsigned long, unsigned long, unsigned int));
-static unsigned long slot_index PARAMS ((unsigned long, fragS *,
- unsigned long, fragS *,
- int));
-static unw_rec_list *optimize_unw_records PARAMS ((unw_rec_list *));
-static void fixup_unw_records PARAMS ((unw_rec_list *, int));
-static int parse_predicate_and_operand PARAMS ((expressionS *, unsigned *, const char *));
-static void convert_expr_to_ab_reg PARAMS ((const expressionS *, unsigned int *, unsigned int *, const char *, int));
-static void convert_expr_to_xy_reg PARAMS ((const expressionS *, unsigned int *, unsigned int *, const char *, int));
-static unsigned int get_saved_prologue_count PARAMS ((unsigned long));
-static void save_prologue_count PARAMS ((unsigned long, unsigned int));
-static void free_saved_prologue_counts PARAMS ((void));
+static void dot_alias (int);
+static int parse_operand (expressionS *, int);
+static void emit_one_bundle (void);
+static bfd_reloc_code_real_type ia64_gen_real_reloc_type (struct symbol *,
+ bfd_reloc_code_real_type);
+static void insn_group_break (int, int, int);
+static void add_qp_mutex (valueT);
+static void add_qp_imply (int, int);
+static void clear_qp_mutex (valueT);
+static void clear_qp_implies (valueT, valueT);
+static void print_dependency (const char *, int);
+static void instruction_serialization (void);
+static void data_serialization (void);
+static void output_R3_format (vbyte_func, unw_record_type, unsigned long);
+static void output_B3_format (vbyte_func, unsigned long, unsigned long);
+static void output_B4_format (vbyte_func, unw_record_type, unsigned long);
+static void free_saved_prologue_counts (void);
/* Determine if application register REGNUM resides only in the integer
unit (as opposed to the memory unit). */
don't see any other way to accomplish the same thing without
changing obj-elf.c (which may be the Right Thing, in the end). */
static void
-set_section (name)
- char *name;
+set_section (char *name)
{
char *saved_input_line_pointer;
/* Map 's' to SHF_IA_64_SHORT. */
int
-ia64_elf_section_letter (letter, ptr_msg)
- int letter;
- char **ptr_msg;
+ia64_elf_section_letter (int letter, char **ptr_msg)
{
if (letter == 's')
return SHF_IA_64_SHORT;
/* Map SHF_IA_64_SHORT to SEC_SMALL_DATA. */
flagword
-ia64_elf_section_flags (flags, attr, type)
- flagword flags;
- int attr, type ATTRIBUTE_UNUSED;
+ia64_elf_section_flags (flagword flags,
+ int attr,
+ int type ATTRIBUTE_UNUSED)
{
if (attr & SHF_IA_64_SHORT)
flags |= SEC_SMALL_DATA;
}
int
-ia64_elf_section_type (str, len)
- const char *str;
- size_t len;
+ia64_elf_section_type (const char *str, size_t len)
{
#define STREQ(s) ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))
}
static unsigned int
-set_regstack (ins, locs, outs, rots)
- unsigned int ins, locs, outs, rots;
+set_regstack (unsigned int ins,
+ unsigned int locs,
+ unsigned int outs,
+ unsigned int rots)
{
/* Size of frame. */
unsigned int sof;
}
void
-ia64_flush_insns ()
+ia64_flush_insns (void)
{
struct label_fix *lfix;
segT saved_seg;
}
void
-ia64_cons_align (nbytes)
- int nbytes;
+ia64_cons_align (int nbytes)
{
if (md.auto_align)
{
/* Output COUNT bytes to a memory location. */
static char *vbyte_mem_ptr = NULL;
-void
-output_vbyte_mem (count, ptr, comment)
- int count;
- char *ptr;
- char *comment ATTRIBUTE_UNUSED;
+static void
+output_vbyte_mem (int count, char *ptr, char *comment ATTRIBUTE_UNUSED)
{
int x;
if (vbyte_mem_ptr == NULL)
/* Count the number of bytes required for records. */
static int vbyte_count = 0;
-void
-count_output (count, ptr, comment)
- int count;
- char *ptr ATTRIBUTE_UNUSED;
- char *comment ATTRIBUTE_UNUSED;
+static void
+count_output (int count,
+ char *ptr ATTRIBUTE_UNUSED,
+ char *comment ATTRIBUTE_UNUSED)
{
vbyte_count += count;
}
static void
-output_R1_format (f, rtype, rlen)
- vbyte_func f;
- unw_record_type rtype;
- int rlen;
+output_R1_format (vbyte_func f, unw_record_type rtype, int rlen)
{
int r = 0;
char byte;
}
static void
-output_R2_format (f, mask, grsave, rlen)
- vbyte_func f;
- int mask, grsave;
- unsigned long rlen;
+output_R2_format (vbyte_func f, int mask, int grsave, unsigned long rlen)
{
char bytes[20];
int count = 2;
}
static void
-output_R3_format (f, rtype, rlen)
- vbyte_func f;
- unw_record_type rtype;
- unsigned long rlen;
+output_R3_format (vbyte_func f, unw_record_type rtype, unsigned long rlen)
{
int r = 0, count;
char bytes[20];
}
static void
-output_P1_format (f, brmask)
- vbyte_func f;
- int brmask;
+output_P1_format (vbyte_func f, int brmask)
{
char byte;
byte = UNW_P1 | (brmask & 0x1f);
}
static void
-output_P2_format (f, brmask, gr)
- vbyte_func f;
- int brmask;
- int gr;
+output_P2_format (vbyte_func f, int brmask, int gr)
{
char bytes[2];
brmask = (brmask & 0x1f);
}
static void
-output_P3_format (f, rtype, reg)
- vbyte_func f;
- unw_record_type rtype;
- int reg;
+output_P3_format (vbyte_func f, unw_record_type rtype, int reg)
{
char bytes[2];
int r = 0;
}
static void
-output_P4_format (f, imask, imask_size)
- vbyte_func f;
- unsigned char *imask;
- unsigned long imask_size;
+output_P4_format (vbyte_func f, unsigned char *imask, unsigned long imask_size)
{
imask[0] = UNW_P4;
(*f) (imask_size, (char *) imask, NULL);
}
static void
-output_P5_format (f, grmask, frmask)
- vbyte_func f;
- int grmask;
- unsigned long frmask;
+output_P5_format (vbyte_func f, int grmask, unsigned long frmask)
{
char bytes[4];
grmask = (grmask & 0x0f);
}
static void
-output_P6_format (f, rtype, rmask)
- vbyte_func f;
- unw_record_type rtype;
- int rmask;
+output_P6_format (vbyte_func f, unw_record_type rtype, int rmask)
{
char byte;
int r = 0;
}
static void
-output_P7_format (f, rtype, w1, w2)
- vbyte_func f;
- unw_record_type rtype;
- unsigned long w1;
- unsigned long w2;
+output_P7_format (vbyte_func f,
+ unw_record_type rtype,
+ unsigned long w1,
+ unsigned long w2)
{
char bytes[20];
int count = 1;
}
static void
-output_P8_format (f, rtype, t)
- vbyte_func f;
- unw_record_type rtype;
- unsigned long t;
+output_P8_format (vbyte_func f, unw_record_type rtype, unsigned long t)
{
char bytes[20];
int r = 0;
}
static void
-output_P9_format (f, grmask, gr)
- vbyte_func f;
- int grmask;
- int gr;
+output_P9_format (vbyte_func f, int grmask, int gr)
{
char bytes[3];
bytes[0] = UNW_P9;
}
static void
-output_P10_format (f, abi, context)
- vbyte_func f;
- int abi;
- int context;
+output_P10_format (vbyte_func f, int abi, int context)
{
char bytes[3];
bytes[0] = UNW_P10;
}
static void
-output_B1_format (f, rtype, label)
- vbyte_func f;
- unw_record_type rtype;
- unsigned long label;
+output_B1_format (vbyte_func f, unw_record_type rtype, unsigned long label)
{
char byte;
int r = 0;
}
static void
-output_B2_format (f, ecount, t)
- vbyte_func f;
- unsigned long ecount;
- unsigned long t;
+output_B2_format (vbyte_func f, unsigned long ecount, unsigned long t)
{
char bytes[20];
int count = 1;
}
static void
-output_B3_format (f, ecount, t)
- vbyte_func f;
- unsigned long ecount;
- unsigned long t;
+output_B3_format (vbyte_func f, unsigned long ecount, unsigned long t)
{
char bytes[20];
int count = 1;
}
static void
-output_B4_format (f, rtype, label)
- vbyte_func f;
- unw_record_type rtype;
- unsigned long label;
+output_B4_format (vbyte_func f, unw_record_type rtype, unsigned long label)
{
char bytes[20];
int r = 0;
}
static char
-format_ab_reg (ab, reg)
- int ab;
- int reg;
+format_ab_reg (int ab, int reg)
{
int ret;
ab = (ab & 3);
}
static void
-output_X1_format (f, rtype, ab, reg, t, w1)
- vbyte_func f;
- unw_record_type rtype;
- int ab, reg;
- unsigned long t;
- unsigned long w1;
+output_X1_format (vbyte_func f,
+ unw_record_type rtype,
+ int ab,
+ int reg,
+ unsigned long t,
+ unsigned long w1)
{
char bytes[20];
int r = 0;
}
static void
-output_X2_format (f, ab, reg, x, y, treg, t)
- vbyte_func f;
- int ab, reg;
- int x, y, treg;
- unsigned long t;
+output_X2_format (vbyte_func f,
+ int ab,
+ int reg,
+ int x,
+ int y,
+ int treg,
+ unsigned long t)
{
char bytes[20];
int count = 3;
}
static void
-output_X3_format (f, rtype, qp, ab, reg, t, w1)
- vbyte_func f;
- unw_record_type rtype;
- int qp;
- int ab, reg;
- unsigned long t;
- unsigned long w1;
+output_X3_format (vbyte_func f,
+ unw_record_type rtype,
+ int qp,
+ int ab,
+ int reg,
+ unsigned long t,
+ unsigned long w1)
{
char bytes[20];
int r = 0;
}
static void
-output_X4_format (f, qp, ab, reg, x, y, treg, t)
- vbyte_func f;
- int qp;
- int ab, reg;
- int x, y, treg;
- unsigned long t;
+output_X4_format (vbyte_func f,
+ int qp,
+ int ab,
+ int reg,
+ int x,
+ int y,
+ int treg,
+ unsigned long t)
{
char bytes[20];
int count = 4;
body region. */
static unw_rec_list *
-output_endp ()
+output_endp (void)
{
unw_rec_list *ptr = alloc_record (endp);
return ptr;
}
static unw_rec_list *
-output_prologue ()
+output_prologue (void)
{
unw_rec_list *ptr = alloc_record (prologue);
memset (&ptr->r.record.r.mask, 0, sizeof (ptr->r.record.r.mask));
}
static unw_rec_list *
-output_prologue_gr (saved_mask, reg)
- unsigned int saved_mask;
- unsigned int reg;
+output_prologue_gr (unsigned int saved_mask, unsigned int reg)
{
unw_rec_list *ptr = alloc_record (prologue_gr);
memset (&ptr->r.record.r.mask, 0, sizeof (ptr->r.record.r.mask));
}
static unw_rec_list *
-output_body ()
+output_body (void)
{
unw_rec_list *ptr = alloc_record (body);
return ptr;
}
static unw_rec_list *
-output_mem_stack_f (size)
- unsigned int size;
+output_mem_stack_f (unsigned int size)
{
unw_rec_list *ptr = alloc_record (mem_stack_f);
ptr->r.record.p.size = size;
}
static unw_rec_list *
-output_mem_stack_v ()
+output_mem_stack_v (void)
{
unw_rec_list *ptr = alloc_record (mem_stack_v);
return ptr;
}
static unw_rec_list *
-output_psp_gr (gr)
- unsigned int gr;
+output_psp_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (psp_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_psp_sprel (offset)
- unsigned int offset;
+output_psp_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (psp_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_rp_when ()
+output_rp_when (void)
{
unw_rec_list *ptr = alloc_record (rp_when);
return ptr;
}
static unw_rec_list *
-output_rp_gr (gr)
- unsigned int gr;
+output_rp_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (rp_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_rp_br (br)
- unsigned int br;
+output_rp_br (unsigned int br)
{
unw_rec_list *ptr = alloc_record (rp_br);
ptr->r.record.p.r.br = br;
}
static unw_rec_list *
-output_rp_psprel (offset)
- unsigned int offset;
+output_rp_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (rp_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_rp_sprel (offset)
- unsigned int offset;
+output_rp_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (rp_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_pfs_when ()
+output_pfs_when (void)
{
unw_rec_list *ptr = alloc_record (pfs_when);
return ptr;
}
static unw_rec_list *
-output_pfs_gr (gr)
- unsigned int gr;
+output_pfs_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (pfs_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_pfs_psprel (offset)
- unsigned int offset;
+output_pfs_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (pfs_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_pfs_sprel (offset)
- unsigned int offset;
+output_pfs_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (pfs_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_preds_when ()
+output_preds_when (void)
{
unw_rec_list *ptr = alloc_record (preds_when);
return ptr;
}
static unw_rec_list *
-output_preds_gr (gr)
- unsigned int gr;
+output_preds_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (preds_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_preds_psprel (offset)
- unsigned int offset;
+output_preds_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (preds_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_preds_sprel (offset)
- unsigned int offset;
+output_preds_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (preds_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_fr_mem (mask)
- unsigned int mask;
+output_fr_mem (unsigned int mask)
{
unw_rec_list *ptr = alloc_record (fr_mem);
unw_rec_list *cur = ptr;
}
static unw_rec_list *
-output_frgr_mem (gr_mask, fr_mask)
- unsigned int gr_mask;
- unsigned int fr_mask;
+output_frgr_mem (unsigned int gr_mask, unsigned int fr_mask)
{
unw_rec_list *ptr = alloc_record (frgr_mem);
unw_rec_list *cur = ptr;
}
static unw_rec_list *
-output_gr_gr (mask, reg)
- unsigned int mask;
- unsigned int reg;
+output_gr_gr (unsigned int mask, unsigned int reg)
{
unw_rec_list *ptr = alloc_record (gr_gr);
unw_rec_list *cur = ptr;
}
static unw_rec_list *
-output_gr_mem (mask)
- unsigned int mask;
+output_gr_mem (unsigned int mask)
{
unw_rec_list *ptr = alloc_record (gr_mem);
unw_rec_list *cur = ptr;
}
static unw_rec_list *
-output_br_gr (mask, reg)
- unsigned int mask;
- unsigned int reg;
+output_br_gr (unsigned int mask, unsigned int reg)
{
unw_rec_list *ptr = alloc_record (br_gr);
unw_rec_list *cur = ptr;
}
static unw_rec_list *
-output_spill_base (offset)
- unsigned int offset;
+output_spill_base (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (spill_base);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_unat_when ()
+output_unat_when (void)
{
unw_rec_list *ptr = alloc_record (unat_when);
return ptr;
}
static unw_rec_list *
-output_unat_gr (gr)
- unsigned int gr;
+output_unat_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (unat_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_unat_psprel (offset)
- unsigned int offset;
+output_unat_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (unat_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_unat_sprel (offset)
- unsigned int offset;
+output_unat_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (unat_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_lc_when ()
+output_lc_when (void)
{
unw_rec_list *ptr = alloc_record (lc_when);
return ptr;
}
static unw_rec_list *
-output_lc_gr (gr)
- unsigned int gr;
+output_lc_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (lc_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_lc_psprel (offset)
- unsigned int offset;
+output_lc_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (lc_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_lc_sprel (offset)
- unsigned int offset;
+output_lc_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (lc_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_fpsr_when ()
+output_fpsr_when (void)
{
unw_rec_list *ptr = alloc_record (fpsr_when);
return ptr;
}
static unw_rec_list *
-output_fpsr_gr (gr)
- unsigned int gr;
+output_fpsr_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (fpsr_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_fpsr_psprel (offset)
- unsigned int offset;
+output_fpsr_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (fpsr_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_fpsr_sprel (offset)
- unsigned int offset;
+output_fpsr_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (fpsr_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_priunat_when_gr ()
+output_priunat_when_gr (void)
{
unw_rec_list *ptr = alloc_record (priunat_when_gr);
return ptr;
}
static unw_rec_list *
-output_priunat_when_mem ()
+output_priunat_when_mem (void)
{
unw_rec_list *ptr = alloc_record (priunat_when_mem);
return ptr;
}
static unw_rec_list *
-output_priunat_gr (gr)
- unsigned int gr;
+output_priunat_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (priunat_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_priunat_psprel (offset)
- unsigned int offset;
+output_priunat_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (priunat_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_priunat_sprel (offset)
- unsigned int offset;
+output_priunat_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (priunat_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_bsp_when ()
+output_bsp_when (void)
{
unw_rec_list *ptr = alloc_record (bsp_when);
return ptr;
}
static unw_rec_list *
-output_bsp_gr (gr)
- unsigned int gr;
+output_bsp_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (bsp_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_bsp_psprel (offset)
- unsigned int offset;
+output_bsp_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (bsp_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_bsp_sprel (offset)
- unsigned int offset;
+output_bsp_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (bsp_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_bspstore_when ()
+output_bspstore_when (void)
{
unw_rec_list *ptr = alloc_record (bspstore_when);
return ptr;
}
static unw_rec_list *
-output_bspstore_gr (gr)
- unsigned int gr;
+output_bspstore_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (bspstore_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_bspstore_psprel (offset)
- unsigned int offset;
+output_bspstore_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (bspstore_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_bspstore_sprel (offset)
- unsigned int offset;
+output_bspstore_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (bspstore_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_rnat_when ()
+output_rnat_when (void)
{
unw_rec_list *ptr = alloc_record (rnat_when);
return ptr;
}
static unw_rec_list *
-output_rnat_gr (gr)
- unsigned int gr;
+output_rnat_gr (unsigned int gr)
{
unw_rec_list *ptr = alloc_record (rnat_gr);
ptr->r.record.p.r.gr = gr;
}
static unw_rec_list *
-output_rnat_psprel (offset)
- unsigned int offset;
+output_rnat_psprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (rnat_psprel);
ptr->r.record.p.off.psp = ENCODED_PSP_OFFSET (offset);
}
static unw_rec_list *
-output_rnat_sprel (offset)
- unsigned int offset;
+output_rnat_sprel (unsigned int offset)
{
unw_rec_list *ptr = alloc_record (rnat_sprel);
ptr->r.record.p.off.sp = offset / 4;
}
static unw_rec_list *
-output_unwabi (abi, context)
- unsigned long abi;
- unsigned long context;
+output_unwabi (unsigned long abi, unsigned long context)
{
unw_rec_list *ptr = alloc_record (unwabi);
ptr->r.record.p.abi = abi;
}
static unw_rec_list *
-output_spill_psprel (ab, reg, offset, predicate)
- unsigned int ab;
- unsigned int reg;
- unsigned int offset;
- unsigned int predicate;
+output_spill_psprel (unsigned int ab,
+ unsigned int reg,
+ unsigned int offset,
+ unsigned int predicate)
{
unw_rec_list *ptr = alloc_record (predicate ? spill_psprel_p : spill_psprel);
ptr->r.record.x.ab = ab;
}
static unw_rec_list *
-output_spill_sprel (ab, reg, offset, predicate)
- unsigned int ab;
- unsigned int reg;
- unsigned int offset;
- unsigned int predicate;
+output_spill_sprel (unsigned int ab,
+ unsigned int reg,
+ unsigned int offset,
+ unsigned int predicate)
{
unw_rec_list *ptr = alloc_record (predicate ? spill_sprel_p : spill_sprel);
ptr->r.record.x.ab = ab;
}
static unw_rec_list *
-output_spill_reg (ab, reg, targ_reg, xy, predicate)
- unsigned int ab;
- unsigned int reg;
- unsigned int targ_reg;
- unsigned int xy;
- unsigned int predicate;
+output_spill_reg (unsigned int ab,
+ unsigned int reg,
+ unsigned int targ_reg,
+ unsigned int xy,
+ unsigned int predicate)
{
unw_rec_list *ptr = alloc_record (predicate ? spill_reg_p : spill_reg);
ptr->r.record.x.ab = ab;
specified function. */
static void
-process_one_record (ptr, f)
- unw_rec_list *ptr;
- vbyte_func f;
+process_one_record (unw_rec_list *ptr, vbyte_func f)
{
unsigned int fr_mask, gr_mask;
/* Given a unw_rec_list list, process all the records with
the specified function. */
static void
-process_unw_records (list, f)
- unw_rec_list *list;
- vbyte_func f;
+process_unw_records (unw_rec_list *list, vbyte_func f)
{
unw_rec_list *ptr;
for (ptr = list; ptr; ptr = ptr->next)
/* Determine the size of a record list in bytes. */
static int
-calc_record_size (list)
- unw_rec_list *list;
+calc_record_size (unw_rec_list *list)
{
vbyte_count = 0;
process_unw_records (list, count_output);
2: instruction saves next general reg
3: instruction saves next branch reg */
static void
-set_imask (region, regmask, t, type)
- unw_rec_list *region;
- unsigned long regmask;
- unsigned long t;
- unsigned int type;
+set_imask (unw_rec_list *region,
+ unsigned long regmask,
+ unsigned long t,
+ unsigned int type)
{
unsigned char *imask;
unsigned long imask_size;
containing FIRST_ADDR. If BEFORE_RELAX, then we use worst-case estimates
for frag sizes. */
-unsigned long
-slot_index (slot_addr, slot_frag, first_addr, first_frag, before_relax)
- unsigned long slot_addr;
- fragS *slot_frag;
- unsigned long first_addr;
- fragS *first_frag;
- int before_relax;
+static unsigned long
+slot_index (unsigned long slot_addr,
+ fragS *slot_frag,
+ unsigned long first_addr,
+ fragS *first_frag,
+ int before_relax)
{
unsigned long index = 0;
/* Optimize unwind record directives. */
static unw_rec_list *
-optimize_unw_records (list)
- unw_rec_list *list;
+optimize_unw_records (unw_rec_list *list)
{
if (!list)
return NULL;
within each record to generate an image. */
static void
-fixup_unw_records (list, before_relax)
- unw_rec_list *list;
- int before_relax;
+fixup_unw_records (unw_rec_list *list, int before_relax)
{
unw_rec_list *ptr, *region = 0;
unsigned long first_addr = 0, rlen = 0, t;
}
static int
-parse_predicate_and_operand (e, qp, po)
- expressionS * e;
- unsigned * qp;
- const char * po;
+parse_predicate_and_operand (expressionS *e, unsigned *qp, const char *po)
{
int sep = parse_operand (e, ',');
}
static void
-convert_expr_to_ab_reg (e, ab, regp, po, n)
- const expressionS *e;
- unsigned int *ab;
- unsigned int *regp;
- const char * po;
- int n;
+convert_expr_to_ab_reg (const expressionS *e,
+ unsigned int *ab,
+ unsigned int *regp,
+ const char *po,
+ int n)
{
unsigned int reg = e->X_add_number;
}
static void
-convert_expr_to_xy_reg (e, xy, regp, po, n)
- const expressionS *e;
- unsigned int *xy;
- unsigned int *regp;
- const char * po;
- int n;
+convert_expr_to_xy_reg (const expressionS *e,
+ unsigned int *xy,
+ unsigned int *regp,
+ const char *po,
+ int n)
{
unsigned int reg = e->X_add_number;
}
static void
-dot_radix (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_radix (int dummy ATTRIBUTE_UNUSED)
{
char *radix;
int ch;
/* .sbss, .bss etc. are macros that expand into ".section SECNAME". */
static void
-dot_special_section (which)
- int which;
+dot_special_section (int which)
{
set_section ((char *) special_section_name[which]);
}
}
static void
-add_unwind_entry (ptr, sep)
- unw_rec_list *ptr;
- int sep;
+add_unwind_entry (unw_rec_list *ptr, int sep)
{
if (ptr)
{
}
static void
-dot_fframe (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_fframe (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
int sep;
}
static void
-dot_vframe (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_vframe (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
unsigned reg;
}
static void
-dot_vframesp (psp)
- int psp;
+dot_vframesp (int psp)
{
expressionS e;
int sep;
}
static void
-dot_save (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_save (int dummy ATTRIBUTE_UNUSED)
{
expressionS e1, e2;
unsigned reg1, reg2;
}
static void
-dot_restore (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_restore (int dummy ATTRIBUTE_UNUSED)
{
expressionS e1;
unsigned long ecount; /* # of _additional_ regions to pop */
}
static void
-dot_restorereg (pred)
- int pred;
+dot_restorereg (int pred)
{
unsigned int qp, ab, reg;
expressionS e;
}
static void
-dot_handlerdata (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_handlerdata (int dummy ATTRIBUTE_UNUSED)
{
if (!in_procedure ("handlerdata"))
return;
}
static void
-dot_unwentry (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_unwentry (int dummy ATTRIBUTE_UNUSED)
{
if (!in_procedure ("unwentry"))
return;
}
static void
-dot_altrp (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_altrp (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
unsigned reg;
}
static void
-dot_savemem (psprel)
- int psprel;
+dot_savemem (int psprel)
{
expressionS e1, e2;
int sep;
}
static void
-dot_saveg (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_saveg (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
unsigned grmask;
}
static void
-dot_savef (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_savef (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
}
static void
-dot_saveb (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_saveb (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
unsigned brmask;
}
static void
-dot_savegf (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_savegf (int dummy ATTRIBUTE_UNUSED)
{
expressionS e1, e2;
}
static void
-dot_spill (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_spill (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
}
static void
-dot_spillreg (pred)
- int pred;
+dot_spillreg (int pred)
{
int sep;
unsigned int qp, ab, xy, reg, treg;
}
static void
-dot_spillmem (psprel)
- int psprel;
+dot_spillmem (int psprel)
{
expressionS e;
int pred = (psprel < 0), sep;
}
static unsigned int
-get_saved_prologue_count (lbl)
- unsigned long lbl;
+get_saved_prologue_count (unsigned long lbl)
{
label_prologue_count *lpc = unwind.saved_prologue_counts;
}
static void
-save_prologue_count (lbl, count)
- unsigned long lbl;
- unsigned int count;
+save_prologue_count (unsigned long lbl, unsigned int count)
{
label_prologue_count *lpc = unwind.saved_prologue_counts;
}
static void
-dot_label_state (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_label_state (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
}
static void
-dot_copy_state (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_copy_state (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
}
static void
-dot_unwabi (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_unwabi (int dummy ATTRIBUTE_UNUSED)
{
expressionS e1, e2;
unsigned char sep;
}
static void
-dot_personality (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_personality (int dummy ATTRIBUTE_UNUSED)
{
char *name, *p, c;
if (!in_procedure ("personality"))
}
static void
-dot_proc (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_proc (int dummy ATTRIBUTE_UNUSED)
{
char *name, *p, c;
symbolS *sym;
}
static void
-dot_body (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_body (int dummy ATTRIBUTE_UNUSED)
{
if (!in_procedure ("body"))
return;
}
static void
-dot_prologue (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_prologue (int dummy ATTRIBUTE_UNUSED)
{
unsigned mask = 0, grsave = 0;
}
static void
-dot_endp (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_endp (int dummy ATTRIBUTE_UNUSED)
{
expressionS e;
int bytes_per_address;
}
static void
-dot_template (template)
- int template;
+dot_template (int template)
{
CURR_SLOT.user_template = template;
}
static void
-dot_regstk (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_regstk (int dummy ATTRIBUTE_UNUSED)
{
int ins, locs, outs, rots;
}
static void
-dot_rot (type)
- int type;
+dot_rot (int type)
{
offsetT num_regs;
valueT num_alloced = 0;
}
static void
-dot_byteorder (byteorder)
- int byteorder;
+dot_byteorder (int byteorder)
{
segment_info_type *seginfo = seg_info (now_seg);
}
static void
-dot_psr (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_psr (int dummy ATTRIBUTE_UNUSED)
{
char *option;
int ch;
}
static void
-dot_ln (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_ln (int dummy ATTRIBUTE_UNUSED)
{
new_logical_line (0, get_absolute_expression ());
demand_empty_rest_of_line ();
}
static void
-cross_section (ref, cons, ua)
- int ref;
- void (*cons) PARAMS((int));
- int ua;
+cross_section (int ref, void (*cons) (int), int ua)
{
char *start, *end;
int saved_auto_align;
}
static void
-dot_xdata (size)
- int size;
+dot_xdata (int size)
{
cross_section (size, cons, 0);
}
/* Why doesn't float_cons() call md_cons_align() the way cons() does? */
static void
-stmt_float_cons (kind)
- int kind;
+stmt_float_cons (int kind)
{
size_t alignment;
}
static void
-stmt_cons_ua (size)
- int size;
+stmt_cons_ua (int size)
{
int saved_auto_align = md.auto_align;
}
static void
-dot_xfloat_cons (kind)
- int kind;
+dot_xfloat_cons (int kind)
{
cross_section (kind, stmt_float_cons, 0);
}
}
static void
-dot_xdata_ua (size)
- int size;
+dot_xdata_ua (int size)
{
cross_section (size, cons, 1);
}
static void
-dot_xfloat_cons_ua (kind)
- int kind;
+dot_xfloat_cons_ua (int kind)
{
cross_section (kind, float_cons, 1);
}
/* .reg.val <regname>,value */
static void
-dot_reg_val (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_reg_val (int dummy ATTRIBUTE_UNUSED)
{
expressionS reg;
.serialize.instruction
*/
static void
-dot_serialize (type)
- int type;
+dot_serialize (int type)
{
insn_group_break (0, 0, 0);
if (type)
*/
static void
-dot_dv_mode (type)
- int type;
+dot_dv_mode (int type)
{
if (md.manual_bundling)
as_warn (_("Directive invalid within a bundle"));
}
static void
-print_prmask (mask)
- valueT mask;
+print_prmask (valueT mask)
{
int regno;
char *comma = "";
*/
static void
-dot_pred_rel (type)
- int type;
+dot_pred_rel (int type)
{
valueT mask = 0;
int count = 0;
Otherwise, only global labels are considered entry points. */
static void
-dot_entry (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_entry (int dummy ATTRIBUTE_UNUSED)
{
const char *err;
char *name;
c = get_symbol_end ();
symbolP = symbol_find_or_make (name);
- err = hash_insert (md.entry_hash, S_GET_NAME (symbolP), (PTR) symbolP);
+ err = hash_insert (md.entry_hash, S_GET_NAME (symbolP), (void *) symbolP);
if (err)
as_fatal (_("Inserting \"%s\" into entry hint table failed: %s"),
name, err);
"base" is used to distinguish between offsets from a different base. */
static void
-dot_mem_offset (dummy)
- int dummy ATTRIBUTE_UNUSED;
+dot_mem_offset (int dummy ATTRIBUTE_UNUSED)
{
md.mem_offset.hint = 1;
md.mem_offset.offset = get_absolute_expression ();
the symbol table. */
static symbolS *
-declare_register (name, regnum)
- const char *name;
- unsigned int regnum;
+declare_register (const char *name, unsigned int regnum)
{
const char *err;
symbolS *sym;
sym = symbol_create (name, reg_section, regnum, &zero_address_frag);
- err = hash_insert (md.reg_hash, S_GET_NAME (sym), (PTR) sym);
+ err = hash_insert (md.reg_hash, S_GET_NAME (sym), (void *) sym);
if (err)
as_fatal ("Inserting \"%s\" into register table failed: %s",
name, err);
}
static void
-declare_register_set (prefix, num_regs, base_regnum)
- const char *prefix;
- unsigned int num_regs;
- unsigned int base_regnum;
+declare_register_set (const char *prefix,
+ unsigned int num_regs,
+ unsigned int base_regnum)
{
char name[8];
unsigned int i;
}
static unsigned int
-operand_width (opnd)
- enum ia64_opnd opnd;
+operand_width (enum ia64_opnd opnd)
{
const struct ia64_operand *odesc = &elf64_ia64_operands[opnd];
unsigned int bits = 0;
}
static enum operand_match_result
-operand_match (idesc, index, e)
- const struct ia64_opcode *idesc;
- int index;
- expressionS *e;
+operand_match (const struct ia64_opcode *idesc, int index, expressionS *e)
{
enum ia64_opnd opnd = idesc->operands[index];
int bits, relocatable = 0;
}
static int
-parse_operand (e, more)
- expressionS *e;
- int more;
+parse_operand (expressionS *e, int more)
{
int sep = '\0';
matches the specified operands, or NULL if no match is possible. */
static struct ia64_opcode *
-parse_operands (idesc)
- struct ia64_opcode *idesc;
+parse_operands (struct ia64_opcode *idesc)
{
int i = 0, highest_unmatched_operand, num_operands = 0, num_outputs = 0;
int error_pos, out_of_range_pos, curr_out_of_range_pos, sep = 0;
}
static void
-build_insn (slot, insnp)
- struct slot *slot;
- bfd_vma *insnp;
+build_insn (struct slot *slot, bfd_vma *insnp)
{
const struct ia64_operand *odesc, *o2desc;
struct ia64_opcode *idesc = slot->idesc;
}
static void
-emit_one_bundle ()
+emit_one_bundle (void)
{
int manual_bundling_off = 0, manual_bundling = 0;
enum ia64_unit required_unit, insn_unit = 0;
}
int
-md_parse_option (c, arg)
- int c;
- char *arg;
+md_parse_option (int c, char *arg)
{
switch (c)
}
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
fputs (_("\
IA-64 options:\n\
}
void
-ia64_after_parse_args ()
+ia64_after_parse_args (void)
{
if (debug_type == DEBUG_STABS)
as_fatal (_("--gstabs is not supported for ia64"));
up all the tables, etc. that the MD part of the assembler will need
that can be determined before arguments are parsed. */
void
-md_begin ()
+md_begin (void)
{
int i, j, k, t, goodness, best, ok;
const char *err;
for (i = 0; i < NELEMS (const_bits); ++i)
{
err = hash_insert (md.const_hash, const_bits[i].name,
- (PTR) (const_bits + i));
+ (void *) (const_bits + i));
if (err)
as_fatal (_("Inserting \"%s\" into constant hash table failed: %s"),
name, err);
options in md based on command line options. */
void
-ia64_init (argc, argv)
- int argc ATTRIBUTE_UNUSED;
- char **argv ATTRIBUTE_UNUSED;
+ia64_init (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
{
md.flags = MD_FLAGS_DEFAULT;
md.detect_dv = 1;
/* Return a string for the target object file format. */
const char *
-ia64_target_format ()
+ia64_target_format (void)
{
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
{
}
void
-ia64_end_of_source ()
+ia64_end_of_source (void)
{
/* terminate insn group upon reaching end of file: */
insn_group_break (1, 0, 0);
}
void
-ia64_start_line ()
+ia64_start_line (void)
{
static int first;
static int defining_tag = 0;
int
-ia64_unrecognized_line (ch)
- int ch;
+ia64_unrecognized_line (int ch)
{
switch (ch)
{
}
void
-ia64_frob_label (sym)
- struct symbol *sym;
+ia64_frob_label (struct symbol *sym)
{
struct label_fix *fix;
that are declared but unused. This routine removes declared,
unused symbols from an object. */
int
-ia64_frob_symbol (sym)
- struct symbol *sym;
+ia64_frob_symbol (struct symbol *sym)
{
if ((S_GET_SEGMENT (sym) == &bfd_und_section && ! symbol_used_p (sym) &&
ELF_ST_VISIBILITY (S_GET_OTHER (sym)) == STV_DEFAULT)
#endif
void
-ia64_flush_pending_output ()
+ia64_flush_pending_output (void)
{
if (!md.keep_pending_output
&& bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE)
of rotating registers or due to the indexing of indirect register
sets. */
int
-ia64_optimize_expr (l, op, r)
- expressionS *l;
- operatorT op;
- expressionS *r;
+ia64_optimize_expr (expressionS *l, operatorT op, expressionS *r)
{
if (op != O_index)
return 0;
}
int
-ia64_parse_name (name, e, nextcharP)
- char *name;
- expressionS *e;
- char *nextcharP;
+ia64_parse_name (char *name, expressionS *e, char *nextcharP)
{
struct const_desc *cdesc;
struct dynreg *dr = 0;
/* Remove the '#' suffix that indicates a symbol as opposed to a register. */
char *
-ia64_canonicalize_symbol_name (name)
- char *name;
+ia64_canonicalize_symbol_name (char *name)
{
size_t len = strlen (name), full = len;
through, and which use no resources if they do fall through. */
static int
-is_conditional_branch (idesc)
- struct ia64_opcode *idesc;
+is_conditional_branch (struct ia64_opcode *idesc)
{
/* br is a conditional branch. Everything that starts with br. except
br.ia, br.c{loop,top,exit}, and br.w{top,exit} is a conditional branch.
returns zero. */
static int
-is_taken_branch (idesc)
- struct ia64_opcode *idesc;
+is_taken_branch (struct ia64_opcode *idesc)
{
return ((is_conditional_branch (idesc) && CURR_SLOT.qp_regno == 0)
|| strncmp (idesc->name, "br.ia", 5) == 0);
doubt, returns zero. */
static int
-is_interruption_or_rfi (idesc)
- struct ia64_opcode *idesc;
+is_interruption_or_rfi (struct ia64_opcode *idesc)
{
if (strcmp (idesc->name, "rfi") == 0)
return 1;
-1 if there is no dependency. */
static int
-depends_on (depind, idesc)
- int depind;
- struct ia64_opcode *idesc;
+depends_on (int depind, struct ia64_opcode *idesc)
{
int i;
const struct ia64_opcode_dependency *dep = idesc->dependencies;
#define DV_REG 0
static int
-specify_resource (dep, idesc, type, specs, note, path)
- const struct ia64_dependency *dep;
- struct ia64_opcode *idesc;
- int type; /* is this a DV chk or a DV reg? */
- struct rsrc specs[MAX_SPECS]; /* returned specific resources */
- int note; /* resource note for this insn's usage */
- int path; /* which execution path to examine */
+specify_resource (const struct ia64_dependency *dep,
+ struct ia64_opcode *idesc,
+ /* is this a DV chk or a DV reg? */
+ int type,
+ /* returned specific resources */
+ struct rsrc specs[MAX_SPECS],
+ /* resource note for this insn's usage */
+ int note,
+ /* which execution path to examine */
+ int path)
{
int count = 0;
int i;
QP of the marking instruction and a subsequent branch on the same QP. */
static void
-clear_qp_branch_flag (mask)
- valueT mask;
+clear_qp_branch_flag (valueT mask)
{
int i;
for (i = 0; i < regdepslen; i++)
Any changes to a PR clears the mutex relations which include that PR. */
static void
-clear_qp_mutex (mask)
- valueT mask;
+clear_qp_mutex (valueT mask)
{
int i;
indicates the implied PR. */
static void
-clear_qp_implies (p1_mask, p2_mask)
- valueT p1_mask;
- valueT p2_mask;
+clear_qp_implies (valueT p1_mask, valueT p2_mask)
{
int i;
/* Add the PRs specified to the list of implied relations. */
static void
-add_qp_imply (p1, p2)
- int p1, p2;
+add_qp_imply (int p1, int p2)
{
valueT mask;
valueT bit;
the mask. */
static void
-add_qp_mutex (mask)
- valueT mask;
+add_qp_mutex (valueT mask)
{
if (mask & 0x1)
abort ();
}
static int
-has_suffix_p (name, suffix)
- const char *name;
- const char *suffix;
+has_suffix_p (const char *name, const char *suffix)
{
size_t namelen = strlen (name);
size_t sufflen = strlen (suffix);
}
static void
-clear_register_values ()
+clear_register_values (void)
{
int i;
if (md.debug_dv)
have to examine a group of strings to identify them. */
static void
-note_register_values (idesc)
- struct ia64_opcode *idesc;
+note_register_values (struct ia64_opcode *idesc)
{
valueT qp_changemask = 0;
int i;
/* Return whether the given predicate registers are currently mutex. */
static int
-qp_mutex (p1, p2, path)
- int p1;
- int p2;
- int path;
+qp_mutex (int p1, int p2, int path)
{
int i;
valueT mask;
conflict. */
static int
-resources_match (rs, idesc, note, qp_regno, path)
- struct rsrc *rs;
- struct ia64_opcode *idesc;
- int note;
- int qp_regno;
- int path;
+resources_match (struct rsrc *rs,
+ struct ia64_opcode *idesc,
+ int note,
+ int qp_regno,
+ int path)
{
struct rsrc specs[MAX_SPECS];
int count;
instruction. */
static void
-insn_group_break (insert_stop, qp_regno, save_current)
- int insert_stop;
- int qp_regno;
- int save_current;
+insn_group_break (int insert_stop, int qp_regno, int save_current)
{
int i;
/* Add the given resource usage spec to the list of active dependencies. */
static void
-mark_resource (idesc, dep, spec, depind, path)
- struct ia64_opcode *idesc ATTRIBUTE_UNUSED;
- const struct ia64_dependency *dep ATTRIBUTE_UNUSED;
- struct rsrc *spec;
- int depind;
- int path;
+mark_resource (struct ia64_opcode *idesc ATTRIBUTE_UNUSED,
+ const struct ia64_dependency *dep ATTRIBUTE_UNUSED,
+ struct rsrc *spec,
+ int depind,
+ int path)
{
if (regdepslen == regdepstotlen)
{
}
static void
-print_dependency (action, depind)
- const char *action;
- int depind;
+print_dependency (const char *action, int depind)
{
if (md.debug_dv)
{
}
static void
-instruction_serialization ()
+instruction_serialization (void)
{
int i;
if (md.debug_dv)
}
static void
-data_serialization ()
+data_serialization (void)
{
int i = 0;
if (md.debug_dv)
/* Insert stops and serializations as needed to avoid DVs. */
static void
-remove_marked_resource (rs)
- struct rsrc *rs;
+remove_marked_resource (struct rsrc *rs)
{
switch (rs->dependency->semantics)
{
*/
static void
-check_dependencies (idesc)
- struct ia64_opcode *idesc;
+check_dependencies (struct ia64_opcode *idesc)
{
const struct ia64_opcode_dependency *opdeps = idesc->dependencies;
int path;
/* Register new dependencies based on the given opcode. */
static void
-mark_resources (idesc)
- struct ia64_opcode *idesc;
+mark_resources (struct ia64_opcode *idesc)
{
int i;
const struct ia64_opcode_dependency *opdeps = idesc->dependencies;
/* Remove dependencies when they no longer apply. */
static void
-update_dependencies (idesc)
- struct ia64_opcode *idesc;
+update_dependencies (struct ia64_opcode *idesc)
{
int i;
/* Examine the current instruction for dependency violations. */
static int
-check_dv (idesc)
- struct ia64_opcode *idesc;
+check_dv (struct ia64_opcode *idesc)
{
if (md.debug_dv)
{
/* Translate one line of assembly. Pseudo ops and labels do not show
here. */
void
-md_assemble (str)
- char *str;
+md_assemble (char *str)
{
char *saved_input_line_pointer, *mnemonic;
const struct pseudo_opcode *pdesc;
Should be used for dynamic valued symbols only. */
symbolS *
-md_undefined_symbol (name)
- char *name ATTRIBUTE_UNUSED;
+md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
{
return 0;
}
the expression. */
void
-md_operand (e)
- expressionS *e;
+md_operand (expressionS *e)
{
switch (*input_line_pointer)
{
directives we don't want such adjustments since we need to have the
original symbol's name in the reloc. */
int
-ia64_fix_adjustable (fix)
- fixS *fix;
+ia64_fix_adjustable (fixS *fix)
{
/* Prevent all adjustments to global symbols */
if (S_IS_EXTERNAL (fix->fx_addsy) || S_IS_WEAK (fix->fx_addsy))
}
int
-ia64_force_relocation (fix)
- fixS *fix;
+ia64_force_relocation (fixS *fix)
{
switch (fix->fx_r_type)
{
/* Decide from what point a pc-relative relocation is relative to,
relative to the pc-relative fixup. Er, relatively speaking. */
long
-ia64_pcrel_from_section (fix, sec)
- fixS *fix;
- segT sec;
+ia64_pcrel_from_section (fixS *fix, segT sec)
{
unsigned long off = fix->fx_frag->fr_address + fix->fx_where;
fixup. We pick the right reloc code depending on the byteorder
currently in effect. */
void
-ia64_cons_fix_new (f, where, nbytes, exp)
- fragS *f;
- int where;
- int nbytes;
- expressionS *exp;
+ia64_cons_fix_new (fragS *f, int where, int nbytes, expressionS *exp)
{
bfd_reloc_code_real_type code;
fixS *fix;
symbols in the pseudo_func array, or NULL. */
static bfd_reloc_code_real_type
-ia64_gen_real_reloc_type (sym, r_type)
- struct symbol *sym;
- bfd_reloc_code_real_type r_type;
+ia64_gen_real_reloc_type (struct symbol *sym, bfd_reloc_code_real_type r_type)
{
bfd_reloc_code_real_type new = 0;
const char *type = NULL, *suffix = "";
/* Here is where generate the appropriate reloc for pseudo relocation
functions. */
void
-ia64_validate_fix (fix)
- fixS *fix;
+ia64_validate_fix (fixS *fix)
{
switch (fix->fx_r_type)
{
}
static void
-fix_insn (fix, odesc, value)
- fixS *fix;
- const struct ia64_operand *odesc;
- valueT value;
+fix_insn (fixS *fix, const struct ia64_operand *odesc, valueT value)
{
bfd_vma insn[3], t0, t1, control_bits;
const char *err;
(if possible). */
void
-md_apply_fix (fix, valP, seg)
- fixS *fix;
- valueT *valP;
- segT seg ATTRIBUTE_UNUSED;
+md_apply_fix (fixS *fix, valueT *valP, segT seg ATTRIBUTE_UNUSED)
{
char *fixpos;
valueT value = *valP;
fixup used internally in the assembler. */
arelent *
-tc_gen_reloc (sec, fixp)
- asection *sec ATTRIBUTE_UNUSED;
- fixS *fixp;
+tc_gen_reloc (asection *sec ATTRIBUTE_UNUSED, fixS *fixp)
{
arelent *reloc;
/* Handle ia64 specific semantics of the align directive. */
void
-ia64_md_do_align (n, fill, len, max)
- int n ATTRIBUTE_UNUSED;
- const char *fill ATTRIBUTE_UNUSED;
- int len ATTRIBUTE_UNUSED;
- int max ATTRIBUTE_UNUSED;
+ia64_md_do_align (int n ATTRIBUTE_UNUSED,
+ const char *fill ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED,
+ int max ATTRIBUTE_UNUSED)
{
if (subseg_text_p (now_seg))
ia64_flush_insns ();
of an rs_align_code fragment. */
void
-ia64_handle_align (fragp)
- fragS *fragp;
+ia64_handle_align (fragS *fragp)
{
int bytes;
char *p;
}
void
-ia64_elf_section_change_hook (void)
+ia64_elf_section_change_hook (void)
{
if (elf_section_type (now_seg) == SHT_IA_64_UNWIND
&& elf_linked_to_section (now_seg) == NULL)
as_where (&h->file, &h->line);
h->name = name;
- error_string = hash_jam (ahash, alias, (PTR) h);
+ error_string = hash_jam (ahash, alias, (void *) h);
if (error_string)
{
as_fatal (_("inserting \"%s\" into %s alias hash table failed: %s"),
goto out;
}
- error_string = hash_jam (nhash, name, (PTR) alias);
+ error_string = hash_jam (nhash, name, (void *) alias);
if (error_string)
{
as_fatal (_("inserting \"%s\" into %s name hash table failed: %s"),
/* It renames the original symbol name to its alias. */
static void
-do_alias (const char *alias, PTR value)
+do_alias (const char *alias, void *value)
{
struct alias *h = (struct alias *) value;
symbolS *sym = symbol_find (h->name);
/* It renames the original section name to its alias. */
static void
-do_secalias (const char *alias, PTR value)
+do_secalias (const char *alias, void *value)
{
struct alias *h = (struct alias *) value;
segT sec = bfd_get_section_by_name (stdoutput, h->name);
/* 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>
#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
#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
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 */
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 *);
/* 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.
}
/* Worker function for m32c_is_colon_insn(). */
-static char restore_colon PARAMS ((int));
-
static char
restore_colon (int advance_i_l_p_by)
{
/* 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.
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. */
#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)
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)
/* 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
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
/* 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.
{
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);
{
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);
/* 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.
{
hash_err = hash_insert (op_hash,
(optab - 1)->name,
- (PTR) core_optab);
+ (void *) core_optab);
}
}
else if (max_version == bfd_mach_maxq20)
#endif
hash_err = hash_insert (op_hash,
(optab - 1)->name,
- (PTR) core_optab);
+ (void *) core_optab);
#if MAXQ10S
}
}
{
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:
{
#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;
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"),
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);
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);
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);
/* 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).
/* 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[] =
{
#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;
*/
static bfd_boolean
-register_name (expressionP)
- expressionS *expressionP;
+register_name (expressionS *expressionP)
{
int reg_number;
char *name;
/* 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)
{
/* 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. */
}
int
-md_parse_option (c, arg)
- int c;
- char *arg;
+md_parse_option (int c, char *arg)
{
switch (c)
{
}
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
fprintf (stream, _("\
S390 options:\n\
opened. */
void
-md_begin ()
+md_begin (void)
{
register const struct s390_opcode *op;
const struct s390_opcode *op_end;
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"),
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"),
/* 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);
/* 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;
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[] =
{
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[] =
{
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;
/* 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];
/* 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;
/* 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;
/* 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];
#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. */
/* Pseudo-op handling. */
void
-s390_insn (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s390_insn (int ignore ATTRIBUTE_UNUSED)
{
expressionS exp;
const struct s390_opcode *opformat;
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 != '\"')
{
@lit suffix. */
static void
-s390_literals (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s390_literals (int ignore ATTRIBUTE_UNUSED)
{
struct s390_lpe *lpe;
/* 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);
/* 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;
/* 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)
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;
}
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)
/* 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. */
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;
/* 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;
}
void
-s390_cfi_frame_initial_instructions ()
+s390_cfi_frame_initial_instructions (void)
{
cfi_add_CFA_def_cfa (15, s390_arch_size == 64 ? 160 : 96);
}
/* 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).
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
/* 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;
/* 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.
#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
/* 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[] =
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 *);
\f
/* Table of arguments to -A.
The sparc_opcode_arch table in sparc-opc.c is insufficient and incorrect
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;
architecture name. */
static void
-init_default_arch ()
+init_default_arch (void)
{
struct sparc_arch *sa = lookup_arch (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. */
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. */
}
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
const struct sparc_arch *arch;
int column;
};
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;
need. */
void
-md_begin ()
+md_begin (void)
{
register const char *retval = NULL;
int lose = 0;
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"),
}
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"),
/* Called after all assembly has been done. */
void
-sparc_md_end ()
+sparc_md_end (void)
{
unsigned long mach = bfd_mach_sparc;
\f
/* 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 ();
/* 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;
/* 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 ();
}
static int
-sparc_ffs (mask)
- unsigned int mask;
+sparc_ffs (unsigned int mask)
{
int i;
/* 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."));
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
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;
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;
/* Subroutine of sparc_ip to parse an expression. */
static int
-get_expression (str)
- char *str;
+get_expression (char *str)
{
char *save_in;
segT seg;
/* 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);
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);
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;
format. */
arelent **
-tc_gen_reloc (section, fixp)
- asection *section;
- fixS *fixp;
+tc_gen_reloc (asection *section, fixS *fixp)
{
static arelent *relocs[3];
arelent *reloc;
/* 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;
}
/* 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
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;
of two. */
static int
-mylog2 (value)
- int value;
+mylog2 (int value)
{
int shift;
#endif
static void
-s_reserve (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_reserve (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char *p;
}
static void
-s_common (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_common (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char c;
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. */
}
static void
-s_seg (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_seg (int ignore ATTRIBUTE_UNUSED)
{
if (strncmp (input_line_pointer, "\"text\"", 6) == 0)
}
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])
{
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;
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);
}
*/
static void
-s_register (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_register (int ignore ATTRIBUTE_UNUSED)
{
char c;
int reg;
symbols which need it. */
void
-sparc_adjust_symtab ()
+sparc_adjust_symtab (void)
{
symbolS *sym;
option to check for it. */
void
-sparc_cons_align (nbytes)
- int nbytes;
+sparc_cons_align (int nbytes)
{
int nalign;
char *p;
/* 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;
/* 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. */
}
void
-sparc_cons (exp, size)
- expressionS *exp;
- int size;
+sparc_cons (expressionS *exp, int size)
{
char *save;
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;
}
void
-sparc_cfi_frame_initial_instructions ()
+sparc_cfi_frame_initial_instructions (void)
{
cfi_add_CFA_def_cfa (14, sparc_arch_size == 64 ? 0x7ff : 0);
}
/* 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.
#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
/* 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)
/* 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
#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
#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;
/* 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.
/* 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}
};
{
/* 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"),
/* 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.
} 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)
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
/* 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. */
/* 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. */
}
static void
-tic4x_insert_reg (regname, regnum)
- char *regname;
- int regnum;
+tic4x_insert_reg (char *regname, int regnum)
{
char buf[32];
int i;
}
static void
-tic4x_insert_sym (symname, value)
- char *symname;
- int value;
+tic4x_insert_sym (char *symname, int value)
{
symbolS *symbolP;
}
static char *
-tic4x_expression (str, exp)
- char *str;
- expressionS *exp;
+tic4x_expression (char *str, expressionS *exp)
{
char *s;
char *t;
}
static char *
-tic4x_expression_abs (str, value)
- char *str;
- offsetT *value;
+tic4x_expression_abs (char *str, offsetT *value)
{
char *s;
char *t;
}
static void
-tic4x_emit_char (c,b)
- char c;
- int b;
+tic4x_emit_char (char c, int b)
{
expressionS exp;
}
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. */
/* .asg ["]character-string["], symbol */
static void
-tic4x_asg (x)
- int x ATTRIBUTE_UNUSED;
+tic4x_asg (int x ATTRIBUTE_UNUSED)
{
char c;
char *name;
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;
}
static void
-tic4x_globl (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic4x_globl (int ignore ATTRIBUTE_UNUSED)
{
char *name;
int c;
/* Handle .byte, .word. .int, .long */
static void
-tic4x_cons (bytes)
- int bytes;
+tic4x_cons (int bytes)
{
register unsigned int c;
do
/* 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;
/* .eval expression, symbol */
static void
-tic4x_eval (x)
- int x ATTRIBUTE_UNUSED;
+tic4x_eval (int x ATTRIBUTE_UNUSED)
{
char c;
offsetT value;
/* Reset local labels. */
static void
-tic4x_newblock (x)
- int x ATTRIBUTE_UNUSED;
+tic4x_newblock (int x ATTRIBUTE_UNUSED)
{
dollar_label_clear ();
}
/* .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;
/* symbol[:] .set value or .set symbol, value */
static void
-tic4x_set (x)
- int x ATTRIBUTE_UNUSED;
+tic4x_set (int x ATTRIBUTE_UNUSED)
{
symbolS *symbolP;
/* [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;
/* .version cpu-version. */
static void
-tic4x_version (x)
- int x ATTRIBUTE_UNUSED;
+tic4x_version (int x ATTRIBUTE_UNUSED)
{
offsetT temp;
}
static void
-tic4x_init_regtable ()
+tic4x_init_regtable (void)
{
unsigned int i;
}
static void
-tic4x_init_symbols ()
+tic4x_init_symbols (void)
{
/* The TI tools accept case insensitive versions of these symbols,
we don't !
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);
/* 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;
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;
}
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;
}
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;
}
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;
}
static void
-tic4x_insn_check (insn)
- tic4x_insn_t *insn;
+tic4x_insn_check (tic4x_insn_t *insn)
{
if (!strcmp(insn->name, "lda"))
}
static void
-tic4x_insn_output (insn)
- tic4x_insn_t *insn;
+tic4x_insn_output (tic4x_insn_t *insn)
{
char *dst;
/* 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;
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;
}
void
-tic4x_cleanup ()
+tic4x_cleanup (void)
{
if (insn->in_use)
md_assemble (NULL);
}
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;
/* 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;
int
-md_parse_option (c, arg)
- int c;
- char *arg;
+md_parse_option (int c, char *arg)
{
switch (c)
{
}
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
fprintf (stream,
_("\nTIC4X options:\n"
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;
/* 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]))
/* 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
DBcondD, BcondD disp + PC + 3 => PC
*/
long
-md_pcrel_from (fixP)
- fixS *fixP;
+md_pcrel_from (fixS *fixP)
{
unsigned char *buf;
unsigned int op;
/* 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;
/* Look for and remove parallel instruction operator ||. */
void
-tic4x_start_line ()
+tic4x_start_line (void)
{
char *s = input_line_pointer;
}
arelent *
-tc_gen_reloc (seg, fixP)
- asection *seg ATTRIBUTE_UNUSED;
- fixS *fixP;
+tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixP)
{
arelent *reloc;
/* 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)
/* 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()
/* tc-tic54x.c -- Assembly code for the Texas Instruments TMS320C54X
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Timothy Wall (twall@cygnus.com)
} \
while (0)
-static void tic54x_emit_char PARAMS ((char));
-static fragS * frag_prev PARAMS ((fragS *, segT));
-static fragS * bit_offset_frag PARAMS ((fragS *, segT));
-static int frag_bit_offset PARAMS ((fragS *, segT));
-static char * parse_expression PARAMS ((char *, expressionS *));
-static void tic54x_asg PARAMS ((int));
-static void tic54x_eval PARAMS ((int));
-static void tic54x_bss PARAMS ((int));
-static void stag_add_field_symbols PARAMS ((struct stag *, const char *, bfd_vma, symbolS *, const char *));
-static void stag_add_field PARAMS ((struct stag *, const char *, bfd_vma, struct stag *));
-static void tic54x_struct PARAMS ((int));
-static void tic54x_endstruct PARAMS ((int));
-static void tic54x_tag PARAMS ((int));
-static void tic54x_struct_field PARAMS ((int));
-static void tic54x_cons PARAMS ((int));
-static void tic54x_remove_local_label PARAMS ((const char *, PTR));
-static void tic54x_clear_local_labels PARAMS ((int));
-static void tic54x_sect PARAMS ((int));
-static void tic54x_space PARAMS ((int));
-static void tic54x_usect PARAMS ((int));
-static enum cpu_version lookup_version PARAMS ((const char *));
-static void set_cpu PARAMS ((enum cpu_version));
-static void tic54x_version PARAMS ((int));
-static void tic54x_float_cons PARAMS ((int));
-static void tic54x_stringer PARAMS ((int));
-static void tic54x_p2align PARAMS ((int));
-static void tic54x_align_words PARAMS ((int));
-static void tic54x_field PARAMS ((int));
-static int tic54x_initialized_section PARAMS ((segT));
-static void tic54x_clink PARAMS ((int));
-static void tic54x_set_default_include PARAMS ((int));
-static void tic54x_include PARAMS ((int));
-static void tic54x_message PARAMS ((int));
-static void tic54x_label PARAMS ((int));
-static void tic54x_mmregs PARAMS ((int));
-static void tic54x_loop PARAMS ((int));
-static void tic54x_endloop PARAMS ((int));
-static void tic54x_break PARAMS ((int));
-static void set_address_mode PARAMS ((int));
-static void tic54x_address_mode PARAMS ((int));
-static void tic54x_sblock PARAMS ((int));
-static void tic54x_set PARAMS ((int));
-static void tic54x_fclist PARAMS ((int));
-static void tic54x_sslist PARAMS ((int));
-static void tic54x_var PARAMS ((int));
-static void tic54x_mlib PARAMS ((int));
-static int subsym_symlen PARAMS ((char *, char *));
-static int subsym_symcmp PARAMS ((char *, char *));
-static int subsym_firstch PARAMS ((char *, char *));
-static int subsym_lastch PARAMS ((char *, char *));
-static int subsym_isdefed PARAMS ((char *, char *));
-static int subsym_ismember PARAMS ((char *, char *));
-static int subsym_iscons PARAMS ((char *, char *));
-static int subsym_isname PARAMS ((char *, char *));
-static int subsym_isreg PARAMS ((char *, char *));
-static int subsym_structsz PARAMS ((char *, char *));
-static int subsym_structacc PARAMS ((char *, char *));
-static float math_ceil PARAMS ((float, float));
-static float math_cvi PARAMS ((float, float));
-static float math_floor PARAMS ((float, float));
-static float math_fmod PARAMS ((float, float));
-static float math_int PARAMS ((float, float));
-static float math_round PARAMS ((float, float));
-static float math_sgn PARAMS ((float, float));
-static float math_trunc PARAMS ((float, float));
-static float math_acos PARAMS ((float, float));
-static float math_asin PARAMS ((float, float));
-static float math_atan PARAMS ((float, float));
-static float math_atan2 PARAMS ((float, float));
-static float math_cosh PARAMS ((float, float));
-static float math_cos PARAMS ((float, float));
-static float math_cvf PARAMS ((float, float));
-static float math_exp PARAMS ((float, float));
-static float math_fabs PARAMS ((float, float));
-static float math_ldexp PARAMS ((float, float));
-static float math_log10 PARAMS ((float, float));
-static float math_log PARAMS ((float, float));
-static float math_max PARAMS ((float, float));
-static float math_min PARAMS ((float, float));
-static float math_pow PARAMS ((float, float));
-static float math_sin PARAMS ((float, float));
-static float math_sinh PARAMS ((float, float));
-static float math_sqrt PARAMS ((float, float));
-static float math_tan PARAMS ((float, float));
-static float math_tanh PARAMS ((float, float));
-static int is_accumulator PARAMS ((struct opstruct *));
-static int get_operands PARAMS ((struct opstruct operands[], char *));
-static int is_immediate PARAMS ((struct opstruct *));
-static int is_absolute PARAMS ((struct opstruct *));
-static int is_indirect PARAMS ((struct opstruct *));
-static int is_dual PARAMS ((struct opstruct *));
-static int is_mmreg PARAMS ((struct opstruct *));
-static int is_type PARAMS ((struct opstruct *, enum optype));
-static int operands_match PARAMS ((tic54x_insn *, struct opstruct *, int, const enum optype *, int, int));
-static int encode_dmad PARAMS ((tic54x_insn *, struct opstruct *, int));
-static int encode_address PARAMS ((tic54x_insn *, struct opstruct *));
-static int encode_indirect PARAMS ((tic54x_insn *, struct opstruct *));
-static int encode_integer PARAMS ((tic54x_insn *, struct opstruct *, int, int, int, unsigned short));
-static int encode_condition PARAMS ((tic54x_insn *, struct opstruct *));
-static int encode_cc3 PARAMS ((tic54x_insn *, struct opstruct *));
-static int encode_arx PARAMS ((tic54x_insn *, struct opstruct *));
-static int encode_cc2 PARAMS ((tic54x_insn *, struct opstruct *));
-static int encode_operand PARAMS ((tic54x_insn *, enum optype, struct opstruct *));
-static void emit_insn PARAMS ((tic54x_insn *));
-static int build_insn PARAMS ((tic54x_insn *));
-static int optimize_insn PARAMS ((tic54x_insn *));
-static int tic54x_parse_insn PARAMS ((tic54x_insn *, char *));
-static int next_line_shows_parallel PARAMS ((char *));
-static int tic54x_parse_parallel_insn_firstline PARAMS ((tic54x_insn *, char *));
-static int tic54x_parse_parallel_insn_lastline PARAMS ((tic54x_insn *, char *));
-static char * subsym_get_arg PARAMS ((char *, char *, char **, int));
-static void subsym_create_or_replace PARAMS ((char *, char *));
-static char * subsym_lookup PARAMS ((char *, int));
-static char * subsym_substitute PARAMS ((char *, int));
+
+static void subsym_create_or_replace (char *, char *);
+static char *subsym_lookup (char *, int);
+static char *subsym_substitute (char *, int);
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
fprintf (stream, _("C54x-specific command line options:\n"));
fprintf (stream, _("-mfar-mode | -mf Use extended addressing\n"));
/* Output a single character (upper octect is zero). */
static void
-tic54x_emit_char (c)
- char c;
+tic54x_emit_char (char c)
{
expressionS exp;
/* Walk backwards in the frag chain. */
static fragS *
-frag_prev (frag, seg)
- fragS *frag;
- segT seg;
+frag_prev (fragS *frag, segT seg)
{
segment_info_type *seginfo = seg_info (seg);
fragS *fragp;
}
static fragS *
-bit_offset_frag (frag, seg)
- fragS *frag;
- segT seg;
+bit_offset_frag (fragS *frag, segT seg)
{
while (frag != NULL)
{
none. .field/.space/.bes may leave words partially allocated. */
static int
-frag_bit_offset (frag, seg)
- fragS *frag;
- segT seg;
+frag_bit_offset (fragS *frag, segT seg)
{
frag = bit_offset_frag (frag, seg);
expression. */
static char *
-parse_expression (str, exp)
- char *str;
- expressionS * exp;
+parse_expression (char *str, expressionS *exp)
{
char *s;
char *tmp;
unsupported. */
static void
-tic54x_asg (x)
- int x ATTRIBUTE_UNUSED;
+tic54x_asg (int x ATTRIBUTE_UNUSED)
{
int c;
char *name;
table, since that's what works best. */
static void
-tic54x_eval (x)
- int x ATTRIBUTE_UNUSED;
+tic54x_eval (int x ATTRIBUTE_UNUSED)
{
char c;
int value;
(not yet implemented). */
static void
-tic54x_bss (x)
- int x ATTRIBUTE_UNUSED;
+tic54x_bss (int x ATTRIBUTE_UNUSED)
{
char c;
char *name;
}
static void
-stag_add_field_symbols (stag, path, base_offset, rootsym, root_stag_name)
- struct stag *stag;
- const char *path;
- bfd_vma base_offset;
- symbolS *rootsym;
- const char *root_stag_name;
+stag_add_field_symbols (struct stag *stag,
+ const char *path,
+ bfd_vma base_offset,
+ symbolS *rootsym,
+ const char *root_stag_name)
{
char prefix[strlen (path) + 2];
struct stag_field *field = stag->field;
complete dereferencing symbols to the symbol table. */
static void
-stag_add_field (parent, name, offset, stag)
- struct stag *parent;
- const char *name;
- bfd_vma offset;
- struct stag *stag;
+stag_add_field (struct stag *parent,
+ const char *name,
+ bfd_vma offset,
+ struct stag *stag)
{
struct stag_field *sfield = xmalloc (sizeof (struct stag_field));
Start defining structure offsets (symbols in absolute section). */
static void
-tic54x_struct (arg)
- int arg;
+tic54x_struct (int arg)
{
int start_offset = 0;
int is_union = arg;
of the structure. */
static void
-tic54x_endstruct (is_union)
- int is_union;
+tic54x_endstruct (int is_union)
{
int size;
const char *path =
format on the existing allocated space. */
static void
-tic54x_tag (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_tag (int ignore ATTRIBUTE_UNUSED)
{
char *name = input_line_pointer;
int c = get_symbol_end ();
and .word. */
static void
-tic54x_struct_field (type)
- int type;
+tic54x_struct_field (int type)
{
int size;
int count = 1;
/* Handle .byte, .word. .int, .long and all variants. */
static void
-tic54x_cons (type)
- int type;
+tic54x_cons (int type)
{
unsigned int c;
int octets;
these, so we ignore the type here. */
void
-tic54x_global (type)
- int type;
+tic54x_global (int type)
{
char *name;
int c;
/* Remove the symbol from the local label hash lookup. */
static void
-tic54x_remove_local_label (key, value)
- const char *key;
- PTR value ATTRIBUTE_UNUSED;
+tic54x_remove_local_label (const char *key, void *value ATTRIBUTE_UNUSED)
{
- PTR *elem = hash_delete (local_label_hash[macro_level], key, FALSE);
+ void *elem = hash_delete (local_label_hash[macro_level], key, FALSE);
free (elem);
}
/* Reset all local labels. */
static void
-tic54x_clear_local_labels (ignored)
- int ignored ATTRIBUTE_UNUSED;
+tic54x_clear_local_labels (int ignored ATTRIBUTE_UNUSED)
{
hash_traverse (local_label_hash[macro_level], tic54x_remove_local_label);
}
*/
static void
-tic54x_sect (arg)
- int arg;
+tic54x_sect (int arg)
{
ILLEGAL_WITHIN_STRUCT ();
cribbed from s_space. */
static void
-tic54x_space (arg)
- int arg;
+tic54x_space (int arg)
{
expressionS exp;
char *p = 0;
Has no effect on the current section. */
static void
-tic54x_usect (x)
- int x ATTRIBUTE_UNUSED;
+tic54x_usect (int x ATTRIBUTE_UNUSED)
{
char c;
char *name;
}
static enum cpu_version
-lookup_version (ver)
- const char *ver;
+lookup_version (const char *ver)
{
enum cpu_version version = VNONE;
}
static void
-set_cpu (version)
- enum cpu_version version;
+set_cpu (enum cpu_version version)
{
cpu = version;
if (version == V545LP || version == V546LP)
static int cpu_needs_set = 1;
static void
-tic54x_version (x)
- int x ATTRIBUTE_UNUSED;
+tic54x_version (int x ATTRIBUTE_UNUSED)
{
enum cpu_version version = VNONE;
enum cpu_version old_version = cpu;
/* 'f' = float, 'x' = xfloat, 'd' = double, 'l' = ldouble. */
static void
-tic54x_float_cons (type)
- int type;
+tic54x_float_cons (int type)
{
if (current_stag != 0)
tic54x_struct_field ('f');
and encoded into the correct octets. */
static void
-tic54x_stringer (type)
- int type;
+tic54x_stringer (int type)
{
unsigned int c;
char *start;
}
static void
-tic54x_p2align (arg)
- int arg ATTRIBUTE_UNUSED;
+tic54x_p2align (int arg ATTRIBUTE_UNUSED)
{
as_bad (_("p2align not supported on this target"));
}
static void
-tic54x_align_words (arg)
- int arg;
+tic54x_align_words (int arg)
{
/* Only ".align" with no argument is allowed within .struct/.union. */
int count = arg;
/* Initialize multiple-bit fields withing a single word of memory. */
static void
-tic54x_field (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_field (int ignore ATTRIBUTE_UNUSED)
{
expressionS exp;
int size = 16;
available yet. seg_info ()->bss is the next best thing. */
static int
-tic54x_initialized_section (seg)
- segT seg;
+tic54x_initialized_section (segT seg)
{
return !seg_info (seg)->bss;
}
Name is required for uninitialized sections. */
static void
-tic54x_clink (ignored)
- int ignored ATTRIBUTE_UNUSED;
+tic54x_clink (int ignored ATTRIBUTE_UNUSED)
{
segT seg = now_seg;
set to "." instead. */
static void
-tic54x_set_default_include (dot)
- int dot;
+tic54x_set_default_include (int dot)
{
char *dir = ".";
char *tmp = NULL;
Entering/exiting included/copied file clears all local labels. */
static void
-tic54x_include (ignored)
- int ignored ATTRIBUTE_UNUSED;
+tic54x_include (int ignored ATTRIBUTE_UNUSED)
{
char newblock[] = " .newblock\n";
char *filename;
}
static void
-tic54x_message (type)
- int type;
+tic54x_message (int type)
{
char *msg;
char c;
run address (vma). */
static void
-tic54x_label (ignored)
- int ignored ATTRIBUTE_UNUSED;
+tic54x_label (int ignored ATTRIBUTE_UNUSED)
{
char *name = input_line_pointer;
symbolS *symbolP;
absolute local symbols. */
static void
-tic54x_mmregs (ignored)
- int ignored ATTRIBUTE_UNUSED;
+tic54x_mmregs (int ignored ATTRIBUTE_UNUSED)
{
symbol *sym;
Count defaults to 1024. */
static void
-tic54x_loop (count)
- int count;
+tic54x_loop (int count)
{
ILLEGAL_WITHIN_STRUCT ();
/* Normally, endloop gets eaten by the preceding loop. */
static void
-tic54x_endloop (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_endloop (int ignore ATTRIBUTE_UNUSED)
{
as_bad (_("ENDLOOP without corresponding LOOP"));
ignore_rest_of_line ();
/* .break [condition]. */
static void
-tic54x_break (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_break (int ignore ATTRIBUTE_UNUSED)
{
int cond = 1;
}
static void
-set_address_mode (mode)
- int mode;
+set_address_mode (int mode)
{
amode = mode;
if (mode == far_mode)
static int address_mode_needs_set = 1;
static void
-tic54x_address_mode (mode)
- int mode;
+tic54x_address_mode (int mode)
{
if (assembly_begun && amode != (unsigned) mode)
{
Designate initialized sections for blocking. */
static void
-tic54x_sblock (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_sblock (int ignore ATTRIBUTE_UNUSED)
{
int c = ',';
symbols assigned with .set/.equ may not be redefined. */
static void
-tic54x_set (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_set (int ignore ATTRIBUTE_UNUSED)
{
symbolS *symbolP;
char *name;
List false conditional blocks. */
static void
-tic54x_fclist (show)
- int show;
+tic54x_fclist (int show)
{
if (show)
listing &= ~LISTING_NOCOND;
}
static void
-tic54x_sslist (show)
- int show;
+tic54x_sslist (int show)
{
ILLEGAL_WITHIN_STRUCT ();
Define a substitution string to be local to a macro. */
static void
-tic54x_var (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_var (int ignore ATTRIBUTE_UNUSED)
{
static char empty[] = "";
char *name;
FIXME need to try the source file directory as well. */
static void
-tic54x_mlib (ignore)
- int ignore ATTRIBUTE_UNUSED;
+tic54x_mlib (int ignore ATTRIBUTE_UNUSED)
{
char *filename;
char *path;
};
int
-md_parse_option (c, arg)
- int c;
- char *arg;
+md_parse_option (int c, char *arg)
{
switch (c)
{
deleting the local label hash between macro invocations. */
void
-tic54x_macro_start ()
+tic54x_macro_start (void)
{
++macro_level;
subsym_hash[macro_level] = hash_new ();
}
void
-tic54x_macro_info (macro)
- const macro_entry *macro;
+tic54x_macro_info (const macro_entry *macro)
{
const formal_entry *entry;
/* Get rid of this macro's .var's, arguments, and local labels. */
void
-tic54x_macro_end ()
+tic54x_macro_end (void)
{
hash_die (subsym_hash[macro_level]);
subsym_hash[macro_level] = NULL;
}
static int
-subsym_symlen (a, ignore)
- char *a;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_symlen (char *a, char *ignore ATTRIBUTE_UNUSED)
{
return strlen (a);
}
/* Compare symbol A to string B. */
static int
-subsym_symcmp (a, b)
- char *a;
- char *b;
+subsym_symcmp (char *a, char *b)
{
return strcmp (a, b);
}
assumes b is an integer char value as a string. Index is one-based. */
static int
-subsym_firstch (a, b)
- char *a;
- char *b;
+subsym_firstch (char *a, char *b)
{
int val = atoi (b);
char *tmp = strchr (a, val);
/* Similar to firstch, but returns index of last occurrence of B in A. */
static int
-subsym_lastch (a, b)
- char *a;
- char *b;
+subsym_lastch (char *a, char *b)
{
int val = atoi (b);
char *tmp = strrchr (a, val);
symbol table). */
static int
-subsym_isdefed (a, ignore)
- char *a;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_isdefed (char *a, char *ignore ATTRIBUTE_UNUSED)
{
symbolS *symbolP = symbol_find (a);
symbols, unsubstituted. */
static int
-subsym_ismember (sym, list)
- char *sym;
- char *list;
+subsym_ismember (char *sym, char *list)
{
char *elem, *ptr, *listv;
5 if decimal. */
static int
-subsym_iscons (a, ignore)
- char *a;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_iscons (char *a, char *ignore ATTRIBUTE_UNUSED)
{
expressionS exp;
/* Return 1 if A is a valid symbol name. Expects string input. */
static int
-subsym_isname (a, ignore)
- char *a;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_isname (char *a, char *ignore ATTRIBUTE_UNUSED)
{
if (!is_name_beginner (*a))
return 0;
Note this does not recognize "A" or "B" accumulators. */
static int
-subsym_isreg (a, ignore)
- char *a;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_isreg (char *a, char *ignore ATTRIBUTE_UNUSED)
{
if (hash_find (reg_hash, a))
return 1;
/* Return the structure size, given the stag. */
static int
-subsym_structsz (name, ignore)
- char *name;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_structsz (char *name, char *ignore ATTRIBUTE_UNUSED)
{
struct stag *stag = (struct stag *) hash_find (stag_hash, name);
return zero, we punt and return zero. */
static int
-subsym_structacc (stag_name, ignore)
- char *stag_name ATTRIBUTE_UNUSED;
- char *ignore ATTRIBUTE_UNUSED;
+subsym_structacc (char *stag_name ATTRIBUTE_UNUSED,
+ char *ignore ATTRIBUTE_UNUSED)
{
return 0;
}
static float
-math_ceil (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_ceil (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) ceil (arg1);
}
static float
-math_cvi (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_cvi (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (int) arg1;
}
static float
-math_floor (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_floor (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) floor (arg1);
}
static float
-math_fmod (arg1, arg2)
- float arg1;
- float arg2;
+math_fmod (float arg1, float arg2)
{
return (int) arg1 % (int) arg2;
}
static float
-math_int (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_int (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return ((float) ((int) arg1)) == arg1;
}
static float
-math_round (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_round (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return arg1 > 0 ? (int) (arg1 + 0.5) : (int) (arg1 - 0.5);
}
static float
-math_sgn (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_sgn (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (arg1 < 0) ? -1 : (arg1 ? 1 : 0);
}
static float
-math_trunc (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_trunc (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (int) arg1;
}
static float
-math_acos (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_acos (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) acos (arg1);
}
static float
-math_asin (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_asin (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) asin (arg1);
}
static float
-math_atan (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_atan (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) atan (arg1);
}
static float
-math_atan2 (arg1, arg2)
- float arg1;
- float arg2;
+math_atan2 (float arg1, float arg2)
{
return (float) atan2 (arg1, arg2);
}
static float
-math_cosh (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_cosh (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) cosh (arg1);
}
static float
-math_cos (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_cos (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) cos (arg1);
}
static float
-math_cvf (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_cvf (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) arg1;
}
static float
-math_exp (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_exp (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) exp (arg1);
}
static float
-math_fabs (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_fabs (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) fabs (arg1);
}
/* expr1 * 2^expr2. */
static float
-math_ldexp (arg1, arg2)
- float arg1;
- float arg2;
+math_ldexp (float arg1, float arg2)
{
return arg1 * (float) pow (2.0, arg2);
}
static float
-math_log10 (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_log10 (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) log10 (arg1);
}
static float
-math_log (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_log (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) log (arg1);
}
static float
-math_max (arg1, arg2)
- float arg1;
- float arg2;
+math_max (float arg1, float arg2)
{
return (arg1 > arg2) ? arg1 : arg2;
}
static float
-math_min (arg1, arg2)
- float arg1;
- float arg2;
+math_min (float arg1, float arg2)
{
return (arg1 < arg2) ? arg1 : arg2;
}
static float
-math_pow (arg1, arg2)
- float arg1;
- float arg2;
+math_pow (float arg1, float arg2)
{
return (float) pow (arg1, arg2);
}
static float
-math_sin (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_sin (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) sin (arg1);
}
static float
-math_sinh (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_sinh (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) sinh (arg1);
}
static float
-math_sqrt (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_sqrt (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) sqrt (arg1);
}
static float
-math_tan (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_tan (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) tan (arg1);
}
static float
-math_tanh (arg1, ignore)
- float arg1;
- float ignore ATTRIBUTE_UNUSED;
+math_tanh (float arg1, float ignore ATTRIBUTE_UNUSED)
{
return (float) tanh (arg1);
}
typedef struct
{
char *name;
- int (*proc) PARAMS ((char *, char *));
+ int (*proc) (char *, char *);
int nargs;
} subsym_proc_entry;
typedef struct
{
char *name;
- float (*proc) PARAMS ((float, float));
+ float (*proc) (float, float);
int nargs;
int int_return;
} math_proc_entry;
};
void
-md_begin ()
+md_begin (void)
{
template *tm;
symbol *sym;
}
static int
-is_accumulator (operand)
- struct opstruct *operand;
+is_accumulator (struct opstruct *operand)
{
return strcasecmp (operand->buf, "a") == 0
|| strcasecmp (operand->buf, "b") == 0;
the next array. */
static int
-get_operands (operands, line)
- struct opstruct operands[];
- char *line;
+get_operands (struct opstruct operands[], char *line)
{
char *lptr = line;
int numexp = 0;
/* Predicates for different operand types. */
static int
-is_immediate (operand)
- struct opstruct *operand;
+is_immediate (struct opstruct *operand)
{
return *operand->buf == '#';
}
and must *not* have the '#' prefix. */
static int
-is_absolute (operand)
- struct opstruct *operand;
+is_absolute (struct opstruct *operand)
{
return operand->exp.X_op == O_constant && !is_immediate (operand);
}
/* Is this an indirect operand? */
static int
-is_indirect (operand)
- struct opstruct *operand;
+is_indirect (struct opstruct *operand)
{
return operand->buf[0] == '*';
}
/* Is this a valid dual-memory operand? */
static int
-is_dual (operand)
- struct opstruct *operand;
+is_dual (struct opstruct *operand)
{
if (is_indirect (operand) && strncasecmp (operand->buf, "*ar", 3) == 0)
{
}
static int
-is_mmreg (operand)
- struct opstruct *operand;
+is_mmreg (struct opstruct *operand)
{
return (is_absolute (operand)
|| is_immediate (operand)
}
static int
-is_type (operand, type)
- struct opstruct *operand;
- enum optype type;
+is_type (struct opstruct *operand, enum optype type)
{
switch (type)
{
}
static int
-operands_match (insn, operands, opcount, refoptype, minops, maxops)
- tic54x_insn *insn;
- struct opstruct *operands;
- int opcount;
- const enum optype *refoptype;
- int minops;
- int maxops;
+operands_match (tic54x_insn *insn,
+ struct opstruct *operands,
+ int opcount,
+ const enum optype *refoptype,
+ int minops,
+ int maxops)
{
int op = 0, refop = 0;
2 for the upper 7 bits of a 23-bit address (LDX). */
static int
-encode_dmad (insn, operand, xpc_code)
- tic54x_insn *insn;
- struct opstruct *operand;
- int xpc_code;
+encode_dmad (tic54x_insn *insn, struct opstruct *operand, int xpc_code)
{
int op = 1 + insn->is_lkaddr;
/* 7-bit direct address encoding. */
static int
-encode_address (insn, operand)
- tic54x_insn *insn;
- struct opstruct *operand;
+encode_address (tic54x_insn *insn, struct opstruct *operand)
{
/* Assumes that dma addresses are *always* in word 0 of the opcode. */
insn->opcode[0].addr_expr = operand->exp;
}
static int
-encode_indirect (insn, operand)
- tic54x_insn *insn;
- struct opstruct *operand;
+encode_indirect (tic54x_insn *insn, struct opstruct *operand)
{
int arf;
int mod;
}
static int
-encode_integer (insn, operand, which, min, max, mask)
- tic54x_insn *insn;
- struct opstruct *operand;
- int which;
- int min;
- int max;
- unsigned short mask;
+encode_integer (tic54x_insn *insn,
+ struct opstruct *operand,
+ int which,
+ int min,
+ int max,
+ unsigned short mask)
{
long parse, integer;
}
static int
-encode_condition (insn, operand)
- tic54x_insn *insn;
- struct opstruct *operand;
+encode_condition (tic54x_insn *insn, struct opstruct *operand)
{
symbol *cc = (symbol *) hash_find (cc_hash, operand->buf);
if (!cc)
}
static int
-encode_cc3 (insn, operand)
- tic54x_insn *insn;
- struct opstruct *operand;
+encode_cc3 (tic54x_insn *insn, struct opstruct *operand)
{
symbol *cc3 = (symbol *) hash_find (cc3_hash, operand->buf);
int value = cc3 ? cc3->value : operand->exp.X_add_number << 8;
}
static int
-encode_arx (insn, operand)
- tic54x_insn *insn;
- struct opstruct *operand;
+encode_arx (tic54x_insn *insn, struct opstruct *operand)
{
int arf = strlen (operand->buf) >= 3 ? operand->buf[2] - '0' : -1;
}
static int
-encode_cc2 (insn, operand)
- tic54x_insn *insn;
- struct opstruct *operand;
+encode_cc2 (tic54x_insn *insn, struct opstruct *operand)
{
symbol *cc2 = (symbol *) hash_find (cc2_hash, operand->buf);
}
static int
-encode_operand (insn, type, operand)
- tic54x_insn *insn;
- enum optype type;
- struct opstruct *operand;
+encode_operand (tic54x_insn *insn, enum optype type, struct opstruct *operand)
{
int ext = (insn->tm->flags & FL_EXT) != 0;
}
static void
-emit_insn (insn)
- tic54x_insn *insn;
+emit_insn (tic54x_insn *insn)
{
int i;
flagword oldflags = bfd_get_section_flags (stdoutput, now_seg);
return the total number of words used by the instruction. */
static int
-build_insn (insn)
- tic54x_insn *insn;
+build_insn (tic54x_insn *insn)
{
int i;
}
static int
-optimize_insn (insn)
- tic54x_insn *insn;
+optimize_insn (tic54x_insn *insn)
{
/* Optimize some instructions, helping out the brain-dead programmer. */
#define is_zero(op) ((op).exp.X_op == O_constant && (op).exp.X_add_number == 0)
/* Find a matching template if possible, and get the operand strings. */
static int
-tic54x_parse_insn (insn, line)
- tic54x_insn *insn;
- char *line;
+tic54x_parse_insn (tic54x_insn *insn, char *line)
{
insn->tm = (template *) hash_find (op_hash, insn->mnemonic);
if (!insn->tm)
Look for a subsequent line starting with "||". */
static int
-next_line_shows_parallel (next_line)
- char *next_line;
+next_line_shows_parallel (char *next_line)
{
/* Look for the second half. */
while (ISSPACE (*next_line))
}
static int
-tic54x_parse_parallel_insn_firstline (insn, line)
- tic54x_insn *insn;
- char *line;
+tic54x_parse_parallel_insn_firstline (tic54x_insn *insn, char *line)
{
insn->tm = (template *) hash_find (parop_hash, insn->mnemonic);
if (!insn->tm)
/* Parse the second line of a two-line parallel instruction. */
static int
-tic54x_parse_parallel_insn_lastline (insn, line)
- tic54x_insn *insn;
- char *line;
+tic54x_parse_parallel_insn_lastline (tic54x_insn *insn, char *line)
{
int valid_mnemonic = 0;
replacement on the value. */
static char *
-subsym_get_arg (line, terminators, str, nosub)
- char *line;
- char *terminators;
- char **str;
- int nosub;
+subsym_get_arg (char *line, char *terminators, char **str, int nosub)
{
char *ptr = line;
char *endp;
that's compatible w/TI's assembler. */
static void
-subsym_create_or_replace (name, value)
- char *name;
- char *value;
+subsym_create_or_replace (char *name, char *value)
{
int i;
outwards. */
static char *
-subsym_lookup (name, nest_level)
- char *name;
- int nest_level;
+subsym_lookup (char *name, int nest_level)
{
char *value = hash_find (subsym_hash[nest_level], name);
If FORCED is set, look for forced substitutions of the form ':SYMBOL:'. */
static char *
-subsym_substitute (line, forced)
- char * line;
- int forced;
+subsym_substitute (char *line, int forced)
{
/* For each apparent symbol, see if it's a substitution symbol, and if so,
replace it in the input. */
returns the new buffer limit. */
void
-tic54x_start_line_hook ()
+tic54x_start_line_hook (void)
{
char *line, *endp;
char *replacement = NULL;
machine dependent instruction. This function is supposed to emit
the frags/bytes it assembles to. */
void
-md_assemble (line)
- char *line;
+md_assemble (char *line)
{
static int repeat_slot = 0;
static int delay_slots = 0; /* How many delay slots left to fill? */
a ".file" symbol. */
void
-tic54x_adjust_symtab ()
+tic54x_adjust_symtab (void)
{
if (symbol_rootP == NULL
|| S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE)
FIXME -- obviously this isn't done yet. These locals still show up in the
symbol table. */
void
-tic54x_define_label (sym)
- symbolS *sym;
+tic54x_define_label (symbolS *sym)
{
/* Just in case we need this later; note that this is not necessarily the
same thing as line_label...
/* Try to parse something that normal parsing failed at. */
symbolS *
-tic54x_undefined_symbol (name)
- char *name;
+tic54x_undefined_symbol (char *name)
{
symbol *sym;
it. */
int
-tic54x_parse_name (name, exp)
- char *name ATTRIBUTE_UNUSED;
- expressionS *exp ATTRIBUTE_UNUSED;
+tic54x_parse_name (char *name ATTRIBUTE_UNUSED,
+ expressionS *exp ATTRIBUTE_UNUSED)
{
return 0;
}
}
arelent *
-tc_gen_reloc (section, fixP)
- asection *section;
- fixS *fixP;
+tc_gen_reloc (asection *section, fixS *fixP)
{
arelent *rel;
bfd_reloc_code_real_type code = fixP->fx_r_type;
/* Handle cons expressions. */
void
-tic54x_cons_fix_new (frag, where, octets, exp)
- fragS *frag;
- int where;
- int octets;
- expressionS *exp;
+tic54x_cons_fix_new (fragS *frag, int where, int octets, expressionS *exp)
{
bfd_reloc_code_real_type r;
If fixp->fx_addsy is non-NULL, we'll have to generate a reloc entry. */
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 *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT val = * valP;
don't need to do anything here, since BFD does the proper encoding. */
valueT
-md_section_align (segment, section_size)
- segT segment ATTRIBUTE_UNUSED;
- valueT section_size;
+md_section_align (segT segment ATTRIBUTE_UNUSED, valueT section_size)
{
return section_size;
}
long
-md_pcrel_from (fixP)
- fixS *fixP ATTRIBUTE_UNUSED;
+md_pcrel_from (fixS *fixP ATTRIBUTE_UNUSED)
{
return 0;
}
first. */
void
-tic54x_number_to_chars (buf, val, n)
- char *buf;
- valueT val;
- int n;
+tic54x_number_to_chars (char *buf, valueT val, int n)
{
if (n != 4)
number_to_chars_littleendian (buf, val, n);
}
int
-tic54x_estimate_size_before_relax (frag, seg)
- fragS *frag ATTRIBUTE_UNUSED;
- segT seg ATTRIBUTE_UNUSED;
+tic54x_estimate_size_before_relax (fragS *frag ATTRIBUTE_UNUSED,
+ segT seg ATTRIBUTE_UNUSED)
{
return 0;
}
to symbols being in different frags. return number of octets added. */
int
-tic54x_relax_frag (frag, stretch)
- fragS *frag;
- long stretch ATTRIBUTE_UNUSED;
+tic54x_relax_frag (fragS *frag, long stretch ATTRIBUTE_UNUSED)
{
symbolS *sym = frag->fr_symbol;
int growth = 0;
}
void
-tic54x_convert_frag (abfd, seg, frag)
- bfd *abfd ATTRIBUTE_UNUSED;
- segT seg ATTRIBUTE_UNUSED;
- fragS *frag;
+tic54x_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
+ segT seg ATTRIBUTE_UNUSED,
+ fragS *frag)
{
/* Offset is in bytes. */
frag->fr_offset = (frag->fr_next->fr_address
Don't allow labels to start with '.' */
int
-tic54x_start_label (c, rest)
- int c;
- char *rest;
+tic54x_start_label (int c, char *rest)
{
/* If within .struct/.union, no auto line labels, please. */
if (current_stag != NULL)
/* 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.
/* 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
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);
/* 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.
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);
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
/* 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
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;
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;
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;
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
}
\f
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;
/* 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;
/* 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;
/* 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;
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;
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;
}
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);
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);