LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1028 - CBE should support llvm.stacksave/stackrestore
Summary: CBE should support llvm.stacksave/stackrestore
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: C (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Reid Spencer
URL:
Keywords: missing-feature
Depends on:
Blocks:
 
Reported: 2006-11-30 22:56 PST by Chris Lattner
Modified: 2010-02-22 12:53 PST (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
PR1028.patch (1.26 KB, patch)
2007-01-17 16:44 PST, Gordon Henriksen
Details
2007-01-16-StackSaveRestore.ll (322 bytes, text/plain)
2007-01-17 16:45 PST, Gordon Henriksen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2006-11-30 22:56:03 PST
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
Comment 1 Gordon Henriksen 2007-01-16 23:04:29 PST
Possible patch here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070115/042825.html
Comment 2 Reid Spencer 2007-01-17 01:47:00 PST
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.
Comment 3 Gordon Henriksen 2007-01-17 16:44:43 PST
Created attachment 572 [details]
PR1028.patch
Comment 4 Gordon Henriksen 2007-01-17 16:45:32 PST
Created attachment 573 [details]
2007-01-16-StackSaveRestore.ll
Comment 5 Gordon Henriksen 2007-01-17 16:46:25 PST
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.
Comment 6 Reid Spencer 2007-01-17 17:09:09 PST
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.
Comment 7 Reid Spencer 2007-01-17 17:36:35 PST
Nice patch, Gordon. 

This fixes 176.gcc/CBE. Its been a long outstanding issue.

Well done.

Reid.

Comment 8 Reid Spencer 2007-03-26 13:14:03 PDT
*** Bug 1273 has been marked as a duplicate of this bug. ***