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]
Other format: [Raw text]

gas warning fixes, and gas gcc-4 error fix


Fixes another gcc-4.0 error: array type has incomplete element type
for all the relax_table arrays, and lots of warnings.

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

Index: gas/tc.h
===================================================================
RCS file: /cvs/src/src/gas/tc.h,v
retrieving revision 1.9
diff -u -p -r1.9 tc.h
--- gas/tc.h	8 Nov 2004 08:12:44 -0000	1.9
+++ gas/tc.h	17 Feb 2005 11:14:39 -0000
@@ -24,25 +24,6 @@
 
 extern const pseudo_typeS md_pseudo_table[];
 
-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
-   and write.c care about it anyway.  */
-
-struct relax_type
-{
-  /* Forward reach. Signed number. > 0.  */
-  long rlx_forward;
-  /* Backward reach. Signed number. < 0.  */
-  long rlx_backward;
-
-  /* Bytes length of this address.  */
-  unsigned char rlx_length;
-
-  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
-  relax_substateT rlx_more;
-};
-
-typedef struct relax_type relax_typeS;
-
 extern const int md_reloc_size;	/* Size of a relocation record.  */
 
 char * md_atof (int, char *, int *);
Index: gas/as.h
===================================================================
RCS file: /cvs/src/src/gas/as.h,v
retrieving revision 1.42
diff -u -p -r1.42 as.h
--- gas/as.h	7 Feb 2005 17:53:26 -0000	1.42
+++ gas/as.h	17 Feb 2005 11:14:28 -0000
@@ -380,6 +380,22 @@ typedef unsigned int relax_substateT;
 /* Enough bits for address, but still an integer type.
    Could be a problem, cross-assembling for 64-bit machines.  */
 typedef addressT relax_addressT;
+
+struct relax_type
+{
+  /* Forward reach. Signed number. > 0.  */
+  offsetT rlx_forward;
+  /* Backward reach. Signed number. < 0.  */
+  offsetT rlx_backward;
+
+  /* Bytes length of this address.  */
+  unsigned char rlx_length;
+
+  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
+  relax_substateT rlx_more;
+};
+
+typedef struct relax_type relax_typeS;
 
 /* main program "as.c" (command arguments etc).  */
 
