diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-02-11 00:15:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-02-11 00:15:54 +0000 |
commit | 96431d57723de569bd75407cf7252699b491cbbe (patch) | |
tree | 30649c46a83484faba7d2f4d0bb9da8a2fb6561f | |
parent | 8c92f3e81be19ed6f544c06ee313af0cf5af107b (diff) | |
download | gcc-96431d57723de569bd75407cf7252699b491cbbe.zip gcc-96431d57723de569bd75407cf7252699b491cbbe.tar.gz gcc-96431d57723de569bd75407cf7252699b491cbbe.tar.bz2 |
runtime: Tweak __go_can_recover for SPARC.
From-SVN: r184117
-rw-r--r-- | libgo/runtime/go-recover.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/runtime/go-recover.c b/libgo/runtime/go-recover.c index 7101d51..d6403e0 100644 --- a/libgo/runtime/go-recover.c +++ b/libgo/runtime/go-recover.c @@ -43,6 +43,14 @@ __go_can_recover (const void* retaddr) such as an instruction to adjust the stack pointer. */ ret = (const char *) retaddr; + +#ifdef __sparc__ + /* On SPARC the address we get, from __builtin_return_address, is + the address of the call instruction. Adjust forward, also + skipping the delayed instruction following the call. */ + ret += 8; +#endif + dret = (const char *) d->__retaddr; return ret <= dret && ret + 16 >= dret; } |