This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] tic4x warning fixups
Alan Modra wrote:
Please consistently use either K&R style function definitions and
declarations, or ISO style (without PARAMS), in your target files.
Fixed.
ChangeLog:
2002-09-16 Svein E. Seldal <Svein.Seldal@solidas.com>
* bfd/coff-tic4x.c: Added function decleations and ATTRIBUTE_USED
flags to reduce the number of warnings.
* bfd/cpu-tic4x.c: Ditto
* gas/config/tc-tic4x.c: Ditto and converted all C-functions to
K&R format.
* opcodes/tic4x-dis.c: Ditto and converted all C-functions to K&R.
Index: bfd/coff-tic4x.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic4x.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 coff-tic4x.c
*** bfd/coff-tic4x.c 28 Aug 2002 10:38:44 -0000 1.1
--- bfd/coff-tic4x.c 16 Sep 2002 16:16:58 -0000
***************
*** 30,38 ****
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
static boolean
ticoff0_bad_format_hook (abfd, filehdr)
! bfd *abfd;
PTR filehdr;
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
--- 30,56 ----
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
+ static boolean ticoff0_bad_format_hook
+ PARAMS ((bfd *, PTR ));
+ static boolean ticoff1_bad_format_hook
+ PARAMS ((bfd *, PTR ));
+ static boolean ticoff_bfd_is_local_label_name
+ PARAMS ((bfd *, const char *));
+ static bfd_reloc_status_type tic4x_relocation
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char ** ));
+ static reloc_howto_type *tic4x_coff_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type ));
+ static void tic4x_lookup_howto
+ PARAMS ((arelent *, struct internal_reloc * ));
+ static reloc_howto_type *coff_tic4x_rtype_to_howto
+ PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma * ));
+ static void tic4x_reloc_processing
+ PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection * ));
+
+
static boolean
ticoff0_bad_format_hook (abfd, filehdr)
! bfd *abfd ATTRIBUTE_UNUSED;
PTR filehdr;
{
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
*************** ticoff_bfd_is_local_label_name (abfd, na
*** 69,77 ****
}
#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
-
- static void tic4x_reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
#define RELOC_PROCESSING(RELENT,RELOC,SYMS,ABFD,SECT)\
tic4x_reloc_processing (RELENT,RELOC,SYMS,ABFD,SECT)
--- 87,92 ----
Index: bfd/cpu-tic4x.c
===================================================================
RCS file: /cvs/src/src/bfd/cpu-tic4x.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 cpu-tic4x.c
*** bfd/cpu-tic4x.c 28 Aug 2002 10:38:45 -0000 1.1
--- bfd/cpu-tic4x.c 16 Sep 2002 16:17:03 -0000
***************
*** 23,28 ****
--- 23,32 ----
#include "sysdep.h"
#include "libbfd.h"
+ static boolean c4x_scan
+ PARAMS ((const struct bfd_arch_info *, const char * ));
+
+
static boolean
c4x_scan (info, string)
const struct bfd_arch_info *info;
Index: gas/config/tc-tic4x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 tc-tic4x.c
*** gas/config/tc-tic4x.c 28 Aug 2002 10:38:48 -0000 1.1
--- gas/config/tc-tic4x.c 16 Sep 2002 16:17:58 -0000
*************** c4x_insn_t;
*** 101,117 ****
static c4x_insn_t the_insn; /* Info about our instruction. */
static c4x_insn_t *insn = &the_insn;
! static void c4x_asg PARAMS ((int));
! static void c4x_bss PARAMS ((int));
! static void c4x_globl PARAMS ((int));
! static void c4x_eval PARAMS ((int));
! static void c4x_cons PARAMS ((int));
! static void c4x_set PARAMS ((int));
! static void c4x_newblock PARAMS ((int));
! static void c4x_pseudo_ignore PARAMS ((int));
! static void c4x_sect PARAMS ((int));
! static void c4x_usect PARAMS ((int));
! static void c4x_version PARAMS ((int));
const pseudo_typeS
md_pseudo_table[] =
--- 101,207 ----
static c4x_insn_t the_insn; /* Info about our instruction. */
static c4x_insn_t *insn = &the_insn;
! int c4x_gen_to_words
! PARAMS ((FLONUM_TYPE, LITTLENUM_TYPE *, int ));
! char *c4x_atof
! PARAMS ((char *, char, LITTLENUM_TYPE * ));
! static void c4x_insert_reg
! PARAMS ((char *, int ));
! static void c4x_insert_sym
! PARAMS ((char *, int ));
! static char *c4x_expression
! PARAMS ((char *, expressionS *));
! static char *c4x_expression_abs
! PARAMS ((char *, int *));
! static void c4x_emit_char
! PARAMS ((char));
! static void c4x_seg_alloc
! PARAMS ((char *, segT, int, symbolS *));
! static void c4x_asg
! PARAMS ((int));
! static void c4x_bss
! PARAMS ((int));
! void c4x_globl
! PARAMS ((int));
! static void c4x_cons
! PARAMS ((int));
! static void c4x_eval
! PARAMS ((int));
! static void c4x_newblock
! PARAMS ((int));
! static void c4x_sect
! PARAMS ((int));
! static void c4x_set
! PARAMS ((int));
! static void c4x_usect
! PARAMS ((int));
! static void c4x_version
! PARAMS ((int));
! static void c4x_pseudo_ignore
! PARAMS ((int));
! static void c4x_init_regtable
! PARAMS ((void));
! static void c4x_init_symbols
! PARAMS ((void));
! static int c4x_inst_insert
! PARAMS ((c4x_inst_t *));
! static c4x_inst_t *c4x_inst_make
! PARAMS ((char *, unsigned long, char *));
! static int c4x_inst_add
! PARAMS ((c4x_inst_t *));
! void md_begin
! PARAMS ((void));
! void c4x_end
! PARAMS ((void));
! static int c4x_indirect_parse
! PARAMS ((c4x_operand_t *, const c4x_indirect_t *));
! char *c4x_operand_parse
! PARAMS ((char *, c4x_operand_t *));
! static int c4x_operands_match
! PARAMS ((c4x_inst_t *, c4x_insn_t *));
! void c4x_insn_output
! PARAMS ((c4x_insn_t *));
! int c4x_operands_parse
! PARAMS ((char *, c4x_operand_t *, int ));
! void md_assemble
! PARAMS ((char *));
! void c4x_cleanup
! PARAMS ((void));
! char *md_atof
! PARAMS ((int, char *, int *));
! void md_apply_fix3
! PARAMS ((fixS *, valueT *, segT ));
! void md_convert_frag
! PARAMS ((bfd *, segT, fragS *));
! void md_create_short_jump
! PARAMS ((char *, addressT, addressT, fragS *, symbolS *));
! void md_create_long_jump
! PARAMS ((char *, addressT, addressT, fragS *, symbolS *));
! int md_estimate_size_before_relax
! PARAMS ((register fragS *, segT));
! int md_parse_option
! PARAMS ((int, char *));
! void md_show_usage
! PARAMS ((FILE *));
! int c4x_unrecognized_line
! PARAMS ((int));
! symbolS *md_undefined_symbol
! PARAMS ((char *));
! void md_operand
! PARAMS ((expressionS *));
! valueT md_section_align
! PARAMS ((segT, valueT));
! static int c4x_pc_offset
! PARAMS ((unsigned int));
! long md_pcrel_from
! PARAMS ((fixS *));
! int c4x_do_align
! PARAMS ((int, const char *, int, int));
! void c4x_start_line
! PARAMS ((void));
! arelent *tc_gen_reloc
! PARAMS ((asection *, fixS *));
!
const pseudo_typeS
md_pseudo_table[] =
*************** extern FLONUM_TYPE generic_floating_poin
*** 203,211 ****
#define F_PRECISION (2) /* Float and double types 32-bit. */
#define GUARD (2)
/* Turn generic_floating_point_number into a real short/float/double. */
int
! c4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision)
{
int return_value = 0;
LITTLENUM_TYPE *p; /* Littlenum pointer. */
--- 293,305 ----
#define F_PRECISION (2) /* Float and double types 32-bit. */
#define GUARD (2)
+
/* Turn generic_floating_point_number into a real short/float/double. */
int
! c4x_gen_to_words (flonum, words, precision)
! FLONUM_TYPE flonum;
! LITTLENUM_TYPE *words;
! int precision;
{
int return_value = 0;
LITTLENUM_TYPE *p; /* Littlenum pointer. */
*************** c4x_gen_to_words (FLONUM_TYPE flonum, LI
*** 467,473 ****
/* Returns pointer past text consumed. */
char *
! c4x_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. */
--- 561,570 ----
/* Returns pointer past text consumed. */
char *
! c4x_atof (str, what_kind, words)
! 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. */
*************** c4x_atof (char *str, char what_kind, LIT
*** 535,541 ****
}
static void
! c4x_insert_reg (char *regname, int regnum)
{
char buf[32];
int i;
--- 632,640 ----
}
static void
! c4x_insert_reg (regname, regnum)
! char *regname;
! int regnum;
{
char buf[32];
int i;
*************** c4x_insert_reg (char *regname, int regnu
*** 551,557 ****
}
static void
! c4x_insert_sym (char *symname, int value)
{
symbolS *symbolP;
--- 650,658 ----
}
static void
! c4x_insert_sym (symname, value)
! char *symname;
! int value;
{
symbolS *symbolP;
*************** c4x_insert_sym (char *symname, int value
*** 562,568 ****
}
static char *
! c4x_expression (char *str, expressionS *exp)
{
char *s;
char *t;
--- 663,671 ----
}
static char *
! c4x_expression (str, exp)
! char *str;
! expressionS *exp;
{
char *s;
char *t;
*************** c4x_expression (char *str, expressionS *
*** 576,582 ****
}
static char *
! c4x_expression_abs (char *str, int *value)
{
char *s;
char *t;
--- 679,687 ----
}
static char *
! c4x_expression_abs (str, value)
! char *str;
! int *value;
{
char *s;
char *t;
*************** c4x_expression_abs (char *str, int *valu
*** 590,596 ****
}
static void
! c4x_emit_char (char c)
{
expressionS exp;
--- 695,702 ----
}
static void
! c4x_emit_char (c)
! char c;
{
expressionS exp;
*************** c4x_emit_char (char c)
*** 600,606 ****
}
static void
! c4x_seg_alloc (char *name, segT seg, 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. */
--- 706,716 ----
}
static void
! c4x_seg_alloc (name, seg, size, symbolP)
! 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. */
*************** c4x_seg_alloc (char *name, segT seg, int
*** 622,628 ****
/* .asg ["]character-string["], symbol */
static void
! c4x_asg (int x)
{
char c;
char *name;
--- 732,739 ----
/* .asg ["]character-string["], symbol */
static void
! c4x_asg (x)
! int x ATTRIBUTE_UNUSED;
{
char c;
char *name;
*************** c4x_asg (int x)
*** 659,665 ****
/* .bss symbol, size */
static void
! c4x_bss (int x)
{
char c;
char *name;
--- 770,777 ----
/* .bss symbol, size */
static void
! c4x_bss (x)
! int x ATTRIBUTE_UNUSED;
{
char c;
char *name;
*************** c4x_bss (int x)
*** 713,719 ****
}
void
! c4x_globl (int ignore)
{
char *name;
int c;
--- 825,832 ----
}
void
! c4x_globl (ignore)
! int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
*************** c4x_globl (int ignore)
*** 742,748 ****
/* Handle .byte, .word. .int, .long */
static void
! c4x_cons (int bytes)
{
register unsigned int c;
do
--- 855,862 ----
/* Handle .byte, .word. .int, .long */
static void
! c4x_cons (bytes)
! int bytes;
{
register unsigned int c;
do
*************** c4x_cons (int bytes)
*** 785,791 ****
/* .eval expression, symbol */
static void
! c4x_eval (int x)
{
char c;
int value;
--- 899,906 ----
/* .eval expression, symbol */
static void
! c4x_eval (x)
! int x ATTRIBUTE_UNUSED;
{
char c;
int value;
*************** c4x_eval (int x)
*** 807,813 ****
/* Reset local labels. */
static void
! c4x_newblock (int x)
{
dollar_label_clear ();
}
--- 922,929 ----
/* Reset local labels. */
static void
! c4x_newblock (x)
! int x ATTRIBUTE_UNUSED;
{
dollar_label_clear ();
}
*************** c4x_newblock (int x)
*** 815,821 ****
/* .sect "section-name" [, value] */
/* .sect ["]section-name[:subsection-name]["] [, value] */
static void
! c4x_sect (int x)
{
char c;
char *section_name;
--- 931,938 ----
/* .sect "section-name" [, value] */
/* .sect ["]section-name[:subsection-name]["] [, value] */
static void
! c4x_sect (x)
! int x ATTRIBUTE_UNUSED;
{
char c;
char *section_name;
*************** c4x_sect (int x)
*** 888,894 ****
/* symbol[:] .set value or .set symbol, value */
static void
! c4x_set (int x)
{
symbolS *symbolP;
--- 1005,1012 ----
/* symbol[:] .set value or .set symbol, value */
static void
! c4x_set (x)
! int x ATTRIBUTE_UNUSED;
{
symbolS *symbolP;
*************** c4x_set (int x)
*** 917,923 ****
/* [symbol] .usect ["]section-name["], size-in-words [, alignment-flag] */
static void
! c4x_usect (int x)
{
char c;
char *name;
--- 1035,1042 ----
/* [symbol] .usect ["]section-name["], size-in-words [, alignment-flag] */
static void
! c4x_usect (x)
! int x ATTRIBUTE_UNUSED;
{
char c;
char *name;
*************** c4x_usect (int x)
*** 983,989 ****
/* .version cpu-version. */
static void
! c4x_version (int x)
{
unsigned int temp;
--- 1102,1109 ----
/* .version cpu-version. */
static void
! c4x_version (x)
! int x ATTRIBUTE_UNUSED;
{
unsigned int temp;
*************** c4x_version (int x)
*** 1000,1006 ****
}
static void
! c4x_pseudo_ignore (int x)
{
/* We could print warning message here... */
--- 1120,1127 ----
}
static void
! c4x_pseudo_ignore (x)
! int x ATTRIBUTE_UNUSED;
{
/* We could print warning message here... */
*************** c4x_pseudo_ignore (int x)
*** 1009,1015 ****
}
static void
! c4x_init_regtable (void)
{
unsigned int i;
--- 1130,1136 ----
}
static void
! c4x_init_regtable ()
{
unsigned int i;
*************** c4x_init_regtable (void)
*** 1027,1033 ****
}
static void
! c4x_init_symbols (void)
{
/* The TI tools accept case insensitive versions of these symbols,
we don't !
--- 1148,1154 ----
}
static void
! c4x_init_symbols ()
{
/* The TI tools accept case insensitive versions of these symbols,
we don't !
*************** c4x_init_symbols (void)
*** 1082,1088 ****
/* Insert a new instruction template into hash table. */
static int
! c4x_inst_insert (c4x_inst_t *inst)
{
static char prev_name[16];
const char *retval = NULL;
--- 1203,1210 ----
/* Insert a new instruction template into hash table. */
static int
! c4x_inst_insert (inst)
! c4x_inst_t *inst;
{
static char prev_name[16];
const char *retval = NULL;
*************** c4x_inst_insert (c4x_inst_t *inst)
*** 1102,1108 ****
/* Make a new instruction template. */
static c4x_inst_t *
! c4x_inst_make (char *name, unsigned long opcode, char *args)
{
static c4x_inst_t *insts = NULL;
static char *names = NULL;
--- 1224,1233 ----
/* Make a new instruction template. */
static c4x_inst_t *
! c4x_inst_make (name, opcode, args)
! char *name;
! unsigned long opcode;
! char *args;
{
static c4x_inst_t *insts = NULL;
static char *names = NULL;
*************** c4x_inst_make (char *name, unsigned long
*** 1132,1138 ****
/* Add instruction template, creating dynamic templates as required. */
static int
! c4x_inst_add (c4x_inst_t *insts)
{
char *s = insts->name;
char *d;
--- 1257,1264 ----
/* Add instruction template, creating dynamic templates as required. */
static int
! c4x_inst_add (insts)
! c4x_inst_t *insts;
{
char *s = insts->name;
char *d;
*************** c4x_inst_add (c4x_inst_t *insts)
*** 1198,1204 ****
set up all the tables, etc., that the MD part of the assembler will
need. */
void
! md_begin (void)
{
int ok = 1;
unsigned int i;
--- 1324,1330 ----
set up all the tables, etc., that the MD part of the assembler will
need. */
void
! md_begin ()
{
int ok = 1;
unsigned int i;
*************** md_begin (void)
*** 1233,1247 ****
}
void
! c4x_end (void)
{
bfd_set_arch_mach (stdoutput, bfd_arch_tic4x,
IS_CPU_C4X (c4x_cpu) ? bfd_mach_c4x : bfd_mach_c3x);
}
static int
! c4x_indirect_parse (c4x_operand_t *operand,
! const c4x_indirect_t *indirect)
{
char *n = indirect->name;
char *s = input_line_pointer;
--- 1359,1374 ----
}
void
! c4x_end ()
{
bfd_set_arch_mach (stdoutput, bfd_arch_tic4x,
IS_CPU_C4X (c4x_cpu) ? bfd_mach_c4x : bfd_mach_c3x);
}
static int
! c4x_indirect_parse (operand, indirect)
! c4x_operand_t *operand;
! const c4x_indirect_t *indirect;
{
char *n = indirect->name;
char *s = input_line_pointer;
*************** c4x_indirect_parse (c4x_operand_t *opera
*** 1339,1345 ****
}
char *
! c4x_operand_parse (char *s, c4x_operand_t *operand)
{
unsigned int i;
char c;
--- 1466,1474 ----
}
char *
! c4x_operand_parse (s, operand)
! char *s;
! c4x_operand_t *operand;
{
unsigned int i;
char c;
*************** c4x_operand_parse (char *s, c4x_operand_
*** 1503,1509 ****
}
static int
! c4x_operands_match (c4x_inst_t *inst, c4x_insn_t *insn)
{
const char *args = inst->args;
unsigned long opcode = inst->opcode;
--- 1632,1640 ----
}
static int
! c4x_operands_match (inst, insn)
! c4x_inst_t *inst;
! c4x_insn_t *insn;
{
const char *args = inst->args;
unsigned long opcode = inst->opcode;
*************** c4x_operands_match (c4x_inst_t *inst, c4
*** 2058,2064 ****
}
void
! c4x_insn_output (c4x_insn_t *insn)
{
char *dst;
--- 2189,2196 ----
}
void
! c4x_insn_output (insn)
! c4x_insn_t *insn;
{
char *dst;
*************** c4x_insn_output (c4x_insn_t *insn)
*** 2083,2089 ****
/* Parse the operands. */
int
! c4x_operands_parse (char *s, c4x_operand_t *operands, int num_operands)
{
if (!*s)
return num_operands;
--- 2215,2224 ----
/* Parse the operands. */
int
! c4x_operands_parse (s, operands, num_operands)
! char *s;
! c4x_operand_t *operands;
! int num_operands;
{
if (!*s)
return num_operands;
*************** c4x_operands_parse (char *s, c4x_operand
*** 2104,2110 ****
by the generic front end. We just parse mnemonic and operands, and
produce the bytes of data and relocation. */
void
! md_assemble (char *str)
{
int ok = 0;
char *s;
--- 2239,2246 ----
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;
{
int ok = 0;
char *s;
*************** md_assemble (char *str)
*** 2204,2210 ****
}
void
! c4x_cleanup (void)
{
if (insn->in_use)
md_assemble (NULL);
--- 2340,2346 ----
}
void
! c4x_cleanup ()
{
if (insn->in_use)
md_assemble (NULL);
*************** c4x_cleanup (void)
*** 2216,2222 ****
returned, or NULL on OK. */
char *
! md_atof (int type, char *litP, int *sizeP)
{
int prec;
int ieee;
--- 2352,2361 ----
returned, or NULL on OK. */
char *
! md_atof (type, litP, sizeP)
! int type;
! char *litP;
! int *sizeP;
{
int prec;
int ieee;
*************** md_atof (int type, char *litP, int *size
*** 2275,2281 ****
}
void
! md_apply_fix3 (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED)
{
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT val = *value;
--- 2414,2423 ----
}
void
! md_apply_fix3 (fixP, value, seg)
! fixS *fixP;
! valueT *value;
! segT seg ATTRIBUTE_UNUSED;
{
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT val = *value;
*************** md_apply_fix3 (fixS *fixP, valueT *value
*** 2319,2348 ****
/* Should never be called for c4x. */
void
! md_convert_frag (bfd *headers, segT sec, fragS *fragP)
{
as_fatal ("md_convert_frag");
}
/* Should never be called for c4x. */
void
! md_create_short_jump (char *ptr, addressT from_addr, addressT to_addr,
! fragS *frag, symbolS *to_symbol)
{
as_fatal ("md_create_short_jmp\n");
}
/* Should never be called for c4x. */
void
! md_create_long_jump (char *ptr, addressT from_addr, addressT to_addr,
! fragS *frag, symbolS *to_symbol)
{
as_fatal ("md_create_long_jump\n");
}
/* Should never be called for c4x. */
int
! md_estimate_size_before_relax (register fragS *fragP, segT segtype)
{
as_fatal ("md_estimate_size_before_relax\n");
return 0;
--- 2461,2503 ----
/* Should never be called for c4x. */
void
! md_convert_frag (headers, sec, fragP)
! bfd *headers ATTRIBUTE_UNUSED;
! segT sec ATTRIBUTE_UNUSED;
! fragS *fragP ATTRIBUTE_UNUSED;
{
as_fatal ("md_convert_frag");
}
/* Should never be called for c4x. */
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;
{
as_fatal ("md_create_short_jmp\n");
}
/* Should never be called for c4x. */
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;
{
as_fatal ("md_create_long_jump\n");
}
/* Should never be called for c4x. */
int
! md_estimate_size_before_relax (fragP, segtype)
! register fragS *fragP ATTRIBUTE_UNUSED;
! segT segtype ATTRIBUTE_UNUSED;
{
as_fatal ("md_estimate_size_before_relax\n");
return 0;
*************** struct option md_longopts[] =
*** 2357,2363 ****
size_t md_longopts_size = sizeof (md_longopts);
int
! md_parse_option (int c, char *arg)
{
switch (c)
{
--- 2512,2520 ----
size_t md_longopts_size = sizeof (md_longopts);
int
! md_parse_option (c, arg)
! int c;
! char *arg;
{
switch (c)
{
*************** md_parse_option (int c, char *arg)
*** 2388,2394 ****
}
void
! md_show_usage (FILE *stream)
{
fputs ("\
C[34]x options:\n\
--- 2545,2552 ----
}
void
! md_show_usage (stream)
! FILE *stream;
{
fputs ("\
C[34]x options:\n\
*************** C[34]x options:\n\
*** 2405,2411 ****
definitions of TI C3x tools style local labels $n where n is a single
decimal digit. */
int
! c4x_unrecognized_line (int c)
{
int lab;
char *s;
--- 2563,2570 ----
definitions of TI C3x tools style local labels $n where n is a single
decimal digit. */
int
! c4x_unrecognized_line (c)
! int c;
{
int lab;
char *s;
*************** c4x_unrecognized_line (int c)
*** 2438,2444 ****
/* Handle local labels peculiar to us referred to in an expression. */
symbolS *
! md_undefined_symbol (char *name)
{
/* Look for local labels of the form $n. */
if (name[0] == '$' && isdigit (name[1]))
--- 2597,2604 ----
/* Handle local labels peculiar to us referred to in an expression. */
symbolS *
! md_undefined_symbol (name)
! char *name;
{
/* Look for local labels of the form $n. */
if (name[0] == '$' && isdigit (name[1]))
*************** md_undefined_symbol (char *name)
*** 2470,2488 ****
/* Parse an operand that is machine-specific. */
void
! md_operand (expressionS *expressionP)
{
}
/* Round up a section size to the appropriate boundary---do we need this? */
valueT
! md_section_align (segT segment, valueT size)
{
return size; /* Byte (i.e., 32-bit) alignment is fine? */
}
static int
! c4x_pc_offset (unsigned int op)
{
/* Determine the PC offset for a C[34]x instruction.
This could be simplified using some boolean algebra
--- 2630,2652 ----
/* Parse an operand that is machine-specific. */
void
! md_operand (expressionP)
! 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;
{
return size; /* Byte (i.e., 32-bit) alignment is fine? */
}
static int
! c4x_pc_offset (op)
! unsigned int op;
{
/* Determine the PC offset for a C[34]x instruction.
This could be simplified using some boolean algebra
*************** c4x_pc_offset (unsigned int op)
*** 2544,2550 ****
DBcondD, BcondD disp + PC + 3 => PC
*/
long
! md_pcrel_from (fixS *fixP)
{
unsigned char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
unsigned int op;
--- 2708,2715 ----
DBcondD, BcondD disp + PC + 3 => PC
*/
long
! md_pcrel_from (fixP)
! fixS *fixP;
{
unsigned char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
unsigned int op;
*************** md_pcrel_from (fixS *fixP)
*** 2558,2564 ****
/* This is probably not necessary, if we have played our cards right,
since everything should be already aligned on a 4-byte boundary. */
int
! c4x_do_align (int alignment, const char *fill, int len, int max)
{
char *p;
--- 2723,2733 ----
/* This is probably not necessary, if we have played our cards right,
since everything should be already aligned on a 4-byte boundary. */
int
! c4x_do_align (alignment, fill, len, max)
! int alignment ATTRIBUTE_UNUSED;
! const char *fill ATTRIBUTE_UNUSED;
! int len ATTRIBUTE_UNUSED;
! int max ATTRIBUTE_UNUSED;
{
char *p;
*************** c4x_do_align (int alignment, const char
*** 2572,2578 ****
/* Look for and remove parallel instruction operator ||. */
void
! c4x_start_line (void)
{
char *s = input_line_pointer;
--- 2741,2747 ----
/* Look for and remove parallel instruction operator ||. */
void
! c4x_start_line ()
{
char *s = input_line_pointer;
*************** c4x_start_line (void)
*** 2598,2604 ****
}
arelent *
! tc_gen_reloc (asection *seg, fixS *fixP)
{
arelent *reloc;
--- 2767,2775 ----
}
arelent *
! tc_gen_reloc (seg, fixP)
! asection *seg ATTRIBUTE_UNUSED;
! fixS *fixP;
{
arelent *reloc;
*************** tc_gen_reloc (asection *seg, fixS *fixP)
*** 2624,2627 ****
return reloc;
}
-
--- 2795,2797 ----
Index: opcodes/tic4x-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/tic4x-dis.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 tic4x-dis.c
*** opcodes/tic4x-dis.c 28 Aug 2002 10:38:51 -0000 1.1
--- opcodes/tic4x-dis.c 16 Sep 2002 16:19:47 -0000
*************** indirect_t;
*** 49,56 ****
static int c4x_version = 0;
static int c4x_dp = 0;
static int
! c4x_pc_offset (unsigned int op)
{
/* Determine the PC offset for a C[34]x instruction.
This could be simplified using some boolean algebra
--- 49,89 ----
static int c4x_version = 0;
static int c4x_dp = 0;
+ static int c4x_pc_offset
+ PARAMS ((unsigned int));
+ static int c4x_print_char
+ PARAMS ((struct disassemble_info *, char));
+ static int c4x_print_str
+ PARAMS ((struct disassemble_info *, char *));
+ static int c4x_print_register
+ PARAMS ((struct disassemble_info *, unsigned long));
+ static int c4x_print_addr
+ PARAMS ((struct disassemble_info *, unsigned long));
+ static int c4x_print_relative
+ PARAMS ((struct disassemble_info *, unsigned long, long, unsigned long));
+ void c4x_print_ftoa
+ PARAMS ((unsigned int, FILE *, fprintf_ftype));
+ static int c4x_print_direct
+ PARAMS ((struct disassemble_info *, unsigned long));
+ static int c4x_print_immed
+ PARAMS ((struct disassemble_info *, immed_t, unsigned long));
+ static int c4x_print_cond
+ PARAMS ((struct disassemble_info *, unsigned int));
+ static int c4x_print_indirect
+ PARAMS ((struct disassemble_info *, indirect_t, unsigned long));
+ static int c4x_print_op
+ PARAMS ((struct disassemble_info *, unsigned long, c4x_inst_t *, unsigned long));
+ static void c4x_hash_opcode
+ PARAMS ((c4x_inst_t **, const c4x_inst_t *));
+ static int c4x_disassemble
+ PARAMS ((unsigned long, unsigned long, struct disassemble_info *));
+ int print_insn_tic4x
+ PARAMS ((bfd_vma, struct disassemble_info *));
+
+
static int
! c4x_pc_offset (op)
! unsigned int op;
{
/* Determine the PC offset for a C[34]x instruction.
This could be simplified using some boolean algebra
*************** c4x_pc_offset (unsigned int op)
*** 107,113 ****
}
static int
! c4x_print_char (struct disassemble_info * info, char ch)
{
if (info != NULL)
(*info->fprintf_func) (info->stream, "%c", ch);
--- 140,148 ----
}
static int
! c4x_print_char (info, ch)
! struct disassemble_info * info;
! char ch;
{
if (info != NULL)
(*info->fprintf_func) (info->stream, "%c", ch);
*************** c4x_print_char (struct disassemble_info
*** 115,121 ****
}
static int
! c4x_print_str (struct disassemble_info *info, char *str)
{
if (info != NULL)
(*info->fprintf_func) (info->stream, "%s", str);
--- 150,158 ----
}
static int
! c4x_print_str (info, str)
! struct disassemble_info *info;
! char *str;
{
if (info != NULL)
(*info->fprintf_func) (info->stream, "%s", str);
*************** c4x_print_str (struct disassemble_info *
*** 123,130 ****
}
static int
! c4x_print_register (struct disassemble_info *info,
! unsigned long regno)
{
static c4x_register_t **registertable = NULL;
unsigned int i;
--- 160,168 ----
}
static int
! c4x_print_register (info, regno)
! struct disassemble_info *info;
! unsigned long regno;
{
static c4x_register_t **registertable = NULL;
unsigned int i;
*************** c4x_print_register (struct disassemble_i
*** 151,158 ****
}
static int
! c4x_print_addr (struct disassemble_info *info,
! unsigned long addr)
{
if (info != NULL)
(*info->print_address_func)(addr, info);
--- 189,197 ----
}
static int
! c4x_print_addr (info, addr)
! struct disassemble_info *info;
! unsigned long addr;
{
if (info != NULL)
(*info->print_address_func)(addr, info);
*************** c4x_print_addr (struct disassemble_info
*** 160,176 ****
}
static int
! c4x_print_relative (struct disassemble_info *info,
! unsigned long pc,
! long offset,
! unsigned long opcode)
{
return c4x_print_addr (info, pc + offset + c4x_pc_offset (opcode));
}
static int
! c4x_print_direct (struct disassemble_info *info,
! unsigned long arg)
{
if (info != NULL)
{
--- 199,217 ----
}
static int
! c4x_print_relative (info, pc, offset, opcode)
! struct disassemble_info *info;
! unsigned long pc;
! long offset;
! unsigned long opcode;
{
return c4x_print_addr (info, pc + offset + c4x_pc_offset (opcode));
}
static int
! c4x_print_direct (info, arg)
! struct disassemble_info *info;
! unsigned long arg;
{
if (info != NULL)
{
*************** c4x_print_direct (struct disassemble_inf
*** 183,191 ****
/* FIXME: make the floating point stuff not rely on host
floating point arithmetic. */
void
! c4x_print_ftoa (unsigned int val,
! FILE *stream,
! int (*pfunc)())
{
int e;
int s;
--- 224,233 ----
/* FIXME: make the floating point stuff not rely on host
floating point arithmetic. */
void
! c4x_print_ftoa (val, stream, pfunc)
! unsigned int val;
! FILE *stream;
! fprintf_ftype pfunc;
{
int e;
int s;
*************** c4x_print_ftoa (unsigned int val,
*** 208,216 ****
}
static int
! c4x_print_immed (struct disassemble_info *info,
! immed_t type,
! unsigned long arg)
{
int s;
int f;
--- 250,259 ----
}
static int
! c4x_print_immed (info, type, arg)
! struct disassemble_info *info;
! immed_t type;
! unsigned long arg;
{
int s;
int f;
*************** c4x_print_immed (struct disassemble_info
*** 266,273 ****
}
static int
! c4x_print_cond (struct disassemble_info *info,
! unsigned int cond)
{
static c4x_cond_t **condtable = NULL;
unsigned int i;
--- 309,317 ----
}
static int
! c4x_print_cond (info, cond)
! struct disassemble_info *info;
! unsigned int cond;
{
static c4x_cond_t **condtable = NULL;
unsigned int i;
*************** c4x_print_cond (struct disassemble_info
*** 286,294 ****
}
static int
! c4x_print_indirect (struct disassemble_info *info,
! indirect_t type,
! unsigned long arg)
{
unsigned int aregno;
unsigned int modn;
--- 330,339 ----
}
static int
! c4x_print_indirect (info, type, arg)
! struct disassemble_info *info;
! indirect_t type;
! unsigned long arg;
{
unsigned int aregno;
unsigned int modn;
*************** c4x_print_indirect (struct disassemble_i
*** 349,357 ****
}
static int
! c4x_print_op (struct disassemble_info *info,
! unsigned long instruction,
! c4x_inst_t *p, unsigned long pc)
{
int val;
char *s;
--- 394,404 ----
}
static int
! c4x_print_op (info, instruction, p, pc)
! struct disassemble_info *info;
! unsigned long instruction;
! c4x_inst_t *p;
! unsigned long pc;
{
int val;
char *s;
*************** c4x_print_op (struct disassemble_info *i
*** 578,585 ****
}
static void
! c4x_hash_opcode (c4x_inst_t **optable,
! const c4x_inst_t *inst)
{
int j;
int opcode = inst->opcode >> (32 - C4X_HASH_SIZE);
--- 625,633 ----
}
static void
! c4x_hash_opcode (optable, inst)
! c4x_inst_t **optable;
! const c4x_inst_t *inst;
{
int j;
int opcode = inst->opcode >> (32 - C4X_HASH_SIZE);
*************** c4x_hash_opcode (c4x_inst_t **optable,
*** 609,617 ****
The function returns the length of this instruction in words. */
static int
! c4x_disassemble (unsigned long pc,
! unsigned long instruction,
! struct disassemble_info *info)
{
static c4x_inst_t **optable = NULL;
c4x_inst_t *p;
--- 657,666 ----
The function returns the length of this instruction in words. */
static int
! c4x_disassemble (pc, instruction, info)
! unsigned long pc;
! unsigned long instruction;
! struct disassemble_info *info;
{
static c4x_inst_t **optable = NULL;
c4x_inst_t *p;