aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2006-05-19 12:52:26 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2006-05-19 12:52:26 +0000
commitfa807ff666ce3d32cd2e175c7ea97fb9be15c8b2 (patch)
tree5970398af173f09f8b7191f346b00c223616482f /gcc
parent721a8ac58bbc00df746ccdfd6529f2d5424b11f3 (diff)
downloadgcc-fa807ff666ce3d32cd2e175c7ea97fb9be15c8b2.zip
gcc-fa807ff666ce3d32cd2e175c7ea97fb9be15c8b2.tar.gz
gcc-fa807ff666ce3d32cd2e175c7ea97fb9be15c8b2.tar.bz2
linux-unwind.h: Include <asm/unistd.h>
* config/mips/linux-unwind.h: Include <asm/unistd.h> (mips_fallback_frame_state): Use syscall numbers to determine the appropriate li instruction for the current ABI. Only use __NR_sigreturn for o32. From-SVN: r113906
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/mips/linux-unwind.h14
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1e3bbf6..c4a6512 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-19 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/linux-unwind.h: Include <asm/unistd.h>
+ (mips_fallback_frame_state): Use syscall numbers to determine
+ the appropriate li instruction for the current ABI. Only use
+ __NR_sigreturn for o32.
+
2006-05-19 Nicolas Setton <setton@adacore.com>
* langhooks.h (struct lang_hooks): Add dwarf_name language hook.
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
index 4152138..4f96e95 100644
--- a/gcc/config/mips/linux-unwind.h
+++ b/gcc/config/mips/linux-unwind.h
@@ -31,6 +31,7 @@ Boston, MA 02110-1301, USA. */
state data appropriately. See unwind-dw2.c for the structs. */
#include <signal.h>
+#include <asm/unistd.h>
/* The third parameter to the signal handler points to something with
* this structure defined in asm/ucontext.h, but the name clashes with
@@ -59,20 +60,23 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
/* or */
/* 24021017 li v0, 0x1017 (sigreturn) */
/* 0000000c syscall */
- if (*(pc + 1) != 0x0000000c)
+ if (pc[1] != 0x0000000c)
return _URC_END_OF_STACK;
- if (*(pc + 0) == 0x24021017)
+#if _MIPS_SIM == _ABIO32
+ if (pc[0] == (0x24020000 | __NR_sigreturn))
{
struct sigframe {
- u_int32_t trampoline[2];
+ u_int32_t trampoline[2];
struct sigcontext sigctx;
} *rt_ = context->ra;
sc = &rt_->sigctx;
}
- else if (*(pc + 0) == 0x24021061)
+ else
+#endif
+ if (pc[0] == (0x24020000 | __NR_rt_sigreturn))
{
struct rt_sigframe {
- u_int32_t trampoline[2];
+ u_int32_t trampoline[2];
struct siginfo info;
_sig_ucontext_t uc;
} *rt_ = context->ra;