aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/libgcc
diff options
context:
space:
mode:
authorPavel Chupin <pavel.v.chupin@intel.com>2012-11-27 14:09:50 +0400
committerPavel Chupin <pavel.v.chupin@intel.com>2013-04-18 16:50:12 +0400
commit9e1f9b3eacb51a67e675cd1195c472215fb16373 (patch)
treeaf3f97ee1874e13a5fe5ba61058aba045bbad279 /gcc-4.7/libgcc
parent5d65342898686feb3faceb3beb10529501d67b48 (diff)
downloadtoolchain_gcc-9e1f9b3eacb51a67e675cd1195c472215fb16373.tar.gz
toolchain_gcc-9e1f9b3eacb51a67e675cd1195c472215fb16373.tar.bz2
toolchain_gcc-9e1f9b3eacb51a67e675cd1195c472215fb16373.zip
[4.7] x32: Backport x32 support into 4.7
This patch contains all gcc changes required to build x32 compiler. They are backported from 4.8/trunk. Change-Id: I923f639c1f0cee5812b0f555a39bab0bd0723865 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'gcc-4.7/libgcc')
-rw-r--r--gcc-4.7/libgcc/ChangeLog.x329
-rw-r--r--gcc-4.7/libgcc/config/i386/linux-unwind.h19
-rw-r--r--gcc-4.7/libgcc/unwind-dw2.c3
3 files changed, 19 insertions, 12 deletions
diff --git a/gcc-4.7/libgcc/ChangeLog.x32 b/gcc-4.7/libgcc/ChangeLog.x32
new file mode 100644
index 000000000..8b6d4a2b7
--- /dev/null
+++ b/gcc-4.7/libgcc/ChangeLog.x32
@@ -0,0 +1,9 @@
+2012-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Define
+ only for glibc.
+
+2012-03-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * unwind-dw2.c (_Unwind_SetGRValue): Assert DWARF register size
+ <= saved reg size.
diff --git a/gcc-4.7/libgcc/config/i386/linux-unwind.h b/gcc-4.7/libgcc/config/i386/linux-unwind.h
index cd9a9a1e2..02b1897f0 100644
--- a/gcc-4.7/libgcc/config/i386/linux-unwind.h
+++ b/gcc-4.7/libgcc/config/i386/linux-unwind.h
@@ -29,11 +29,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef inhibit_libc
-#ifdef __x86_64__
+/* There's no sys/ucontext.h for glibc 2.0, so no
+ signal-turned-exceptions for them. There's also no configure-run for
+ the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the
+ target libc version macro should be enough. */
+#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
#include <signal.h>
#include <sys/ucontext.h>
+#ifdef __x86_64__
+
#define MD_FALLBACK_FRAME_STATE_FOR x86_64_fallback_frame_state
static _Unwind_Reason_Code
@@ -108,15 +114,6 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
#else /* ifdef __x86_64__ */
-/* There's no sys/ucontext.h for glibc 2.0, so no
- signal-turned-exceptions for them. There's also no configure-run for
- the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the
- target libc version macro should be enough. */
-#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
-
-#include <signal.h>
-#include <sys/ucontext.h>
-
#define MD_FALLBACK_FRAME_STATE_FOR x86_fallback_frame_state
static _Unwind_Reason_Code
@@ -197,6 +194,6 @@ x86_frob_update_context (struct _Unwind_Context *context,
_Unwind_SetSignalFrame (context, 1);
}
-#endif /* not glibc 2.0 */
#endif /* ifdef __x86_64__ */
+#endif /* not glibc 2.0 */
#endif /* ifdef inhibit_libc */
diff --git a/gcc-4.7/libgcc/unwind-dw2.c b/gcc-4.7/libgcc/unwind-dw2.c
index 475ad00bf..d1c62eef1 100644
--- a/gcc-4.7/libgcc/unwind-dw2.c
+++ b/gcc-4.7/libgcc/unwind-dw2.c
@@ -294,7 +294,8 @@ _Unwind_SetGRValue (struct _Unwind_Context *context, int index,
{
index = DWARF_REG_TO_UNWIND_COLUMN (index);
gcc_assert (index < (int) sizeof(dwarf_reg_size_table));
- gcc_assert (dwarf_reg_size_table[index] == sizeof (_Unwind_Context_Reg_Val));
+ /* Return column size may be smaller than _Unwind_Context_Reg_Val. */
+ gcc_assert (dwarf_reg_size_table[index] <= sizeof (_Unwind_Context_Reg_Val));
context->by_value[index] = 1;
context->reg[index] = _Unwind_Get_Unwind_Context_Reg_Val (val);