* config/i386/i386.h (ASM_PREFERRED_EH_DATA_FORMAT): New.
authorRichard Henderson <rth@redhat.com>
Wed, 16 May 2001 22:50:16 +0000 (15:50 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 16 May 2001 22:50:16 +0000 (15:50 -0700)
From-SVN: r42180

gcc/ChangeLog
gcc/config/i386/i386.h

index 4024dd0d47c86a26d507b732178caace5d0a9cb6..6d52557c23d3dffef596d73f2c6fda2a75b3cf75 100644 (file)
@@ -3,6 +3,8 @@
        * dwarf2asm.c (eh_data_format_name): Add names for "pointer size" 
        variants of non-absolute encodings.
 
+       * config/i386/i386.h (ASM_PREFERRED_EH_DATA_FORMAT): New.
+
 2001-05-16  Richard Henderson  <rth@redhat.com>
 
        * except.c (eh_data_format_name): Move to ...
index 27ac641478be5d64862c344eab1f4dd42e631456..6a229b7a8adeb49d267dc623d3f8c01b755f9202 100644 (file)
@@ -2830,6 +2830,18 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
 #define EH_RETURN_DATA_REGNO(N)        ((N) < 2 ? (N) : INVALID_REGNUM)
 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 2)
 
+/* Select a format to encode pointers in exception handling data.  CODE
+   is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
+   true if the symbol may be affected by dynamic relocations.
+
+   ??? All x86 object file formats are capable of representing this.
+   After all, the relocation needed is the same as for the call insn.
+   Whether or not a particular assembler allows us to enter such, I
+   guess we'll have to see.  */
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                      \
+  (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel                \
+   : DW_EH_PE_absptr)
+
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */