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
This commit is contained in:
Jan Hubicka 2005-08-01 20:56:14 +02:00 committed by Jan Hubicka
parent 23d28bfe80
commit 72ce3d4ac1
4 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,10 @@
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>
* config/host-linux.c (linux_gt_pch_get_address): Add new name

View File

@ -269,3 +269,4 @@ extern void ix86_fp_comparison_codes (enum rtx_code code, enum rtx_code *,
enum rtx_code *, enum rtx_code *);
extern enum rtx_code ix86_fp_compare_code_to_integer (enum rtx_code);
#endif
extern int asm_preferred_eh_data_format (int, int);

View File

@ -48,6 +48,7 @@ Boston, MA 02110-1301, USA. */
#include "langhooks.h"
#include "cgraph.h"
#include "tree-gimple.h"
#include "dwarf2.h"
#ifndef CHECK_STACK_LIMIT
#define CHECK_STACK_LIMIT (-1)
@ -17947,4 +17948,30 @@ ix86_stack_protect_fail (void)
: 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"

View File

@ -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
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_sdata4\
: DW_EH_PE_absptr)
asm_preferred_eh_data_format ((CODE), (GLOBAL))
/* This is how to output an insn to push a register on the stack.
It need not be very fast code. */