libgo patch committed: Tweak can-recover heuristic for SPARC

Ian Lance Taylor iant@google.com
Sat Feb 11 00:27:00 GMT 2012


The gccgo implementation of panic/recover uses the return address of a
function which called recover in order to see if that function was
invoke directly by defer.  It does this by passing the address of a
label which immediately follows the function call.  This requires a
small heuristic, because there may be some machine instructions between
the function call and the label, even though they are adjacent in
GIMPLE.  On SPARC I needed to tweak that heuristic further, because on
SPARC __builtin_return_address returns the address of the function call
instruction, which is at least 8 bytes before the label.  This patch
implements that tweak.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu and sparc-sun-solaris2.11 (Solaris has other
unrelated failures).  Committed to mainline.

Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 677 bytes
Desc: patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120211/a3c253e0/attachment.bin>


More information about the Gcc-patches mailing list