This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

x86 pic switch in .rodata


This patch consolidates all the identical definitions of
ASM_OUTPUT_ADDR_DIFF_ELT, and if the assembler is smart enough, allows for
PIC jump tables to be placed in .rodata instead of cluttering up .text.

The difference in code generation is all of

-       movl    %ebx, %eax
-       subl    .L10@GOTOFF(%ebx,%edx,4), %eax
+       movl    .L10@GOTOFF(%ebx,%edx,4), %eax
+       addl    %ebx, %eax

so don't expect any measurable improvements.  But at least we'll no longer
try to disassemble the jump table.

Bootstrapped on i686-linux with -fpic in BOOT_CFLAGS.

Built i386-openbsd and examined the output.

No native testing on other x86 platforms, but given that tablejump was
written to only expect three forms (64-bit, 32-bit pic, 32-bit non-pic),
I don't expect problems elsewhere.


r~


        * 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.


Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.545
diff -c -p -d -r1.545 configure.in
*** configure.in	2001/10/16 03:33:48	1.545
--- configure.in	2001/10/17 01:17:44
*************** changequote([,])dnl
*** 1631,1636 ****
--- 1631,1662 ----
  	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
  
Index: config/i386/386bsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/386bsd.h,v
retrieving revision 1.8
diff -c -p -d -r1.8 386bsd.h
*** 386bsd.h	2001/05/17 03:15:56	1.8
--- 386bsd.h	2001/10/17 01:17:44
***************
*** 47,68 ****
  
  #undef ASM_APP_OFF
  #define ASM_APP_OFF "#NO_APP\n"
- 
- /* 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.  */
--- 47,52 ----
Index: config/i386/beos-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/beos-elf.h,v
retrieving revision 1.9
diff -c -p -d -r1.9 beos-elf.h
*** beos-elf.h	2001/05/17 03:15:56	1.9
--- beos-elf.h	2001/10/17 01:17:44
*************** Boston, MA 02111-1307, USA.  */
*** 37,53 ****
  #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])
--- 37,42 ----
Index: config/i386/freebsd-aout.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/freebsd-aout.h,v
retrieving revision 1.5
diff -c -p -d -r1.5 freebsd-aout.h
*** freebsd-aout.h	2001/07/22 21:15:45	1.5
--- freebsd-aout.h	2001/10/17 01:17:44
*************** Boston, MA 02111-1307, USA.  */
*** 76,97 ****
  /* FreeBSD using a.out does not support DWARF2 unwinding mechanisms.  */
  #define DWARF2_UNWIND_INFO 0
  
- /* 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
--- 76,81 ----
Index: config/i386/freebsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/freebsd.h,v
retrieving revision 1.27
diff -c -p -d -r1.27 freebsd.h
*** freebsd.h	2001/05/22 19:28:15	1.27
--- freebsd.h	2001/10/17 01:17:44
*************** Boston, MA 02111-1307, USA.  */
*** 38,54 ****
  #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])
--- 38,43 ----
Index: config/i386/i386-interix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-interix.h,v
retrieving revision 1.17
diff -c -p -d -r1.17 i386-interix.h
*** i386-interix.h	2001/08/09 22:33:23	1.17
--- i386-interix.h	2001/10/17 01:17:44
*************** Boston, MA 02111-1307, USA.  */
*** 227,247 ****
      }									\
    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. */
  
--- 227,232 ----
Index: config/i386/i386-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-protos.h,v
retrieving revision 1.63
diff -c -p -d -r1.63 i386-protos.h
*** i386-protos.h	2001/09/28 17:20:22	1.63
--- i386-protos.h	2001/10/17 01:17:44
*************** extern void ix86_expand_epilogue PARAMS 
*** 36,41 ****
--- 36,44 ----
  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));
  
*************** extern void print_operand PARAMS ((FILE*
*** 94,99 ****
--- 97,103 ----
  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: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.318
diff -c -p -d -r1.318 i386.c
*** i386.c	2001/10/16 22:04:19	1.318
--- i386.c	2001/10/17 01:17:46
*************** ix86_output_block_profiler (file, blockn
*** 6659,6664 ****
--- 6659,6698 ----
        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);
+ }
  
  void
  ix86_expand_move (mode, operands)
Index: config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.209
diff -c -p -d -r1.209 i386.h
*** i386.h	2001/10/16 22:04:19	1.209
--- i386.h	2001/10/17 01:17:46
*************** do { long l;						\
*** 2979,2997 ****
  #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.
!      */
  
  #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
!   fprintf (FILE, "%s%s%d\n", TARGET_64BIT ? ASM_QUAD : ASM_LONG, LPREFIX, 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.  
!  */
  
  #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
!   fprintf (FILE, "%s%s%d-%s%d\n",ASM_LONG, LPREFIX, VALUE, LPREFIX, REL)
  
  /* A C statement that outputs an address constant appropriate to 
     for DWARF debugging.  */
--- 2979,2999 ----
  #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.  */
  
  #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
!   ix86_output_addr_vec_elt (FILE, VALUE)
  
! /* This is how to output an element of a case-vector that is relative.  */
  
  #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, 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: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.304
diff -c -p -d -r1.304 i386.md
*** i386.md	2001/10/16 22:04:19	1.304
--- i386.md	2001/10/17 01:17:47
***************
*** 13123,13128 ****
--- 13123,13135 ----
  					   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: config/i386/i386elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386elf.h,v
retrieving revision 1.15
diff -c -p -d -r1.15 i386elf.h
*** i386elf.h	2001/10/09 10:16:12	1.15
--- i386elf.h	2001/10/17 01:17:47
*************** do { long value[3];							\
*** 156,174 ****
      }									\
    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.  */
--- 156,161 ----
Index: config/i386/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/linux.h,v
retrieving revision 1.29
diff -c -p -d -r1.29 linux.h
*** linux.h	2001/05/22 16:57:40	1.29
--- linux.h	2001/10/17 01:17:47
*************** Boston, MA 02111-1307, USA.  */
*** 43,59 ****
  #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])
--- 43,48 ----
Index: config/i386/netbsd-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/netbsd-elf.h,v
retrieving revision 1.3
diff -c -p -d -r1.3 netbsd-elf.h
*** netbsd-elf.h	2001/10/16 22:38:40	1.3
--- netbsd-elf.h	2001/10/17 01:17:47
*************** Boston, MA 02111-1307, USA.  */
*** 168,183 ****
    }
  #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.
   */
--- 168,173 ----
Index: config/i386/netbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/netbsd.h,v
retrieving revision 1.17
diff -c -p -d -r1.17 netbsd.h
*** netbsd.h	2001/05/20 19:54:04	1.17
--- netbsd.h	2001/10/17 01:17:47
***************
*** 35,56 ****
  
  #undef ASM_APP_OFF
  #define ASM_APP_OFF "#NO_APP\n"
- 
- /* 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.  */
--- 35,40 ----
Index: config/i386/openbsd.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/openbsd.h,v
retrieving revision 1.12
diff -c -p -d -r1.12 openbsd.h
*** openbsd.h	2001/07/13 18:12:21	1.12
--- openbsd.h	2001/10/17 01:17:47
*************** Boston, MA 02111-1307, USA.  */
*** 59,82 ****
  #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
--- 59,64 ----
Index: config/i386/ptx4-i.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/ptx4-i.h,v
retrieving revision 1.12
diff -c -p -d -r1.12 ptx4-i.h
*** ptx4-i.h	2001/05/20 19:54:04	1.12
--- ptx4-i.h	2001/10/17 01:17:47
*************** do { long value[3];							\
*** 150,165 ****
          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
--- 150,152 ----
Index: config/i386/rtemself.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/rtemself.h,v
retrieving revision 1.10
diff -c -p -d -r1.10 rtemself.h
*** rtemself.h	2001/05/17 03:15:56	1.10
--- rtemself.h	2001/10/17 01:17:47
*************** Boston, MA 02111-1307, USA.  */
*** 38,54 ****
  #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]
  
--- 38,43 ----
Index: config/i386/sco5.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sco5.h,v
retrieving revision 1.52
diff -c -p -d -r1.52 sco5.h
*** sco5.h	2001/10/16 22:24:16	1.52
--- sco5.h	2001/10/17 01:17:47
*************** do {									\
*** 237,251 ****
      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 {									\
--- 237,242 ----
*************** init_section ()								\
*** 532,540 ****
  #define SUBTARGET_FRAME_POINTER_REQUIRED				\
    ((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						\
--- 523,528 ----
Index: config/i386/sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sysv4.h,v
retrieving revision 1.13
diff -c -p -d -r1.13 sysv4.h
*** sysv4.h	2001/05/22 16:57:40	1.13
--- sysv4.h	2001/10/17 01:17:47
*************** do { long value[3];							\
*** 159,177 ****
      }									\
    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.
--- 159,164 ----
Index: config/i386/x86-64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/x86-64.h,v
retrieving revision 1.1
diff -c -p -d -r1.1 x86-64.h
*** x86-64.h	2001/10/02 10:59:41	1.1
--- x86-64.h	2001/10/17 01:17:47
*************** Boston, MA 02111-1307, USA.  */
*** 27,46 ****
  #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])
--- 27,32 ----


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