configure.in (HAVE_AS_GOTOFF_IN_DATA): New x86 check.
authorRichard Henderson <rth@redhat.com>
Wed, 17 Oct 2001 01:39:47 +0000 (18:39 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 17 Oct 2001 01:39:47 +0000 (18:39 -0700)
        * configure.in (HAVE_AS_GOTOFF_IN_DATA): New x86 check.
        * configure, config.in: Rebuild.

        * config/i386/i386.c (ix86_output_addr_vec_elt): New.
        (ix86_output_addr_diff_elt): New.
        * config/i386/i386.h (ASM_OUTPUT_ADDR_VEC_ELT): Use them.
        (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
        (JUMP_TABLES_IN_TEXT_SECTION): New.
        * config/i386/i386.md (tablejump): Handle HAVE_AS_GOTOFF_IN_DATA.
        * config/i386/i386-protos.h: Update.

        * config/i386/386bsd.h, config/i386/beos-elf.h,
        config/i386/freebsd-aout.h, config/i386/freebsd.h,
        config/i386/i386-interix.h, config/i386/i386elf.h,
        config/i386/linux.h, config/i386/netbsd-elf.h,
        config/i386/netbsd.h, config/i386/openbsd.h,
        config/i386/ptx4-i.h, config/i386/rtemself.h,
        config/i386/sco5.h, config/i386/sysv4.h, config/i386/x86-64.h
        (ASM_OUTPUT_ADDR_DIFF_ELT, JUMP_TABLES_IN_TEXT_SECTION): Remove.

From-SVN: r46303

23 files changed:
gcc/ChangeLog
gcc/config.in
gcc/config/i386/386bsd.h
gcc/config/i386/beos-elf.h
gcc/config/i386/freebsd-aout.h
gcc/config/i386/freebsd.h
gcc/config/i386/i386-interix.h
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/config/i386/i386elf.h
gcc/config/i386/linux.h
gcc/config/i386/netbsd-elf.h
gcc/config/i386/netbsd.h
gcc/config/i386/openbsd.h
gcc/config/i386/ptx4-i.h
gcc/config/i386/rtemself.h
gcc/config/i386/sco5.h
gcc/config/i386/sysv4.h
gcc/config/i386/x86-64.h
gcc/configure
gcc/configure.in

index 7d3b83a12a8ce09797d8ac4784bdb5d44ecfc58b..bd706c3d7cbc05f1a83f16616d7b742f1e68340c 100644 (file)
@@ -1,3 +1,25 @@
+2001-10-16  Richard Henderson  <rth@redhat.com>
+
+       * configure.in (HAVE_AS_GOTOFF_IN_DATA): New x86 check.
+       * configure, config.in: Rebuild.
+
+       * config/i386/i386.c (ix86_output_addr_vec_elt): New.
+       (ix86_output_addr_diff_elt): New.
+       * config/i386/i386.h (ASM_OUTPUT_ADDR_VEC_ELT): Use them.
+       (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
+       (JUMP_TABLES_IN_TEXT_SECTION): New.
+       * config/i386/i386.md (tablejump): Handle HAVE_AS_GOTOFF_IN_DATA.
+       * config/i386/i386-protos.h: Update.
+
+       * config/i386/386bsd.h, config/i386/beos-elf.h,
+       config/i386/freebsd-aout.h, config/i386/freebsd.h,
+       config/i386/i386-interix.h, config/i386/i386elf.h,
+       config/i386/linux.h, config/i386/netbsd-elf.h,
+       config/i386/netbsd.h, config/i386/openbsd.h,
+       config/i386/ptx4-i.h, config/i386/rtemself.h,
+       config/i386/sco5.h, config/i386/sysv4.h, config/i386/x86-64.h
+       (ASM_OUTPUT_ADDR_DIFF_ELT, JUMP_TABLES_IN_TEXT_SECTION): Remove.
+
 2001-10-16  Florian Weimer  <fw@deneb.enyo.de>
 
        * stmt.c (expand_asm_operands): Update commentary.
index 1c0238bd3ebf7822af488865f3e87c458f3962cb..46ea80143d085bac8fede6423a6957a22507fb8d 100644 (file)
@@ -1,4 +1,4 @@
-/* config.in.  Generated automatically from configure.in by autoheader 2.13.  */
+/* config.in.  Generated automatically from configure.in by autoheader.  */
 
 /* Define if using alloca.c.  */
 #undef C_ALLOCA
@@ -75,7 +75,7 @@
 #undef vfork
 
 /* Define if your assembler supports specifying the maximum number
-   of bytes to skip when using the GAS .p2align command. */
+   of bytes to skip when using the GAS .p2align command.  */
 #undef HAVE_GAS_MAX_SKIP_P2ALIGN
 
 /* Define if your assembler supports .balign and .p2align.  */
@@ -87,7 +87,7 @@
 /* Define to `int' if <sys/types.h> doesn't define.  */
 #undef ssize_t
 
-/* Define if cpp should also search $prefix/include. */
+/* Define if cpp should also search $prefix/include.  */
 #undef PREFIX_INCLUDE_DIR
 
 /* Define if you have the __argz_count function.  */
 /* Define if your assembler supports offsetable %lo(). */
 #undef HAVE_AS_OFFSETABLE_LO10
 
+/* Define true if the assembler supports '.long foo@GOTOFF'. */
+#undef HAVE_AS_GOTOFF_IN_DATA
+
 /* Define if your assembler supports dwarf2 .file/.loc directives,
    and preserves file table indicies exactly as given. */
 #undef HAVE_AS_DWARF2_DEBUG_LINE
index 84d17940ab52cf02da98505921d8bb3c08ddeed3..a34e6e5db103de237bc633ef34182e791f1846b5 100644 (file)
 
 #undef ASM_APP_OFF
 #define ASM_APP_OFF "#NO_APP\n"
-\f
-/* The following macros are stolen from i386v4.h */
-/* These have to be defined to get PIC code correct */
-
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION 1
 
 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
    we want to retain compatibility with older gcc versions.  */
index be948a3759c5a3ac6aee0fc0b8ebdbbd3fccffdb..d4c0de4ec84eba09110227caef8df48b1e983c04 100644 (file)
@@ -37,17 +37,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START " #"
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n) \
   (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
index a2c318f03678a368cb50028d68650ae2bbcfb9a6..6dc0a1df3062fd96ad9839127af0b1887811bdb6 100644 (file)
@@ -76,22 +76,6 @@ Boston, MA 02111-1307, USA.  */
 /* FreeBSD using a.out does not support DWARF2 unwinding mechanisms.  */
 #define DWARF2_UNWIND_INFO 0
 \f
-/* The following macros are stolen from i386v4.h */
-/* These have to be defined to get PIC code correct */
-
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION 1
-
 /* Don't default to pcc-struct-return, because in FreeBSD we prefer the
    superior nature of the older gcc way.  */
 #define DEFAULT_PCC_STRUCT_RETURN 0
index 2d34117d118dba430ac09561400137edafee08db..ba15268a6fba7f96e9d4416074b4ba33880a84ed 100644 (file)
@@ -38,17 +38,6 @@ Boston, MA 02111-1307, USA.  */
 #undef SET_ASM_OP
 #define SET_ASM_OP     "\t.set\t"
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf ((FILE), "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n) \
   (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
index 5b1141066b11c02be5b1d9617826314c2f24888f..3da08078141f2546d98e759e3cb61ae0dd34502e 100644 (file)
@@ -227,21 +227,6 @@ Boston, MA 02111-1307, USA.  */
     }                                                                  \
   while (0)
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs.
-   PE format differs on what PC-relative offsets look like (see
-   coff_i386_rtype_to_howto), and we need to compensate (by one word) here. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long __GLOBAL_OFFSET_TABLE_+[.-%s%d+4]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION 1
-
 /* Emit code to check the stack when allocating more that 4000
    bytes in one go. */
 
index 410b84e8de62c2ba8e97bbc0e381e45f4215b684..111dc1616a76fa055330f8bd9303957f2c3c01c5 100644 (file)
@@ -36,6 +36,9 @@ extern void ix86_expand_epilogue PARAMS ((int));
 extern void ix86_output_function_block_profiler PARAMS ((FILE *, int));
 extern void ix86_output_block_profiler PARAMS ((FILE *, int));
 
+extern void ix86_output_addr_vec_elt PARAMS ((FILE *, int));
+extern void ix86_output_addr_diff_elt PARAMS ((FILE *, int, int));
+
 #ifdef RTX_CODE
 extern int ix86_aligned_p PARAMS ((rtx));
 
@@ -94,6 +97,7 @@ extern void print_operand PARAMS ((FILE*, rtx, int));
 extern void print_operand_address PARAMS ((FILE*, rtx));
 
 extern void split_di PARAMS ((rtx[], int, rtx[], rtx[]));
+extern void split_ti PARAMS ((rtx[], int, rtx[], rtx[]));
 
 extern const char *output_387_binary_op PARAMS ((rtx, rtx*));
 extern const char *output_fix_trunc PARAMS ((rtx, rtx*));
index 00b28a94628a3827bfc63cd0d3220daa9a7d31d0..6be389cc9203b6d48e2c18be061e50da04a8015e 100644 (file)
@@ -6659,6 +6659,40 @@ ix86_output_block_profiler (file, blockno)
       break;
     }
 }
+
+void
+ix86_output_addr_vec_elt (file, value)
+     FILE *file;
+     int value;
+{
+  const char *directive = ASM_LONG;
+
+  if (TARGET_64BIT)
+    {
+#ifdef ASM_QUAD
+      directive = ASM_QUAD;
+#else
+      abort ();
+#endif
+    }
+
+  fprintf (file, "%s%s%d\n", directive, LPREFIX, value);
+}
+
+void
+ix86_output_addr_diff_elt (file, value, rel)
+     FILE *file;
+     int value, rel;
+{
+  if (TARGET_64BIT)
+    fprintf (file, "%s%s%d-.+4+(.-%s%d)\n",
+            ASM_LONG, LPREFIX, value, LPREFIX, rel);
+  else if (HAVE_AS_GOTOFF_IN_DATA)
+    fprintf (file, "%s%s%d@GOTOFF\n", ASM_LONG, LPREFIX, value);
+  else
+    asm_fprintf (file, "%s%U_GLOBAL_OFFSET_TABLE_+[.-%s%d]\n",
+                ASM_LONG, LPREFIX, value);
+}
 \f
 void
 ix86_expand_move (mode, operands)
index 75b72d813e57b48968b48537ec8981400b15d92c..49c1b27132d273f0e97203d0892887b3a2e10021 100644 (file)
@@ -2979,19 +2979,21 @@ do { long l;                                            \
 #define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
   asm_fprintf (FILE, "\tpop{l}\t%%e%s\n", reg_names[REGNO])
 
-/* This is how to output an element of a case-vector that is absolute.
-     */
+/* This is how to output an element of a case-vector that is absolute.  */
 
 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
-  fprintf (FILE, "%s%s%d\n", TARGET_64BIT ? ASM_QUAD : ASM_LONG, LPREFIX, VALUE)
+  ix86_output_addr_vec_elt (FILE, VALUE)
 
-/* This is how to output an element of a case-vector that is relative.
-   We don't use these on the 386 yet, because the ATT assembler can't do
-   forward reference the differences.  
- */
+/* This is how to output an element of a case-vector that is relative.  */
 
 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "%s%s%d-%s%d\n",ASM_LONG, LPREFIX, VALUE, LPREFIX, REL)
+  ix86_output_addr_diff_elt (FILE, VALUE, REL)
+
+/* Under some conditions we need jump tables in the text section, because
+   the assembler cannot handle label differences between sections.  */
+
+#define JUMP_TABLES_IN_TEXT_SECTION \
+  (!TARGET_64BIT && flag_pic && !HAVE_AS_GOTOFF_IN_DATA)
 
 /* A C statement that outputs an address constant appropriate to 
    for DWARF debugging.  */
index c02702ab34f9782f44b75d6e3d3942e8d112751d..e12c4bd2bc913de3cc8a8e3403fdaf299009339f 100644 (file)
                                           gen_rtx_LABEL_REF (Pmode, operands[1]),
                                           NULL_RTX, 0,
                                           OPTAB_DIRECT);
