This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Committed tc-sh.[hc] cleanups


Cleanups for stuff exposed by the relatively recently added build warning
options.  Committed.

	* config/tc-sh.h (sh_force_relocation): Prototype.
	(struct fix): Forward declare.
	* config/tc-sh.c (type sh_operand_info): Move to top of file.
	(cons, s_align_bytes): Remove old-type declarations.
	(sh_elf_suffix, parse_reg, dot, parse_exp, parse_at, get_operand,
	get_operands, get_specific, insert, build_relax,
	insert_loop_bounds, build_Mytes): Prototype.
	(little): Make static.  Prototype.
	(check, tc_Nout_fix_to_chars): Delete unused functions.

Index: tc-sh.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.h,v
retrieving revision 1.12
diff -p -c -r1.12 tc-sh.h
*** tc-sh.h	2001/03/08 23:24:25	1.12
--- tc-sh.h	2001/09/15 14:28:31
*************** extern void sh_handle_align PARAMS ((fra
*** 58,64 ****

  /* We need to force out some relocations when relaxing.  */
  #define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix)
! extern int sh_force_relocation ();

  #ifdef OBJ_ELF
  #define obj_fix_adjustable(fixP) sh_fix_adjustable(fixP)
--- 58,70 ----

  /* We need to force out some relocations when relaxing.  */
  #define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix)
!
! /* The type fixS is defined (to struct fix) in write.h, but write.h uses
!    definitions from this file.  To avoid problems with including write.h
!    after the "right" definitions, don't; just forward-declare struct fix
!    here.  */
! struct fix;
! extern int sh_force_relocation PARAMS ((struct fix *));

  #ifdef OBJ_ELF
  #define obj_fix_adjustable(fixP) sh_fix_adjustable(fixP)
Index: tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.40
diff -p -c -r1.40 tc-sh.c
*** tc-sh.c	2001/07/03 15:22:19	1.40
--- tc-sh.c	2001/09/15 14:28:31
***************
*** 36,41 ****
--- 36,49 ----

  #include "dwarf2dbg.h"

+ typedef struct
+   {
+     sh_arg_type type;
+     int reg;
+     expressionS immediate;
+   }
+ sh_operand_info;
+
  const char comment_chars[] = "!";
  const char line_separator_chars[] = ";";
  const char line_comment_chars[] = "!#";
*************** static void s_uses PARAMS ((int));
*** 45,55 ****
  static void sh_count_relocs PARAMS ((bfd *, segT, PTR));
  static void sh_frob_section PARAMS ((bfd *, segT, PTR));

- void cons ();
- void s_align_bytes ();
  static void s_uacons PARAMS ((int));
  static sh_opcode_info *find_cooked_opcode PARAMS ((char **));
  static unsigned int assemble_ppi PARAMS ((char *, sh_opcode_info *));

  #ifdef OBJ_ELF
  static void sh_elf_cons PARAMS ((int));
--- 53,78 ----
  static void sh_count_relocs PARAMS ((bfd *, segT, PTR));
  static void sh_frob_section PARAMS ((bfd *, segT, PTR));

  static void s_uacons PARAMS ((int));
  static sh_opcode_info *find_cooked_opcode PARAMS ((char **));
  static unsigned int assemble_ppi PARAMS ((char *, sh_opcode_info *));
+ static void little PARAMS ((int));
+ static bfd_reloc_code_real_type sh_elf_suffix
+   PARAMS ((char **str_p, expressionS *, expressionS *new_exp_p));
+ static int parse_reg PARAMS ((char *, int *, int *));
+ static symbolS *dot PARAMS ((void));
+ static char *parse_exp PARAMS ((char *, sh_operand_info *));
+ static char *parse_at PARAMS ((char *, sh_operand_info *));
+ static void get_operand PARAMS ((char **, sh_operand_info *));
+ static char *get_operands
+   PARAMS ((sh_opcode_info *, char *, sh_operand_info *));
+ static sh_opcode_info *get_specific
+   PARAMS ((sh_opcode_info *, sh_operand_info *));
+ static void insert PARAMS ((char *, int, int, sh_operand_info *));
+ static void build_relax PARAMS ((sh_opcode_info *, sh_operand_info *));
+ static char *insert_loop_bounds PARAMS ((char *, sh_operand_info *));
+ static unsigned int build_Mytes
+   PARAMS ((sh_opcode_info *, sh_operand_info *));

  #ifdef OBJ_ELF
  static void sh_elf_cons PARAMS ((int));
*************** static int reg_x, reg_y;
*** 456,469 ****
  static int reg_efg;
  static int reg_b;

- typedef struct
-   {
-     sh_arg_type type;
-     int reg;
-     expressionS immediate;
-   }
- sh_operand_info;
-
  #define IDENT_CHAR(c) (isalnum (c) || (c) == '_')

  /* Try to parse a reg name.  Return the number of chars consumed.  */
--- 479,484 ----
*************** get_specific (opcode, operands)
*** 1381,1401 ****
    return 0;
  }

- int
- check (operand, low, high)
-      expressionS *operand;
-      int low;
-      int high;
- {
-   if (operand->X_op != O_constant
-       || operand->X_add_number < low
-       || operand->X_add_number > high)
-     {
-       as_bad (_("operand must be absolute in range %d..%d"), low, high);
-     }
-   return operand->X_add_number;
- }
-
  static void
  insert (where, how, pcrel, op)
       char *where;
--- 1396,1401 ----
*************** static unsigned int
*** 1501,1507 ****
  build_Mytes (opcode, operand)
       sh_opcode_info *opcode;
       sh_operand_info *operand;
-
  {
    int index;
    char nbuf[4];
--- 1501,1506 ----
*************** SH options:\n\
*** 2185,2197 ****
  -dsp			enable sh-dsp insns, and disable sh3e / sh4 insns.\n"));
  }

- void
- tc_Nout_fix_to_chars ()
- {
-   printf (_("call to tc_Nout_fix_to_chars \n"));
-   abort ();
- }
-
  /* This struct is used to pass arguments to sh_count_relocs through
     bfd_map_over_sections.  */

--- 2184,2189 ----

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]