aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog30
-rw-r--r--gcc/config.gcc1
-rw-r--r--gcc/doc/tm.texi18
-rw-r--r--gcc/doc/tm.texi.in18
-rw-r--r--gcc/system.h3
5 files changed, 69 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ac35dd6..d1371d2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,33 @@
+2011-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR other/48007
+ * config.gcc (libgcc_tm_file): Add i386/value-unwind.h for
+ Linux/x86.
+
+ * system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned.
+ (ASSUME_EXTENDED_UNWIND_CONTEXT): Likewise.
+
+ * unwind-dw2.c (ASSUME_EXTENDED_UNWIND_CONTEXT): New.
+ (_Unwind_Context_Reg_Val): Likewise.
+ (_Unwind_Get_Unwind_Word): Likewise.
+ (_Unwind_Get_Unwind_Context_Reg_Val): Likewise.
+ (_Unwind_Context): Use _Unwind_Context_Reg_Val on the reg field.
+ (_Unwind_IsExtendedContext): Check ASSUME_EXTENDED_UNWIND_CONTEXT
+ for EXTENDED_CONTEXT_BIT.
+ (__frame_state_for): Likewise.
+ (uw_init_context_1): Likewise.
+ (_Unwind_GetGR): Updated.
+ (_Unwind_SetGR): Likewise.
+ (_Unwind_GetGRPtr): Likewise.
+ (_Unwind_SetGRPtr): Likewise.
+ (_Unwind_SetGRValue): Likewise.
+ (_Unwind_GRByValue): Likewise.
+ (uw_install_context_1): Likewise.
+
+ * doc/tm.texi.in: Document REG_VALUE_IN_UNWIND_CONTEXT and
+ ASSUME_EXTENDED_UNWIND_CONTEXT.
+ * doc/tm.texi: Regenerated.
+
2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* Makefile.in (gengtype$(exeext)): Add $(LDFLAGS).
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 716fa22..ec13d93 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2663,6 +2663,7 @@ esac
case ${target} in
i[34567]86-*-linux* | x86_64-*-linux*)
tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
+ libgcc_tm_file="${libgcc_tm_file} i386/value-unwind.h"
;;
i[34567]86-*-* | x86_64-*-*)
tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 097531f..74a2324 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -3725,6 +3725,24 @@ return @code{@var{regno}}.
@end defmac
+@defmac REG_VALUE_IN_UNWIND_CONTEXT
+
+Define this macro if the target stores register values as
+@code{_Unwind_Word} type in unwind context. It should be defined if
+target register size is larger than the size of @code{void *}. The
+default is to store register values as @code{void *} type.
+
+@end defmac
+
+@defmac ASSUME_EXTENDED_UNWIND_CONTEXT
+
+Define this macro to be 1 if the target always uses extended unwind
+context with version, args_size and by_value fields. If it is undefined,
+it will be defined to 1 when @code{REG_VALUE_IN_UNWIND_CONTEXT} is
+defined and 0 otherwise.
+
+@end defmac
+
@node Elimination
@subsection Eliminating Frame Pointer and Arg Pointer
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 01beeb4..f63fe4a 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -3711,6 +3711,24 @@ return @code{@var{regno}}.
@end defmac
+@defmac REG_VALUE_IN_UNWIND_CONTEXT
+
+Define this macro if the target stores register values as
+@code{_Unwind_Word} type in unwind context. It should be defined if
+target register size is larger than the size of @code{void *}. The
+default is to store register values as @code{void *} type.
+
+@end defmac
+
+@defmac ASSUME_EXTENDED_UNWIND_CONTEXT
+
+Define this macro to be 1 if the target always uses extended unwind
+context with version, args_size and by_value fields. If it is undefined,
+it will be defined to 1 when @code{REG_VALUE_IN_UNWIND_CONTEXT} is
+defined and 0 otherwise.
+
+@end defmac
+
@node Elimination
@subsection Eliminating Frame Pointer and Arg Pointer
diff --git a/gcc/system.h b/gcc/system.h
index a7db6f5..9698c61 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -802,7 +802,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
#pragma GCC poison DECLARE_LIBRARY_RENAMES LIBGCC2_GNU_PREFIX \
- MD_UNWIND_SUPPORT MD_FROB_UPDATE_CONTEXT ENABLE_EXECUTE_STACK
+ MD_UNWIND_SUPPORT MD_FROB_UPDATE_CONTEXT ENABLE_EXECUTE_STACK \
+ REG_VALUE_IN_UNWIND_CONTEXT ASSUME_EXTENDED_UNWIND_CONTEXT
/* Other obsolete target macros, or macros that used to be in target
headers and were not used, and may be obsolete or may never have