* tc.h (struct relax_type, relax_typeS): Move from here..
authorAlan Modra <amodra@gmail.com>
Thu, 17 Feb 2005 13:46:05 +0000 (13:46 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 17 Feb 2005 13:46:05 +0000 (13:46 +0000)
* 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.

30 files changed:
gas/ChangeLog
gas/as.h
gas/config/obj-coff.c
gas/config/obj-ecoff.h
gas/config/obj-elf.c
gas/config/tc-a29k.c
gas/config/tc-arc.c
gas/config/tc-arm.c
gas/config/tc-cris.h
gas/config/tc-frv.c
gas/config/tc-m68k.c
gas/config/tc-mcore.c
gas/config/tc-mips.c
gas/config/tc-mmix.c
gas/config/tc-s390.c
gas/config/tc-sh.c
gas/config/tc-sparc.c
gas/config/tc-tic4x.c
gas/config/tc-tic4x.h
gas/config/tc-vax.c
gas/config/tc-xstormy16.c
gas/ecoff.c
gas/ecoff.h
gas/itbl-lex.h [new file with mode: 0644]
gas/itbl-lex.l
gas/itbl-parse.y
gas/read.c
gas/subsegs.c
gas/subsegs.h
gas/tc.h

index 7dbcef3397d3cf82671727cd2287ecaf20e2f270..699c9a660ff91664db85e2b7c29931bb5c28c159 100644 (file)
@@ -1,3 +1,44 @@
+2005-02-17  Alan Modra  <amodra@bigpond.net.au>
+
+       * 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.
+
 2005-02-17  Jan Beulich  <jbeulich@novell.com>
 
        * config/tc-ia64.c (ia64_parse_name): Don't advance 'name' when
index 354f1832ec9835652693ea7279d0c889e3bb9c42..a232a4b3ada45020a7b7b3f6fb636ccde7855c4f 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -1,6 +1,6 @@
 /* as.h - global header file
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -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;
 \f
 /* main program "as.c" (command arguments etc).  */
 
index bb97280e86496d2407708ec9c33d27801879a3b4..69b53ffeee7375ba774d6195e72283dfb98d74b5 100644 (file)
@@ -1,6 +1,6 @@
 /* coff object file format
    Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS.
@@ -1859,7 +1859,7 @@ int function_lineoff = -1;        /* Offset in line#s where the last function
    into the string table.  */
 struct filename_list
 {
-  char *filename;
+  const char *filename;
   struct filename_list *next;
 };
 
index 9dbb4e594884245a4ac5f665b5678e3ec99e9deb..9f14d3b4ea6f8fee43bfbdad1d8bd6827155ff32 100644 (file)
@@ -1,5 +1,5 @@
 /* ECOFF object file format header file.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002
+   Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -63,7 +63,7 @@ extern void ecoff_frob_file PARAMS ((void));
 #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 c25dbbc472ed31d13894c118c384d3a94a7d8f41..c7907b375661bd6bcc5a0f568a5ef65cefdc6fcd 100644 (file)
@@ -1,6 +1,6 @@
 /* ELF object file format
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -260,7 +260,7 @@ elf_file_symbol (const char *s, int appfile)
     }
 
 #ifdef NEED_ECOFF_DEBUG
-  ecoff_new_file (s);
+  ecoff_new_file (s, appfile);
 #endif
 }
 
index 2350fcb011040fa1648867ff4c060d43a47f565e..9e3fb44a0cb5e6beee643f4508d6eb4c46667873 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-a29k.c -- Assemble for the AMD 29000.
-   Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002
+   Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001,
+   2002, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -787,10 +788,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 +865,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 640917128982c46607ec3854ec829979029eb07f..445ea483a116a324d1f95b873e55906ab602137c 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-arc.c -- Assembler for the ARC
-   Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
 
@@ -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++;
+  if (*p != '%')
+    return;
 
-       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 (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 c40df52807ea2a3a394fe1581ee1758a1e7ee94a..7a7c41eac3366fa813652150dfe5a2871d93c241 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-arm.c -- Assemble for the ARM
-   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005
+   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+   2004, 2005
    Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
        Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -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 2f969c6a3b64cd57167627d3da4231bf0a4d78fd..bb7a6acca0b69a1f61bc22ce2474db1ff5587ccc 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-cris.h -- Header file for tc-cris.c, the CRIS GAS port.
-   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
 
    Contributed by Axis Communications AB, Lund, Sweden.
    Originally written for GAS 1.38.1 by Mikael Asker.
@@ -152,7 +153,7 @@ extern void tc_cris_check_adjusted_broken_word PARAMS ((offsetT,
  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 c75018d6c67450a1148a3ca88216da4cf110b692..c737dcdd5525500917e2a50ce9905f99724146bb 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-frv.c -- Assembler for the Fujitsu FRV.
-   Copyright 2002, 2003 Free Software Foundation.
+   Copyright 2002, 2003, 2004, 2005 Free Software Foundation.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -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 f0a87b3f09e26eba7c973ef3c3427077417b5d0e..bdd4caeb0329455dded567e0d2fcf6e0f8ab1f39 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-m68k.c -- Assemble for the m68k family
    Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -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 c10b75d226c76f9aaed71dbe32e4c1b4dc85e6cf..02f21394c5ec52da3ddafa27262895db3c0febe4 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-mcore.c -- Assemble code for M*Core
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2003, 2005
+   Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -42,7 +43,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 +413,7 @@ md_begin ()
 
 /* Get a log2(val).  */
 static int
-log2 (val)
+mylog2 (val)
     unsigned int val;
 {
     int log = -1;
@@ -1146,7 +1147,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 +1204,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 17a6dbd75d4ac591d1092ec04f2c54eb85c46207..0e246dd91e73e9070131be81526141880309e14d 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-mips.c -- assemble code for a MIPS chip.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004 Free Software Foundation, Inc.
+   2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by the OSF and Ralph Campbell.
    Written by Keith Knowles and Ralph Campbell, working independently.
    Modified for ECOFF and R4000 support by Ian Lance Taylor of Cygnus
@@ -2093,7 +2093,7 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
     {
       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, expressionS *address_expr,
              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 acd932196377deca7470c77fd5d74e5e65ee88b0..600f02122c0876c54c9b57b82fe2c3738c9a7e0b 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-mmix.c -- Assembler for Don Knuth's MMIX.
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -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 8bb96974be69536020d42d601a24621855d6e106..13ced8b6e30ff88dbf918ac774ee1753e3cebc27 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-s390.c -- Assemble for the S390
-   Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005
+   Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of GAS, the GNU Assembler.
@@ -1596,13 +1597,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 d5e926751774a54904b5b70e2202bf098d2ab2d0..2628ff7e6feb4a424d4a31fa6359283094f1d0c5 100644 (file)
@@ -4556,7 +4556,6 @@ sh_parse_name (char const *name, expressionS *exprP, char *nextcharP)
 
   return 1;
 }
-#endif
 
 void
 sh_cfi_frame_initial_instructions (void)
@@ -4606,4 +4605,5 @@ sh_regname_to_dw2regnum (const char *regname)
     }
   return regnum;
 }
+#endif /* OBJ_ELF */
 #endif /* BFD_ASSEMBLER */
index da10db2f575e2a1f14c14e6b1e33e5b3121c71e2..49f218afb128d39fca92423f074e29c0e5c8d45a 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-sparc.c -- Assemble for the SPARC
    Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004
+   1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    This file is part of GAS, the GNU Assembler.
 
@@ -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 f0308da662de9b7e0e0e022b0cfd6590320d0123..77f2ec6ff440f9eeec4e8d0a5a69eea7e524ac04 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-tic4x.c -- Assemble for the Texas Instruments TMS320C[34]x.
-   Copyright (C) 1997,1998, 2002, 2003 Free Software Foundation.
+   Copyright (C) 1997,1998, 2002, 2003, 2005 Free Software Foundation.
 
    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -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, max)
      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 0d6c72c42584a0e98c7692de866dcb85a7cf5b9f..eb7fceca552d918a0996fbefededc231aa43ba48 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-tic4x.h -- Assemble for the Texas TMS320C[34]X.
-   Copyright (C) 1997, 2002, 2003 Free Software Foundation.
+   Copyright (C) 1997, 2002, 2003, 2005 Free Software Foundation.
    
    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -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 ea7d1d6ed7c4f79847917c1041153fff3a9d5682..4cf9e15d9804a46c1641688fbaa2d8cbee57cfe1 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-vax.c - vax-specific -
