Commit 72ce3d4a by Jan Hubicka Committed by Jan Hubicka

i386-protos.h (asm_preferred_eh_data_format): Declare.

	* i386-protos.h (asm_preferred_eh_data_format): Declare.
	* i386.c: Include dwarf2.h
	(asm_preferred_eh_data_format): New.
	* i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Move offline.

From-SVN: r102638
parent 23d28bfe
2005-08-01 Jan Hubicka <jh@suse.cz>
* i386-protos.h (asm_preferred_eh_data_format): Declare.
* i386.c: Include dwarf2.h
(asm_preferred_eh_data_format): New.
* i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Move offline.
2005-08-01 Ian Lance Taylor <ian@airs.com> 2005-08-01 Ian Lance Taylor <ian@airs.com>
* config/host-linux.c (linux_gt_pch_get_address): Add new name * config/host-linux.c (linux_gt_pch_get_address): Add new name
......
...@@ -269,3 +269,4 @@ extern void ix86_fp_comparison_codes (enum rtx_code code, enum rtx_code *, ...@@ -269,3 +269,4 @@ extern void ix86_fp_comparison_codes (enum rtx_code code, enum rtx_code *,
enum rtx_code *, enum rtx_code *); enum rtx_code *, enum rtx_code *);
extern enum rtx_code ix86_fp_compare_code_to_integer (enum rtx_code); extern enum rtx_code ix86_fp_compare_code_to_integer (enum rtx_code);
#endif #endif
extern int asm_preferred_eh_data_format (int, int);
...@@ -48,6 +48,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -48,6 +48,7 @@ Boston, MA 02110-1301, USA. */
#include "langhooks.h" #include "langhooks.h"
#include "cgraph.h" #include "cgraph.h"
#include "tree-gimple.h" #include "tree-gimple.h"
#include "dwarf2.h"
#ifndef CHECK_STACK_LIMIT #ifndef CHECK_STACK_LIMIT
#define CHECK_STACK_LIMIT (-1) #define CHECK_STACK_LIMIT (-1)
...@@ -17947,4 +17948,30 @@ ix86_stack_protect_fail (void) ...@@ -17947,4 +17948,30 @@ ix86_stack_protect_fail (void)
: default_hidden_stack_protect_fail (); : default_hidden_stack_protect_fail ();
} }
/* 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. */
int
asm_preferred_eh_data_format (int code, int global)
{
if (flag_pic)
{
int type = DW_EH_PE_sdata8;
if (!TARGET_64BIT
|| ix86_cmodel == CM_SMALL_PIC
|| (ix86_cmodel == CM_MEDIUM_PIC && (global || code)))
type = DW_EH_PE_sdata4;
return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type;
}
if (ix86_cmodel == CM_SMALL
|| (ix86_cmodel == CM_MEDIUM && code))
return DW_EH_PE_udata4;
return DW_EH_PE_absptr;
}
#include "gt-i386.h" #include "gt-i386.h"
...@@ -2023,9 +2023,7 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER]; ...@@ -2023,9 +2023,7 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
Whether or not a particular assembler allows us to enter such, I Whether or not a particular assembler allows us to enter such, I
guess we'll have to see. */ guess we'll have to see. */
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
(flag_pic \ asm_preferred_eh_data_format ((CODE), (GLOBAL))
? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
: DW_EH_PE_absptr)
/* This is how to output an insn to push a register on the stack. /* This is how to output an insn to push a register on the stack.
It need not be very fast code. */ It need not be very fast code. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment