The CBE should translate llvm.stacksave/stackrestore into calls to GCC's __builtin_stack_save/ __builtin_stack_restore functions. The only tricky part of this is figuring out which versions of GCC have these builtins (if we care). This would get 176.gcc working with the CBE, which would be very useful when bugpointing. -Chris
Possible patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070115/042825.html
Gordon, The patch came through completely garbled. Could you please attach it to this PR using the "Create a New Attachment" link and provide it in plain text, not gzipped. Thanks, Reid.
Created attachment 572 [details] PR1028.patch
Created attachment 573 [details] 2007-01-16-StackSaveRestore.ll
Sure. patch include/llvm/Intrinsics.td < PR1028.patch mv 2007-01-16-StackSaveRestore.ll test/CodeGen/CBackend The original was a .tar.gz, which might account for the corruption.
Hi, Gordon. I'm just testing your patches now. If it all works out, I'll commit shortly. FYI, the script in utils/mkpatch might help with future patch generation. It puts it in a form and order that we like to see. Thanks, Reid.
Nice patch, Gordon. This fixes 176.gcc/CBE. Its been a long outstanding issue. Well done. Reid.
*** Bug 1273 has been marked as a duplicate of this bug. ***