summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-06-29 07:57:23 -0700
committerKhem Raj <raj.khem@gmail.com>2010-06-29 07:57:23 -0700
commit38830bf257298bec1291ef4d09ebcc1dbf92eae0 (patch)
tree556bf48dc7ece83f9ecbb872b3d1c3e5650bd25b /libpthread/nptl/sysdeps/unix/sysv/linux
parentb87e4a4826b3508b759172d81b5b236e507f88d2 (diff)
arm/nptl: Use the old C version of _Unwind_Resume in thumb mode.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c13
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c11
2 files changed, 23 insertions, 1 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
index 7e77f18f7..88e120596 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
@@ -86,6 +86,17 @@ __unwind_freeres (void)
}
}
+#ifdef __thumb__
+void
+_Unwind_Resume (struct _Unwind_Exception *exc)
+{
+ if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ pthread_cancel_init ();
+
+ libgcc_s_resume (exc);
+}
+
+#else
/* It's vitally important that _Unwind_Resume not have a stack frame; the
ARM unwinder relies on register state at entrance. So we write this in
assembly. */
@@ -133,6 +144,8 @@ __asm__ (
" .size _Unwind_Resume, .-_Unwind_Resume\n"
);
+#endif
+
_Unwind_Reason_Code
__gcc_personality_v0 (_Unwind_State state,
struct _Unwind_Exception *ue_header,
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index a1366f37c..e35374d34 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
@@ -48,7 +48,15 @@ init (void)
libgcc_s_resume = resume;
libgcc_s_personality = personality;
}
-
+#ifdef __thumb__
+void
+_Unwind_Resume (struct _Unwind_Exception *exc)
+{
+ if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ init ();
+ libgcc_s_resume (exc);
+}
+#else
/* It's vitally important that _Unwind_Resume not have a stack frame; the
ARM unwinder relies on register state at entrance. So we write this in
assembly. */
@@ -95,6 +103,7 @@ __asm__ (
"2: .word libgcc_s_resume(GOTOFF)\n"
" .size _Unwind_Resume, .-_Unwind_Resume\n"
);
+#endif
_Unwind_Reason_Code
__gcc_personality_v0 (_Unwind_State state,