diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2003-10-06 01:24:53 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2003-10-06 01:24:53 +0000 |
commit | 522d2b3fccdaea685db88d1533789e42f61511a6 (patch) | |
tree | 0677fbf3279f4a4aebee85a52dddd7e2bebffa41 /gcc/config/sh/linux.h | |
parent | 56ef49efaec15d542aff8190dc7c652651dc9db3 (diff) | |
download | gcc-522d2b3fccdaea685db88d1533789e42f61511a6.tar.gz |
linux.h (MD_FALLBACK_FRAME_STATE_FOR): Handle new signal trampoline codes.
* config/sh/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Handle new
signal trampoline codes.
From-SVN: r72128
Diffstat (limited to 'gcc/config/sh/linux.h')
-rw-r--r-- | gcc/config/sh/linux.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index 42603c10d2b..da423516b16 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -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; \ |