-   Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
+   Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002,
+   2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 #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 +3412,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 f00a86613b577c12520ab404c81a5da4f1342348..79286342d4d9403bbe1add15f595cad8ffe5a8e1 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-xstormy16.c -- Assembler for the Sanyo XSTORMY16.
-   Copyright 2000, 2001, 2002, 2003 Free Software Foundation.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -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.        
index 1103be2477a6b3f4cbb84aded78016a517d18552..534d8b613a05a0a2f7968563c0d7d51a360a5f65 100644 (file)
@@ -1,5 +1,6 @@
 /* ECOFF debugging support.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+   2003, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    This file was put together by Ian Lance Taylor <ian@cygnus.com>.  A
@@ -2312,7 +2313,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake)
    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 2f09afca857edab27f18111790f9e6fa2a936d85..e2880d20448a04757d21ea1b8a727cd3bccd04c8 100644 (file)
@@ -1,5 +1,5 @@
 /* ecoff.h -- header file for ECOFF debugging support
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 2003, 2005
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -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.  */
diff --git a/gas/itbl-lex.h b/gas/itbl-lex.h
new file mode 100644 (file)
index 0000000..e51104e
--- /dev/null
@@ -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 e924efc56ef0eaf1073aebd75b9d378feb320942..c02bfebf1727a83f3f94d0d50b3c32bf8d7a6803 100644 (file)
@@ -1,5 +1,5 @@
 /* itbl-lex.l
-   Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "itbl-lex.h"
 #include <itbl-parse.h>
 
 #ifdef DEBUG
index 53552d7f31b088484c9ed6ff7a515f5066e88bdf..54d7204652991df7841d66a9bf39f21c843832b2 100644 (file)
@@ -1,5 +1,5 @@
 /* itbl-parse.y
-   Copyright 1997 Free Software Foundation, Inc.
+   Copyright 1997, 2002, 2003, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -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 131937edb24221f6a315b9f6612769a21e4d7c05..3365c824bdaf448df4b64c81da8a8e06440c5563 100644 (file)
@@ -1599,7 +1599,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 828fa4ae6c1282bf59274fcb353012e800060e3d..88a4ba05229bb6ac521505c9d11171bd546270ef 100644 (file)
@@ -1,6 +1,6 @@
 /* subsegs.c - subsegments -
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2002, 2004
+   1999, 2000, 2002, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -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 331c55709f5dde3604f29d3ad472c4b5a985590b..ec57731352d2c8d3d832e9f12263cc8621aeb03f 100644 (file)
@@ -1,5 +1,5 @@
 /* subsegs.h -> subsegs.c
-   Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000
+   Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -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 6a0662633dd269a3e282b6a0acef1906aaf73156..a33657cb3b4ff398df156a4b819e4f81197dd4f2 100644 (file)
--- a/gas/tc.h
+++ b/gas/tc.h
@@ -1,6 +1,7 @@
 /* tc.h - target cpu dependent
 
-   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2003, 2004
+   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000, 2001, 2003,
+   2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
 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 *);
This page took 0.052405 seconds and 4 git commands to generate.