Go patch committed: Use __builtin_unwind_init

Ian Lance Taylor iant@google.com
Wed Jan 5 02:37:00 GMT 2011


The Go runtime library used a hack, SAVE_REGS, to force all callee-saved
registers to be saved on the stack, so that the garbage collector can
see them reliably.  Joseph pointed out in a comment in PR 46964 that the
__builtin_unwind_init function does the same thing.  This is in fact
what the Boehm garbage collector does.  This patch uses the builtin
function rather than the SAVE_REGS hack.  This fixes PRs 46959, 46960,
46961, 46962, 46963, and 46964, which are about different targets
failing to define SAVE_REGS.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

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


More information about the Gcc-patches mailing list