Reid Spencer
8bf21cd984
Fix stack size processing now that the return address isn't an implied
...
push onto the top of the stack like x86, which uses the local area
offset. This will allow the removal of PowerPCPEI.cpp soon.
llvm-svn: 15573
2004-08-09 01:24:32 +00:00
Chris Lattner
bbf11b1e1d
Changes commited for Nate Begeman:
...
Use a PowerPC specific prolog epilog inserter to control where spilled
callee save regs are placed on the stack.
Get rid of implicit return address stack slot, save return address reg
(LR) in appropriate slot
Improve code generated for functions that don't have calls or access
globals
Note from Chris: PowerPCPEI will eventually be eliminated, once the
functionality is merged into CodeGen/PrologEpilogInserter.cpp
llvm-svn: 15536
2004-08-06 06:58:50 +00:00
Misha Brukman
27ced926da
* Temporarily suspend LR save/restore optimization as it is not quite correct
...
* Implement large fixed-size allocas Entire patch by Nate Begeman.
llvm-svn: 15345
2004-07-30 15:50:45 +00:00
Misha Brukman
0f26a3309f
Remove empty unused method processFunctionBeforeFrameFinalized()
...
llvm-svn: 15284
2004-07-27 18:38:40 +00:00
Misha Brukman
adb86dba29
Save and restore LR just like any other register and ONLY if we actually modify
...
it (due to calls or globals access). We now compile `void empty(){}' to `blr'.
llvm-svn: 15274
2004-07-27 17:17:18 +00:00
Misha Brukman
6272268028
Do not store the stack pointer if the stack size is 0.
...
Also, convert C-style comments to C++ and make sure code wraps at 80 cols.
llvm-svn: 15245
2004-07-26 22:00:26 +00:00
Misha Brukman
29efda2e6b
Fix subtracting values > 2^15 in the prologue/epilogue, by Nate Begeman.
...
llvm-svn: 15234
2004-07-26 16:22:52 +00:00
Misha Brukman
752584b520
Use addSImm() instead of addImm() for stack offsets, which may be negative.
...
llvm-svn: 15081
2004-07-21 19:36:57 +00:00
Misha Brukman
0a12f91274
Fix stack frame layout in prologue/epilogue. Patch courtesy of Nate Begeman.
...
llvm-svn: 15026
2004-07-20 02:23:09 +00:00
Misha Brukman
3a720bbeaa
* Store all non-volatile int registers R13-31 on the stack, restore on exit
...
* Fix comment formatting
llvm-svn: 14900
2004-07-16 20:55:20 +00:00
Chris Lattner
773f2d65c2
Delete the allocate*TargetMachine function, which is now dead.
...
The shared command line options are now in a header that makes sense.
llvm-svn: 14757
2004-07-11 04:17:58 +00:00
Chris Lattner
164659f141
Add compilability
...
llvm-svn: 14744
2004-07-11 02:48:28 +00:00
Misha Brukman
1881beb0b3
Read/write the offset value for stack-relative loads via correct instr operand.
...
llvm-svn: 14722
2004-07-09 15:37:16 +00:00
Misha Brukman
607dd868a8
Add FIXME notes for spilling int/fp regs (need to calculate stack space).
...
llvm-svn: 14581
2004-07-02 17:54:38 +00:00
Misha Brukman
c9ecaeb69d
* Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
...
* Also leave space for spilling integer registers (this should be calculated)
llvm-svn: 14554
2004-07-01 21:35:00 +00:00
Misha Brukman
49e6aa1ba7
Always assume a function may have calls because the printer may add `bl' to get
...
the PC in a code sequence for global variables.
llvm-svn: 14506
2004-06-30 00:09:12 +00:00
Misha Brukman
79a92e35b4
Set up the prologue and epilogue to be more like the manual and GCC output.
...
llvm-svn: 14502
2004-06-29 23:38:26 +00:00
Misha Brukman
01841234e8
* Fix saving LR in function prologue
...
* Adjust epilogue restore sequence to match the PowerPC documentation
llvm-svn: 14480
2004-06-29 17:14:42 +00:00
Misha Brukman
981cf1f1b4
Convert tabs to spaces.
...
llvm-svn: 14412
2004-06-25 18:45:07 +00:00
Misha Brukman
91ffab9644
Use DEBUG() guard for printing out debug info.
...
llvm-svn: 14386
2004-06-24 23:54:05 +00:00
Misha Brukman
5d0be46fb7
* Tabs to spaces
...
* Send an error message to std::cerr before abort()ing
llvm-svn: 14381
2004-06-24 23:19:36 +00:00
Misha Brukman
ae07b686fa
Spell out `NoFramePointerElim'.
...
llvm-svn: 14300
2004-06-21 21:18:48 +00:00
Misha Brukman
a2ac4e4345
Use the common `NoFPElim' setting instead of our own.
...
llvm-svn: 14298
2004-06-21 21:10:24 +00:00
Misha Brukman
76b4796e7c
Type::getPrimitiveID() -> getTypeID()
...
llvm-svn: 14287
2004-06-21 17:19:08 +00:00
Misha Brukman
269034c151
Initial revision
...
llvm-svn: 14283
2004-06-21 16:55:25 +00:00