Index: gas/ecoff.c
===================================================================
RCS file: /cvs/src/src/gas/ecoff.c,v
retrieving revision 1.19
diff -u -p -r1.19 ecoff.c
--- gas/ecoff.c	21 Jan 2005 05:54:38 -0000	1.19
+++ gas/ecoff.c	17 Feb 2005 11:14:36 -0000
@@ -2312,7 +2312,7 @@ add_file (const char *file_name, int ind
    compiler output, only in hand coded assembler.  */
 
 void
-ecoff_new_file (const char *name)
+ecoff_new_file (const char *name, int appfile ATTRIBUTE_UNUSED)
 {
   if (cur_file_ptr != NULL && strcmp (cur_file_ptr->name, name) == 0)
     return;
Index: gas/ecoff.h
===================================================================
RCS file: /cvs/src/src/gas/ecoff.h,v
retrieving revision 1.4
diff -u -p -r1.4 ecoff.h
--- gas/ecoff.h	22 Nov 2003 00:20:48 -0000	1.4
+++ gas/ecoff.h	17 Feb 2005 11:14:36 -0000
@@ -38,7 +38,7 @@ extern void ecoff_read_begin_hook (void)
 
 /* This function should be called when the assembler switches to a new
    file.  */
-extern void ecoff_new_file (const char *);
+extern void ecoff_new_file (const char *, int);
 
 /* This function should be called when a new symbol is created, by
    obj_symbol_new_hook.  */
Index: gas/itbl-lex.h
===================================================================
RCS file: gas/itbl-lex.h
diff -N gas/itbl-lex.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/itbl-lex.h	17 Feb 2005 11:27:29 -0000
@@ -0,0 +1,23 @@
+/* itbl-lex.h
+   Copyright 2005 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   GAS is distributed in the hope that it will be useful, 
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
+
+extern int insntbl_line;
+extern int yyparse (void);
+extern int yylex (void);
Index: gas/itbl-lex.l
===================================================================
RCS file: /cvs/src/src/gas/itbl-lex.l,v
retrieving revision 1.4
diff -u -p -r1.4 itbl-lex.l
--- gas/itbl-lex.l	30 Oct 2002 03:56:39 -0000	1.4
+++ gas/itbl-lex.l	17 Feb 2005 11:14:36 -0000
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "itbl-lex.h"
 #include <itbl-parse.h>
 
 #ifdef DEBUG
Index: gas/itbl-parse.y
===================================================================
RCS file: /cvs/src/src/gas/itbl-parse.y,v
retrieving revision 1.4
diff -u -p -r1.4 itbl-parse.y
--- gas/itbl-parse.y	27 Oct 2003 12:45:17 -0000	1.4
+++ gas/itbl-parse.y	17 Feb 2005 11:14:36 -0000
@@ -247,6 +247,7 @@ FIXME! hex is ambiguous with any digit
 */
 
 #include <stdio.h>
+#include "itbl-lex.h"
 #include "itbl-ops.h"
 
 /* #define DEBUG */
@@ -273,9 +274,6 @@ FIXME! hex is ambiguous with any digit
 
 static int sbit, ebit;
 static struct itbl_entry *insn=0;
-extern int insntbl_line;
-int yyparse PARAMS ((void));
-int yylex PARAMS ((void));
 static int yyerror PARAMS ((const char *));
 
 %}
Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.88
diff -u -p -r1.88 read.c
--- gas/read.c	31 Jan 2005 14:26:08 -0000	1.88
+++ gas/read.c	17 Feb 2005 11:14:39 -0000
@@ -1599,7 +1602,7 @@ s_data (int ignore ATTRIBUTE_UNUSED)
    .file.  */
 
 void
-s_app_file_string (char *file, int appfile)
+s_app_file_string (char *file, int appfile ATTRIBUTE_UNUSED)
 {
 #ifdef LISTING
   if (listing)
Index: gas/subsegs.c
===================================================================
RCS file: /cvs/src/src/gas/subsegs.c,v
retrieving revision 1.20
diff -u -p -r1.20 subsegs.c
--- gas/subsegs.c	7 Feb 2005 17:53:26 -0000	1.20
+++ gas/subsegs.c	17 Feb 2005 11:14:39 -0000
@@ -602,7 +602,7 @@ subseg_text_p (segT sec)
    seg_definitely_not_empty_p.  */
 
 int
-seg_not_empty_p (segT sec)
+seg_not_empty_p (segT sec ATTRIBUTE_UNUSED)
 {
   segment_info_type *seginfo = seg_info (sec);
   frchainS *chain;
Index: gas/subsegs.h
===================================================================
RCS file: /cvs/src/src/gas/subsegs.h,v
retrieving revision 1.5
diff -u -p -r1.5 subsegs.h
--- gas/subsegs.h	3 Dec 2003 03:39:58 -0000	1.5
+++ gas/subsegs.h	17 Feb 2005 11:14:39 -0000
@@ -139,14 +139,7 @@ extern segment_info_type segment_info[];
 extern frchainS *data0_frchainP;
 extern frchainS *bss0_frchainP;
 
-/* Dummy so stuff can compile.  Should never be used.  */
-struct seg_info_trash {
-  struct {
-    unsigned stab_string_size : 1;
-  } stabu;
-  unsigned hadone : 1;
-};
-#define seg_info(S)	(abort (), (struct seg_info_trash *) 0)
+#define seg_info(S)	(abort (), (segment_info_type *) 0)
 
 #endif
 
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.76
diff -u -p -r1.76 obj-coff.c
--- gas/config/obj-coff.c	31 Jan 2005 23:18:24 -0000	1.76
+++ gas/config/obj-coff.c	17 Feb 2005 11:14:42 -0000
@@ -1859,7 +1859,7 @@ int function_lineoff = -1;	/* Offset in 
    into the string table.  */
 struct filename_list
 {
-  char *filename;
+  const char *filename;
   struct filename_list *next;
 };
 
Index: gas/config/obj-ecoff.h
===================================================================
RCS file: /cvs/src/src/gas/config/obj-ecoff.h,v
retrieving revision 1.5
diff -u -p -r1.5 obj-ecoff.h
--- gas/config/obj-ecoff.h	10 Nov 2004 03:28:45 -0000	1.5
+++ gas/config/obj-ecoff.h	17 Feb 2005 11:14:42 -0000
@@ -63,7 +63,7 @@ extern void ecoff_frob_file PARAMS ((voi
 #define obj_symbol_new_hook ecoff_symbol_new_hook
 
 /* Record file switches in the ECOFF symbol table.  */
-#define obj_app_file(name, app) ecoff_new_file (name)
+#define obj_app_file(name, app) ecoff_new_file (name, app)
 
 /* At the moment we don't want to do any stabs processing in read.c.  */
 #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.89
diff -u -p -r1.89 obj-elf.c
--- gas/config/obj-elf.c	31 Jan 2005 23:18:24 -0000	1.89
+++ gas/config/obj-elf.c	17 Feb 2005 11:14:43 -0000
@@ -260,7 +260,7 @@ elf_file_symbol (const char *s, int appf
     }
 
 #ifdef NEED_ECOFF_DEBUG
-  ecoff_new_file (s);
+  ecoff_new_file (s, appfile);
 #endif
 }
 
Index: gas/config/tc-a29k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-a29k.c,v
retrieving revision 1.10
diff -u -p -r1.10 tc-a29k.c
--- gas/config/tc-a29k.c	31 Jan 2005 23:18:25 -0000	1.10
+++ gas/config/tc-a29k.c	17 Feb 2005 11:14:44 -0000
@@ -787,10 +787,10 @@ md_number_to_chars (buf, val, n)
 void
 md_apply_fix3 (fixP, valP, seg)
      fixS *fixP;
-     valueT * valP;
+     valueT *valP;
      segT seg ATTRIBUTE_UNUSED;
 {
-  long val = *valP;
+  valueT val = *valP;
   char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
 
   fixP->fx_addnumber = val;	/* Remember value for emit_reloc.  */
@@ -864,9 +864,7 @@ md_apply_fix3 (fixP, valP, seg)
 	}
       else if (fixP->fx_pcrel)
 	{
-	  long v = val >> 17;
-
-	  if (v != 0 && v != -1)
+	  if (val + 0x20000 > 0x3ffff)
 	    as_bad_where (fixP->fx_file, fixP->fx_line,
 			  "call/jmp target out of range");
 	}
Index: gas/config/tc-arc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arc.c,v
retrieving revision 1.29
diff -u -p -r1.29 tc-arc.c
--- gas/config/tc-arc.c	31 Jan 2005 23:18:25 -0000	1.29
+++ gas/config/tc-arc.c	17 Feb 2005 11:14:45 -0000
@@ -1645,50 +1645,52 @@ md_operand (expressionP)
 {
   char *p = input_line_pointer;
 
-  if (*p == '%')
-    if (strncmp (p, "%st(", 4) == 0)
-      {
-	input_line_pointer += 4;
-	expression (expressionP);
-	if (*input_line_pointer != ')')
-	  {
-	    as_bad ("missing ')' in %%-op");
-	    return;
-	  }
-	++input_line_pointer;
-	arc_code_symbol (expressionP);
-      }
-    else
-      {
-	/* It could be a register.  */
-	int i, l;
-	struct arc_ext_operand_value *ext_oper = arc_ext_operands;
-	p++;
-
-	while (ext_oper)
-	  {
-	    l = strlen (ext_oper->operand.name);
-	    if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
-	      {
-		input_line_pointer += l + 1;
-		expressionP->X_op = O_register;
-		expressionP->X_add_number = (int) &ext_oper->operand;
-		return;
-	      }
-	    ext_oper = ext_oper->next;
-	  }
-	for (i = 0; i < arc_reg_names_count; i++)
-	  {
-	    l = strlen (arc_reg_names[i].name);
-	    if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
-	      {
-		input_line_pointer += l + 1;
-		expressionP->X_op = O_register;
-		expressionP->X_add_number = (int) &arc_reg_names[i];
-		break;
-	      }
-	  }
-      }
+  if (*p != '%')
+    return;
+
+  if (strncmp (p, "%st(", 4) == 0)
+    {
+      input_line_pointer += 4;
+      expression (expressionP);
+      if (*input_line_pointer != ')')
+	{
+	  as_bad ("missing ')' in %%-op");
+	  return;
+	}
+      ++input_line_pointer;
+      arc_code_symbol (expressionP);
+    }
+  else
+    {
+      /* It could be a register.  */
+      int i, l;
+      struct arc_ext_operand_value *ext_oper = arc_ext_operands;
+      p++;
+
+      while (ext_oper)
+	{
+	  l = strlen (ext_oper->operand.name);
+	  if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
+	    {
+	      input_line_pointer += l + 1;
+	      expressionP->X_op = O_register;
+	      expressionP->X_add_number = (int) &ext_oper->operand;
+	      return;
+	    }
+	  ext_oper = ext_oper->next;
+	}
+      for (i = 0; i < arc_reg_names_count; i++)
+	{
+	  l = strlen (arc_reg_names[i].name);
+	  if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
+	    {
+	      input_line_pointer += l + 1;
+	      expressionP->X_op = O_register;
+	      expressionP->X_add_number = (int) &arc_reg_names[i];
+	      break;
+	    }
+	}
+    }
 }
 
 /* We have no need to default values of symbols.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.191
diff -u -p -r1.191 tc-arm.c
--- gas/config/tc-arm.c	10 Feb 2005 12:39:16 -0000	1.191
+++ gas/config/tc-arm.c	17 Feb 2005 11:14:51 -0000
@@ -4551,6 +4551,7 @@ do_t_bkpt (char * str)
   end_of_line (str);
 }
 
+#ifdef OBJ_ELF
 static bfd_reloc_code_real_type
 arm_parse_reloc (void)
 {
@@ -4591,6 +4592,7 @@ arm_parse_reloc (void)
 
   return reloc_map[i].reloc;
 }
+#endif
 
 /* ARM V5 branch-link-exchange (argument parse) for BLX(1) only.
    Expects inst.instruction is set for BLX(1).
@@ -11028,6 +11030,7 @@ md_begin (void)
 
   cpu_variant = mcpu_cpu_opt | mfpu_opt;
 
+#if defined OBJ_COFF || defined OBJ_ELF
   {
     unsigned int flags = 0;
 
@@ -11038,7 +11041,6 @@ md_begin (void)
       {
       case EF_ARM_EABI_UNKNOWN:
 #endif
-#if defined OBJ_COFF || defined OBJ_ELF
 	/* Set the flags in the private structure.  */
 	if (uses_apcs_26)      flags |= F_APCS26;
 	if (support_interwork) flags |= F_INTERWORK;
@@ -11064,7 +11066,7 @@ md_begin (void)
 	/* Using VFP conventions (even if soft-float).  */
 	if (cpu_variant & FPU_VFP_EXT_NONE)
 	  flags |= F_VFP_FLOAT;
-#endif
+
 #if defined OBJ_ELF
 	if (cpu_variant & FPU_ARCH_MAVERICK)
 	    flags |= EF_ARM_MAVERICK_FLOAT;
@@ -11078,7 +11080,6 @@ md_begin (void)
 	abort ();
       }
 #endif
-#if defined OBJ_COFF || defined OBJ_ELF
     bfd_set_private_flags (stdoutput, flags);
 
     /* We have run out flags in the COFF header to encode the
@@ -11098,8 +11099,8 @@ md_begin (void)
 	    bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
 	  }
       }
-#endif
   }
+#endif
 
   /* Record the CPU type as well.  */
   switch (cpu_variant & ARM_CPU_MASK)
Index: gas/config/tc-cris.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-cris.h,v
retrieving revision 1.11
diff -u -p -r1.11 tc-cris.h
--- gas/config/tc-cris.h	4 Nov 2004 15:00:37 -0000	1.11
+++ gas/config/tc-cris.h	17 Feb 2005 11:14:52 -0000
@@ -152,7 +152,7 @@ extern void tc_cris_check_adjusted_broke
  tc_cris_check_adjusted_broken_word ((offsetT) (new_offset), brokw)
 
 /* We don't want any implicit alignment, so we do nothing.  */
-#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR)
+#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) do { } while (0)
 
 /* CRIS instructions, with operands and prefixes included, are a multiple
    of two bytes long.  */
Index: gas/config/tc-frv.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-frv.c,v
retrieving revision 1.14
diff -u -p -r1.14 tc-frv.c
--- gas/config/tc-frv.c	25 Jan 2005 20:22:32 -0000	1.14
+++ gas/config/tc-frv.c	17 Feb 2005 11:14:52 -0000
@@ -1423,7 +1423,7 @@ frv_force_relocation (fix)
      fixS * fix;
 {
   switch (fix->fx_r_type < BFD_RELOC_UNUSED
-	  ? fix->fx_r_type
+	  ? (int) fix->fx_r_type
 	  : fix->fx_cgen.opinfo)
     {
     case BFD_RELOC_FRV_GPREL12:
Index: gas/config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.60
diff -u -p -r1.60 tc-m68k.c
--- gas/config/tc-m68k.c	3 Nov 2004 01:54:25 -0000	1.60
+++ gas/config/tc-m68k.c	17 Feb 2005 11:14:56 -0000
@@ -7092,7 +7092,6 @@ md_parse_option (int c, char *arg)
 	{
 	  int i;
 	  unsigned long arch;
-	  const char *oarg = arg;
 
 	  arg += 3;
 	  if (*arg == 'm')
Index: gas/config/tc-mcore.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mcore.c,v
retrieving revision 1.34
diff -u -p -r1.34 tc-mcore.c
--- gas/config/tc-mcore.c	22 Nov 2003 02:35:30 -0000	1.34
+++ gas/config/tc-mcore.c	17 Feb 2005 11:14:57 -0000
@@ -42,7 +42,7 @@ static void   mcore_cons PARAMS ((int));
 static void   mcore_float_cons PARAMS ((int));
 static void   mcore_stringer PARAMS ((int));
 static void   mcore_fill   PARAMS ((int));
-static int    log2 PARAMS ((unsigned int));
+static int    mylog2 PARAMS ((unsigned int));
 static char * parse_reg    PARAMS ((char *, unsigned *));
 static char * parse_creg   PARAMS ((char *, unsigned *));
 static char * parse_exp    PARAMS ((char *, expressionS *));
@@ -412,7 +412,7 @@ md_begin ()
 
 /* Get a log2(val).  */
 static int
-log2 (val)
+mylog2 (val)
     unsigned int val;
 {
     int log = -1;
@@ -1146,7 +1146,7 @@ md_assemble (str)
 	  op_end = parse_imm (op_end + 1, & reg, 1, 1 << 31);
 	  /* Further restrict the immediate to a power of two.  */
 	  if ((reg & (reg - 1)) == 0)
-	    reg = log2 (reg);
+	    reg = mylog2 (reg);
 	  else
 	    {
 	      reg = 0;
@@ -1203,7 +1203,7 @@ md_assemble (str)
 
 	  /* Further restrict the immediate to a power of two.  */
 	  if ((reg & (reg - 1)) == 0)
-	    reg = log2 (reg);
+	    reg = mylog2 (reg);
 	  else
 	    {
 	      reg = 0;
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.282
diff -u -p -r1.282 tc-mips.c
--- gas/config/tc-mips.c	16 Feb 2005 15:49:13 -0000	1.282
+++ gas/config/tc-mips.c	17 Feb 2005 11:15:04 -0000
@@ -2093,7 +2093,7 @@ append_insn (struct mips_cl_insn *ip, ex
     {
       if (address_expr->X_op == O_constant)
 	{
-	  valueT tmp;
+	  unsigned int tmp;
 
 	  switch (*reloc_type)
 	    {
@@ -2102,20 +2102,18 @@ append_insn (struct mips_cl_insn *ip, ex
 	      break;
 
 	    case BFD_RELOC_MIPS_HIGHEST:
-	      tmp = (address_expr->X_add_number
-		     + ((valueT) 0x8000 << 32) + 0x80008000) >> 16;
-	      tmp >>= 16;
-	      ip->insn_opcode |= (tmp >> 16) & 0xffff;
+	      tmp = (address_expr->X_add_number + 0x800080008000ull) >> 48;
+	      ip->insn_opcode |= tmp & 0xffff;
 	      break;
 
 	    case BFD_RELOC_MIPS_HIGHER:
-	      tmp = (address_expr->X_add_number + 0x80008000) >> 16;
-	      ip->insn_opcode |= (tmp >> 16) & 0xffff;
+	      tmp = (address_expr->X_add_number + 0x80008000ull) >> 32;
+	      ip->insn_opcode |= tmp & 0xffff;
 	      break;
 
 	    case BFD_RELOC_HI16_S:
-	      ip->insn_opcode |= ((address_expr->X_add_number + 0x8000)
-				  >> 16) & 0xffff;
+	      tmp = (address_expr->X_add_number + 0x8000) >> 16;
+	      ip->insn_opcode |= tmp & 0xffff;
 	      break;
 
 	    case BFD_RELOC_HI16:
Index: gas/config/tc-mmix.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mmix.c,v
retrieving revision 1.17
diff -u -p -r1.17 tc-mmix.c
--- gas/config/tc-mmix.c	14 Sep 2004 20:00:26 -0000	1.17
+++ gas/config/tc-mmix.c	17 Feb 2005 11:15:06 -0000
@@ -301,22 +301,9 @@ struct obstack mmix_sym_obstack;
 #define PUSHJ_4B GETA_3B
 
 /* We'll very rarely have sections longer than LONG_MAX, but we'll make a
-   feeble attempt at getting 64-bit C99 or gcc-specific values (assuming
-   long long is 64 bits on the host).  */
-#ifdef LLONG_MIN
-#define PUSHJSTUB_MIN LLONG_MIN
-#elif defined (LONG_LONG_MIN)
-#define PUSHJSTUB_MIN LONG_LONG_MIN
-#else
-#define PUSHJSTUB_MIN LONG_MIN
-#endif
-#ifdef LLONG_MAX
-#define PUSHJSTUB_MAX LLONG_MAX
-#elif defined (LONG_LONG_MAX)
-#define PUSHJSTUB_MAX LONG_LONG_MAX
-#else
-#define PUSHJSTUB_MAX LONG_MAX
-#endif
+   feeble attempt at getting 64-bit values.  */
+#define PUSHJSTUB_MAX ((offsetT) (((addressT) -1) >> 1))
+#define PUSHJSTUB_MIN (-PUSHJSTUB_MAX - 1)
 
 #define JMP_0F (65536 * 256 * 4 - 8)
 #define JMP_0B (-65536 * 256 * 4 - 4)
Index: gas/config/tc-s390.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-s390.c,v
retrieving revision 1.42
diff -u -p -r1.42 tc-s390.c
--- gas/config/tc-s390.c	3 Nov 2004 01:54:25 -0000	1.42
+++ gas/config/tc-s390.c	17 Feb 2005 11:15:08 -0000
@@ -1596,13 +1596,10 @@ s390_insn (ignore)
   if (exp.X_op == O_constant)
     {
       if (   (   opformat->oplen == 6
-	      && (addressT) exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 48))
 	  || (   opformat->oplen == 4
-	      && (addressT) exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 32))
 	  || (   opformat->oplen == 2
-	      && (addressT) exp.X_add_number >= 0
 	      && (addressT) exp.X_add_number < (1ULL << 16)))
 	md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
       else
Index: gas/config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.104
diff -u -p -r1.104 tc-sh.c
--- gas/config/tc-sh.c	14 Feb 2005 23:58:14 -0000	1.104
+++ gas/config/tc-sh.c	17 Feb 2005 11:15:10 -0000
@@ -4556,7 +4556,6 @@ sh_parse_name (char const *name, express
 
   return 1;
 }
-#endif
 
 void
 sh_cfi_frame_initial_instructions (void)
@@ -4606,4 +4605,5 @@ sh_regname_to_dw2regnum (const char *reg
     }
   return regnum;
 }
+#endif /* OBJ_ELF */
 #endif /* BFD_ASSEMBLER */
Index: gas/config/tc-sparc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sparc.c,v
retrieving revision 1.52
diff -u -p -r1.52 tc-sparc.c
--- gas/config/tc-sparc.c	2 Oct 2004 00:18:31 -0000	1.52
+++ gas/config/tc-sparc.c	17 Feb 2005 11:15:12 -0000
@@ -133,7 +133,7 @@ int sparc_cie_data_alignment;
 /* Handle of the OPCODE hash table.  */
 static struct hash_control *op_hash;
 
-static int log2 PARAMS ((int));
+static int mylog2 PARAMS ((int));
 static void s_data1 PARAMS ((void));
 static void s_seg PARAMS ((int));
 static void s_proc PARAMS ((int));
@@ -3637,7 +3637,7 @@ md_pcrel_from (fixP)
    of two.  */
 
 static int
-log2 (value)
+mylog2 (value)
      int value;
 {
   int shift;
@@ -3739,7 +3739,7 @@ s_reserve (ignore)
 
       if (align != 0)
 	{
-	  temp = log2 (align);
+	  temp = mylog2 (align);
 	  if (temp < 0)
 	    {
 	      as_bad (_("alignment not a power of 2"));
@@ -3877,7 +3877,7 @@ s_common (ignore)
       if (temp > max_alignment)
 	{
 	  temp = max_alignment;
-	  as_warn (_("alignment too large; assuming %d"), temp);
+	  as_warn (_("alignment too large; assuming %ld"), (long) temp);
 	}
 #endif
 
@@ -3902,7 +3902,7 @@ s_common (ignore)
 	  if (temp == 0)
 	    align = 0;
 	  else
-	    align = log2 (temp);
+	    align = mylog2 (temp);
 
 	  if (align < 0)
 	    {
@@ -4225,7 +4225,7 @@ sparc_cons_align (nbytes)
   if (sparc_no_align_cons)
     return;
 
-  nalign = log2 (nbytes);
+  nalign = mylog2 (nbytes);
   if (nalign == 0)
     return;
 
Index: gas/config/tc-tic4x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.c,v
retrieving revision 1.12
diff -u -p -r1.12 tc-tic4x.c
--- gas/config/tc-tic4x.c	22 Nov 2003 15:32:28 -0000	1.12
+++ gas/config/tc-tic4x.c	17 Feb 2005 11:15:13 -0000
@@ -708,7 +708,7 @@ tic4x_insert_reg (regname, regnum)
   symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
 				   &zero_address_frag));
   for (i = 0; regname[i]; i++)
-    buf[i] = islower (regname[i]) ? TOUPPER (regname[i]) : regname[i];
+    buf[i] = ISLOWER (regname[i]) ? TOUPPER (regname[i]) : regname[i];
   buf[i] = '\0';
 
   symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
@@ -3090,7 +3090,7 @@ tic4x_do_align (alignment, fill, len, ma
      int len ATTRIBUTE_UNUSED;
      int max ATTRIBUTE_UNUSED;
 {
-  unsigned long nop = NOP_OPCODE;
+  unsigned long nop = TIC_NOP_OPCODE;
 
   /* Because we are talking lwords, not bytes, adjust alignment to do words */
   alignment += 2;
Index: gas/config/tc-tic4x.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.h,v
retrieving revision 1.4
diff -u -p -r1.4 tc-tic4x.h
--- gas/config/tc-tic4x.h	18 May 2003 22:23:15 -0000	1.4
+++ gas/config/tc-tic4x.h	17 Feb 2005 11:15:14 -0000
@@ -65,7 +65,7 @@
 #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep (frag)
 #define NEED_FX_R_TYPE
 
-#define NOP_OPCODE              0x0c800000
+#define TIC_NOP_OPCODE		0x0c800000
 
 #define reloc_type 		int
 
Index: gas/config/tc-vax.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-vax.c,v
retrieving revision 1.20
diff -u -p -r1.20 tc-vax.c
--- gas/config/tc-vax.c	3 Nov 2004 01:54:25 -0000	1.20
+++ gas/config/tc-vax.c	17 Feb 2005 11:15:16 -0000
@@ -29,6 +29,10 @@
 #include "elf/vax.h"
 #endif
 
+#if defined (OBJ_AOUT) && !defined (BFD_ASSEMBLER) && defined (TE_NetBSD)
+#include <netinet/in.h>
+#endif
+
 /* These chars start a comment anywhere in a source file (except inside
    another comment */
 const char comment_chars[] = "#";
@@ -3407,7 +3411,7 @@ tc_headers_hook(headers)
 {
 #ifdef TE_NetBSD
   N_SET_INFO(headers->header, OMAGIC, M_VAX4K_NETBSD, 0);
-  headers->header.a_info = htonl(headers->header.a_info);
+  headers->header.a_info = htonl (headers->header.a_info);
 #endif
 }
 #endif /* !BFD_ASSEMBLER */
Index: gas/config/tc-xstormy16.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xstormy16.c,v
retrieving revision 1.15
diff -u -p -r1.15 tc-xstormy16.c
--- gas/config/tc-xstormy16.c	18 Oct 2004 08:02:25 -0000	1.15
+++ gas/config/tc-xstormy16.c	17 Feb 2005 11:15:16 -0000
@@ -344,10 +344,10 @@ md_pcrel_from_section (fixP, sec)
      fixS * fixP;
      segT   sec;
 {
-  if (fixP->fx_addsy != (symbolS *) NULL
-      && (! S_IS_DEFINED (fixP->fx_addsy)
-	  || S_GET_SEGMENT (fixP->fx_addsy) != sec)
-          || xstormy16_force_relocation (fixP))
+  if ((fixP->fx_addsy != (symbolS *) NULL
+       && (! S_IS_DEFINED (fixP->fx_addsy)
+	   || S_GET_SEGMENT (fixP->fx_addsy) != sec))
+      || xstormy16_force_relocation (fixP))
     /* The symbol is undefined,
        or it is defined but not in this section,
        or the relocation will be relative to this symbol not the section symbol.	 

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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