]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
linux.h (MD_FALLBACK_FRAME_STATE_FOR): Handle new signal trampoline codes.
authorKaz Kojima <kkojima@gcc.gnu.org>
Mon, 6 Oct 2003 01:24:53 +0000 (01:24 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Mon, 6 Oct 2003 01:24:53 +0000 (01:24 +0000)
* config/sh/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Handle new
signal trampoline codes.

From-SVN: r72128

gcc/ChangeLog
gcc/config/sh/linux.h

index 5b3dd9699e09fbcdceeeae660730d548eaed0163..ac396db1b11bc0bedb1050d2d3d97ccd612c6387 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-05  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Handle new
+       signal trampoline codes.
+
 2003-10-05  Chris Demetriou  <cgd@broadcom.com>
 
        * config/mips/mips.md (*divsf3): Move description of
index 42603c10d2bd3c2c086c7637baba7fb95a1fc307..da423516b16af125d9db9342cde6ba115eae3f9c 100644 (file)
@@ -220,13 +220,24 @@ do { \
                                                                        \
     /* mov.w 1f,r3; trapa #0x10; 1: .short 0x77  (sigreturn)  */       \
     /* mov.w 1f,r3; trapa #0x10; 1: .short 0xad  (rt_sigreturn)  */    \
-    if ((*(unsigned short *) (pc_+0)  == 0x9300)                       \
-       && (*(unsigned short *) (pc_+2)  == 0xc310)                     \
-       && (*(unsigned short *) (pc_+4)  == 0x0077))                    \
+    /* Newer kernel uses pad instructions to avoid an SH-4 core bug.  */\
+    /* mov.w 1f,r3; trapa #0x10; or r0,r0; or r0,r0; or r0,r0; or r0,r0;\
+       or r0,r0; 1: .short 0x77  (sigreturn)  */                       \
+    /* mov.w 1f,r3; trapa #0x10; or r0,r0; or r0,r0; or r0,r0; or r0,r0;\
+       or r0,r0; 1: .short 0xad  (rt_sigreturn)  */                    \
+    if (((*(unsigned short *) (pc_+0)  == 0x9300)                      \
+        && (*(unsigned short *) (pc_+2)  == 0xc310)                    \
+        && (*(unsigned short *) (pc_+4)  == 0x0077))                   \
+       || (((*(unsigned short *) (pc_+0)  == 0x9305)                   \
+           && (*(unsigned short *) (pc_+2)  == 0xc310)                 \
+           && (*(unsigned short *) (pc_+14)  == 0x0077))))             \
       sc_ = (CONTEXT)->cfa;                                            \
-    else if ((*(unsigned short *) (pc_+0) == 0x9300)                   \
-       && (*(unsigned short *) (pc_+2)  == 0xc310)                     \
-       && (*(unsigned short *) (pc_+4)  == 0x00ad))                    \
+    else if (((*(unsigned short *) (pc_+0) == 0x9300)                  \
+             && (*(unsigned short *) (pc_+2)  == 0xc310)               \
+             && (*(unsigned short *) (pc_+4)  == 0x00ad))              \
+            || (((*(unsigned short *) (pc_+0) == 0x9305)               \
+                && (*(unsigned short *) (pc_+2)  == 0xc310)            \
+                && (*(unsigned short *) (pc_+14)  == 0x00ad))))        \
       {                                                                        \
        struct rt_sigframe {                                            \
          struct siginfo info;                                          \