projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c92f3e
)
runtime: Tweak __go_can_recover for SPARC.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Sat, 11 Feb 2012 00:15:54 +0000
(
00:15
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Sat, 11 Feb 2012 00:15:54 +0000
(
00:15
+0000)
From-SVN: r184117
libgo/runtime/go-recover.c
patch
|
blob
|
history
diff --git
a/libgo/runtime/go-recover.c
b/libgo/runtime/go-recover.c
index 7101d518ade9bfb4eb4e29ccd946a03d29dba3c4..d6403e00d399178f71342397f8d918251c8ab74e 100644
(file)
--- 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;
}