+      else if (HAVE_AS_GOTOFF_IN_DATA)
+       {
+         operands[0] = expand_simple_binop (Pmode, PLUS, operands[0],
+                                            pic_offset_table_rtx, NULL_RTX,
+                                            1, OPTAB_DIRECT);
+         current_function_uses_pic_offset_table = 1;
+       }
       else
        {
          operands[0] = expand_simple_binop (Pmode, MINUS, pic_offset_table_rtx,
index 34ceed533f95cf59848523d4b9fedf4dbae52c5a..2f47573735ebac510207b037ff9dbecaf80a7ee1 100644 (file)
@@ -156,19 +156,6 @@ do { long value[3];                                                        \
     }                                                                  \
   while (0)
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION 1
-
 #define LOCAL_LABEL_PREFIX     "."
 
 /* Switch into a generic section.  */
index c80a3feb5a06dc5d45b34f827e8b6bb465bbfadf..9ace75f5ca810559a2aedd0b3abe9d13cb36c090 100644 (file)
@@ -43,17 +43,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START "#"
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n) \
   (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
index 48d8129163f5cf90bdc54360038e0f33e2e391fb..e37b1c11c0206f95c6fd94e6e8c28fff417f9caa 100644 (file)
@@ -168,16 +168,6 @@ Boston, MA 02111-1307, USA.  */
   }
 #endif
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf ((FILE), "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-
 /*
  * We always use gas here, so we don't worry about ECOFF assembler problems.
  */
index 8ff61bce0d0841104a48f8df50eb28f85c720e38..8f5ba201e9a166ed8d5a7e210ad7d5a34ec2e4e9 100644 (file)
 
 #undef ASM_APP_OFF
 #define ASM_APP_OFF "#NO_APP\n"
-\f
-/* The following macros are stolen from i386v4.h */
-/* These have to be defined to get PIC code correct */
-
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION 1
 
 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
    we want to retain compatibility with older gcc versions.  */
index 470577505373e9f0053ae183eaf57b9867e5970b..a07ee1524b8efeeaaec0d3b4134ad942be3072e5 100644 (file)
@@ -59,24 +59,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_APP_OFF
 #define ASM_APP_OFF "#NO_APP\n"
 
-/* The following macros were originally stolen from i386v4.h.
-   These have to be defined to get PIC code correct.  */
-
-/* Assembler format: dispatch tables.  */
-
-/* How to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs.  */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Assembler format: sections.  */
-
-/* Indicate when jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION  (flag_pic)
-
 /* Stack & calling: aggregate returns.  */
 
 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
index 735408ebf8f56e3e79eb59f2902e9be3d47a6ca2..ad2df8ecdd8a9d45e1ab41e97a9c20dbade8848e 100644 (file)
@@ -150,16 +150,3 @@ do { long value[3];                                                        \
         fprintf ((FILE), "\n");                                                \
     }                                                                  \
   while (0)
-
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION 1
index 003f248fb05750005dfdb7ef3f3903c6264878e3..ce59e7f79a6aceb7ec05f670d97d221c60c841d4 100644 (file)
@@ -38,17 +38,6 @@ Boston, MA 02111-1307, USA.  */
 #undef DEFAULT_PCC_STRUCT_RETURN
 #define DEFAULT_PCC_STRUCT_RETURN 1
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
 
index 16d5fcf2a45ca153ba01201a040f16bb3145cf36..b40651282df88634ab0433a12c866d23b74bc581 100644 (file)
@@ -237,15 +237,6 @@ do {                                                                       \
     sprintf (LABEL, ".%s%d", (PREFIX), (NUM));                         \
 } while (0)
 
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-do {                                                                   \
-  if (TARGET_ELF)                                                      \
-    fprintf (FILE, "%s_GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", ASM_LONG, LPREFIX, VALUE); \
-  else                                                                 \
-    fprintf (FILE, "%s%s%d-%s%d\n", ASM_LONG, LPREFIX,VALUE,LPREFIX,REL); \
-} while (0)
-
 #undef ASM_OUTPUT_ALIGNED_COMMON
 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)             \
 do {                                                                   \
@@ -533,9 +524,6 @@ init_section ()                                                             \
   ((TARGET_ELF) ? 0 :                                                  \
    (current_function_calls_setjmp || current_function_calls_longjmp))
 
-#undef JUMP_TABLES_IN_TEXT_SECTION
-#define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ELF && flag_pic)
-
 #undef LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX                                             \
  ((TARGET_ELF) ? "" : ".")
index f56d58326c0f12747ab4dbe9f702713be6937aa0..56cd2381fc0a066a9e5570304579e836ebc696ac 100644 (file)
@@ -159,19 +159,6 @@ do { long value[3];                                                        \
     }                                                                  \
   while (0)
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
-
 /* A C statement (sans semicolon) to output to the stdio stream
    FILE the assembler definition of uninitialized global DECL named
    NAME whose size is SIZE bytes and alignment is ALIGN bytes.
index baf5b2488dc7f2639d8d98288340eb7a90ba18f4..8c9912dc562ca64fe5a60560743807483f52d116 100644 (file)
@@ -27,20 +27,6 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_COMMENT_START
 #define ASM_COMMENT_START "#"
 
-/* This is how to output an element of a case-vector that is relative.
-   This is only used for PIC code.  See comments by the `casesi' insn in
-   i386.md for an explanation of the expression this outputs. */
-#undef ASM_OUTPUT_ADDR_DIFF_ELT
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-  if (TARGET_64BIT) \
-    fprintf (FILE, "\t.long %s%d-.+4+(.-%s%d)\n", LPREFIX, VALUE, LPREFIX, REL); \
-  else \
-    fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
-
-/* Indicate that jump tables go in the text section.  This is
-   necessary when compiling PIC code.  */
-#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic && !TARGET_64BIT)
-
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(n) \
   (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
index 413db875718e8ab36b1e5d50a52952ec80189cf9..e177db905edbfa99c1be14b9c1cc2da7e0012cf0 100755 (executable)
@@ -2057,7 +2057,7 @@ EOF
 fi
 
 # Find some useful tools
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -7487,11 +7487,39 @@ EOF
 
     fi
     echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+
+    echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
+echo "configure:7493: checking assembler GOTOFF in data directives" >&5
+    gcc_cv_as_gotoff_in_data=no
+    if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
+    then
+      if test "$gcc_cv_gas_major_version" -eq 2 \
+        -a "$gcc_cv_gas_minor_version" -ge 11 \
+        -o "$gcc_cv_gas_major_version" -gt 2; then
+       gcc_cv_as_gotoff_in_data=yes
+      fi
+    elif test x$gcc_cv_as != x; then
+       cat > conftest.s <<EOF
+       .text
+.L0:
+       nop
+       .data
+       .long .L0@GOTOFF
+EOF
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+         gcc_cv_as_gotoff_in_data=yes
+       fi
+    fi
+    cat >> confdefs.h <<EOF
+#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
+EOF
+
+    echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6
     ;;
 esac
 
 echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
-echo "configure:7495: checking assembler dwarf2 debug_line support" >&5
+echo "configure:7523: checking assembler dwarf2 debug_line support" >&5
 gcc_cv_as_dwarf2_debug_line=no
 # ??? Not all targets support dwarf2 debug_line, even within a version
 # of gas.  Moreover, we need to emit a valid instruction to trigger any
@@ -7683,7 +7711,7 @@ fi
 
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:7687: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:7715: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
index 6ce9d2c626fb8a479f22f3369fd7d627e73a3b35..babc720c32e6ca07e113450953159d9538fed8d2 100644 (file)
@@ -1631,6 +1631,32 @@ changequote([,])dnl
        AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr '[a-z ]' '[A-Z_]'`)
     fi
     AC_MSG_RESULT($gcc_cv_as_instructions)
+
+    AC_MSG_CHECKING(assembler GOTOFF in data directives)
+    gcc_cv_as_gotoff_in_data=no
+    if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
+    then
+      if test "$gcc_cv_gas_major_version" -eq 2 \
+        -a "$gcc_cv_gas_minor_version" -ge 11 \
+        -o "$gcc_cv_gas_major_version" -gt 2; then
+       gcc_cv_as_gotoff_in_data=yes
+      fi
+    elif test x$gcc_cv_as != x; then
+       cat > conftest.s <<EOF
+       .text
+.L0:
+       nop
+       .data
+       .long .L0@GOTOFF
+EOF
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+         gcc_cv_as_gotoff_in_data=yes
+       fi
+    fi
+    AC_DEFINE_UNQUOTED(HAVE_AS_GOTOFF_IN_DATA,
+      [`if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`],
+      [Define true if the assembler supports '.long foo@GOTOFF'.])
+    AC_MSG_RESULT($gcc_cv_as_gotoff_in_data)
     ;;
 esac