summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FrameLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* X86: Use StackRegister instead of FrameRegister in getFrameIndexReference ↵Alexey Samsonov2012-05-011-0/+12
| | | | | | (to generate debug info for local variables) if stack needs realignment llvm-svn: 155917
* Use uint16_t to store register overlaps to reduce static data.Craig Topper2012-03-041-5/+5
| | | | llvm-svn: 152001
* Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, ↵Jia Liu2012-02-181-1/+1
| | | | | | MSP430, PPC, PTX, Sparc, X86, XCore. llvm-svn: 150878
* Use LEA to adjust stack ptr for Atom. Patch by Andy Zhang.Evan Cheng2012-02-071-20/+42
| | | | llvm-svn: 150008
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-20/+14
| | | | llvm-svn: 148578
* Fix off-by-one error.Bill Wendling2012-01-131-1/+1
| | | | llvm-svn: 148077
* Fix the code that was WRONG.Bill Wendling2012-01-121-13/+6
| | | | | | | The registers are placed into the saved registers list in the reverse order, which is why the original loop was written to loop backwards. llvm-svn: 148064
* Support segmented stacks on 64-bit FreeBSD.Rafael Espindola2012-01-121-2/+8
| | | | | | | This patch uses tcb_spare field in the tcb structure to store info. Patch by Jyun-Yan You. llvm-svn: 148041
* Support segmented stacks on win32.Rafael Espindola2012-01-121-7/+17
| | | | | | | Uses the pvArbitrary slot of the TIB, which is reserved for applications. We only support frames with a static size. llvm-svn: 148040
* After Jakob's r147938 exception handling on i386 was completely broken.Benjamin Kramer2012-01-121-0/+7
| | | | | | | | | Restore the (obviously wrong) behavior from before r147938 without relying on undefined behavior. Add a fat FIXME note. This should fix nightly tester failures. llvm-svn: 148030
* Support segmented stacks on mac.Rafael Espindola2012-01-111-15/+68
| | | | | | | | This uses TLS slot 90, which actually belongs to JavaScriptCore. We only support frames with static size Patch by Brian Anderson. llvm-svn: 147960
* Generate the segmented stack prologue for fastcc too.Rafael Espindola2012-01-111-1/+2
| | | | | | Patch by Brian Anderson. llvm-svn: 147958
* Use unsigned comparison in segmented stack prologue.Rafael Espindola2012-01-111-1/+1
| | | | | | | | This is a comparison of two addresses, and GCC does the comparison unsigned. Patch by Brian Anderson. llvm-svn: 147954
* Explicitly set the scale to 1 on some segstack prologue instrs.Rafael Espindola2012-01-111-3/+3
| | | | | | Patch by Brian Anderson. llvm-svn: 147952
* Fix undefined code and reenable test case.Jakob Stoklund Olesen2012-01-111-2/+2
| | | | | | | I don't think the compact encoding code is right, but at least is has defined behavior now. llvm-svn: 147938
* The saved registers weren't being processed in the correct order. This lead toBill Wendling2011-12-141-11/+14
| | | | | | | | the compact unwind claiming that one register was saved before another, which isn't all that great in general. Process them in the natural order. Reverse the list only when necessary for the algorithm. llvm-svn: 146612
* Adjust the stack by one pointer size for all frameless stacks.Bill Wendling2011-12-071-1/+2
| | | | llvm-svn: 146030
* Fix off-by-one error when encoding the stack size for a frameless stack.Bill Wendling2011-12-071-1/+1
| | | | llvm-svn: 146029
* Add bundle aware API for querying instruction properties and switch the codeEvan Cheng2011-12-071-1/+1
| | | | | | | | | | | | | | generator to it. For non-bundle instructions, these behave exactly the same as the MC layer API. For properties like mayLoad / mayStore, look into the bundle and if any of the bundled instructions has the property it would return true. For properties like isPredicable, only return true if *all* of the bundled instructions have the property. For properties like canFoldAsLoad, isCompare, conservatively return false for bundles. llvm-svn: 146026
* Explicitly check for the different SUB instructions.Bill Wendling2011-12-061-5/+2
| | | | llvm-svn: 145976
* Encode the total stack if there isn't a frame.Bill Wendling2011-12-061-2/+3
| | | | llvm-svn: 145969
* * Add a macro to remove a magic number.Bill Wendling2011-12-061-30/+35
| | | | | | * Rename variables to reflect what they're actually used for. llvm-svn: 145968
* Check the correct value for small stack sizes. Also modify some comments.Bill Wendling2011-12-061-5/+8
| | | | llvm-svn: 145954
* For a small sized stack, we encode that value directly with no "stack ↵Bill Wendling2011-12-061-1/+3
| | | | | | adjust" value. llvm-svn: 145952
* Add a comment.Bill Wendling2011-12-061-0/+3
| | | | llvm-svn: 145896
* The compact encoding of the registers are 3-bits each. Make sure we shift theBill Wendling2011-12-061-2/+4
| | | | | | value over that much. llvm-svn: 145888
* Check for stack space more intelligently.Sanjoy Das2011-12-031-4/+16
| | | | | | | | | libgcc sets the stack limit field in TCB to 256 bytes above the actual allocated stack limit. This means if the function's stack frame needs less than 256 bytes, we can just compare the stack pointer with the stack limit. This should result in lesser calls to __morestack. llvm-svn: 145766
* Fix a bug in the x86-32 code generated for segmented stacks.Sanjoy Das2011-12-031-8/+0
| | | | | | | | | | Currently LLVM pads the call to __morestack with a add and sub of 8 bytes to esp. This isn't correct since __morestack expects the call to be followed directly by a ret. This commit also adjusts the relevant test-case. llvm-svn: 145765
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-021-5/+5
| | | | | | | | | | | | change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. llvm-svn: 145714
* Dummy commit to check commit access.Sanjoy Das2011-12-011-1/+1
| | | | llvm-svn: 145619
* If we have to reset the calculation of the compact encoding, then also reset theBill Wendling2011-11-111-0/+1
| | | | | | | "saved register" index. <rdar://problem/10430076> llvm-svn: 144350
* This commit introduces two fake instructions MORESTACK_RET andRafael Espindola2011-10-261-21/+5
| | | | | | | | | | | | MORESTACK_RET_RESTORE_R10; which are lowered to a RET and a RET followed by a MOV respectively. Having a fake instruction prevents the verifier from seeing a MachineBasicBlock end with a non-terminator (MOV). It also prevents the rather eccentric case of a MachineBasicBlock ending with RET but having successors nevertheless. Patch by Sanjoy Das. llvm-svn: 143062
* Fix a bunch of unused variable warnings when doing a releaseDuncan Sands2011-10-181-4/+2
| | | | | | build with gcc-4.6. llvm-svn: 142350
* More closely follow libgcc, which has code after the `ret' instruction toBill Wendling2011-10-131-5/+24
| | | | | | | release the stack segment and reset the stack pointer. Place the code in its own MBB to make the verifier happy. llvm-svn: 141859
* Should not add instructions to a BB after a return instruction. The machine ↵Bill Wendling2011-10-131-1/+2
| | | | | | instruction verifier doesn't like this, nor do I. llvm-svn: 141856
* Only run MF.verify() with EXPENSIVE_CHECKS=1.Jakob Stoklund Olesen2011-09-241-1/+1
| | | | llvm-svn: 140441
* Reenable compact unwind by default. However, also emit the old version of unwindBill Wendling2011-09-061-8/+1
| | | | | | information for older linkers. llvm-svn: 139206
* Revert r138826 until PR10834 can be fixed.Bill Wendling2011-09-021-1/+8
| | | | llvm-svn: 139018
* Spelling and grammar fixes to problems found by Duncan.Rafael Espindola2011-08-311-2/+2
| | | | llvm-svn: 138858
* Make sure we don't crash when -miphoneos-version-min is specified on x86. ↵Eli Friedman2011-08-311-1/+2
| | | | | | Hopefully this will fix gcc testsuite failures. llvm-svn: 138856
* Fix off-by-one error Benjamin noticed.Bill Wendling2011-08-301-1/+1
| | | | llvm-svn: 138832
* Enable compact unwind info by default. This only applies to Darwin when CFI isBill Wendling2011-08-301-9/+1
| | | | | | disabled. llvm-svn: 138826
* Emit segmented-stack specific code into function prologues forRafael Espindola2011-08-301-1/+160
| | | | | | | | | | | | X86. Modify the pass added in the previous patch to call this new code. This new prologues generated will call a libgcc routine (__morestack) to allocate more stack space from the heap when required Patch by Sanjoy Das. llvm-svn: 138812
* findDeadCallerSavedReg fix: Missing NULL terminator in register arrays.Andrew Trick2011-08-121-2/+2
| | | | | | Fix by Ivan Baev. Sorry I don't have a unit test, but the fix is obvious so I don't want to delay it. llvm-svn: 137404
* The compact unwinding offsets are divided by 8 on 64-bit machines.Bill Wendling2011-07-261-2/+4
| | | | llvm-svn: 136065
* Update the comment. This feature is available only on Darwin at the moment. ↵Bill Wendling2011-07-251-1/+2
| | | | | | Though it's not Darwin-specific. llvm-svn: 135951
* Changed disabled code into a flag.Bill Wendling2011-07-251-1/+7
| | | | llvm-svn: 135924
* Remove dead variable.Bill Wendling2011-07-251-1/+0
| | | | llvm-svn: 135923
* After we've modified the prolog to save volatile registers, generate the compactBill Wendling2011-07-251-5/+249
| | | | | | | | | | | unwind encoding for that function. This simply crawls through the prolog looking for machine instrs marked as "frame setup". It can calculate from these what the compact unwind should look like. This is currently disabled because of needed linker support. But initial tests look good. llvm-svn: 135922
* Mark instructions which are part of the frame setup with the ↵Bill Wendling2011-07-211-9/+20
| | | | | | MachineInstr::FrameSetup flag. llvm-svn: 135645
OpenPOWER on IntegriCloud