summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/segmented-stacks.ll
Commit message (Collapse)AuthorAgeFilesLines
* Avoid spewing binary to stdout in some filetype=obj testsReid Kleckner2015-04-101-10/+10
| | | | llvm-svn: 234627
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | load instruction Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794
* x86_64: Fix calls to __morestack under the large code model.Peter Collingbourne2014-12-301-0/+15
| | | | | | | | | | | | | | | | | | | | Under the large code model, we cannot assume that __morestack lives within 2^31 bytes of the call site, so we cannot use pc-relative addressing. We cannot perform the call via a temporary register, as the rax register may be used to store the static chain, and all other suitable registers may be either callee-save or used for parameter passing. We cannot use the stack at this point either because __morestack manipulates the stack directly. To avoid these issues, perform an indirect call via a read-only memory location containing the address. This solution is not perfect, as it assumes that the .rodata section is laid out within 2^31 bytes of each function body, but this seems to be sufficient for JIT. Differential Revision: http://reviews.llvm.org/D6787 llvm-svn: 225003
* Add segmented stack support for DragonFlyBSD.Rafael Espindola2014-12-291-0/+108
| | | | | | Patch by Michael Neumann. llvm-svn: 224936
* [x32] Fix segmented stacks supportPavel Chupin2014-09-221-0/+55
| | | | | | | | | | | | | | | | Summary: Update segmented-stacks*.ll tests with x32 target case and make corresponding changes to make them pass. Test Plan: tests updated with x32 target Reviewers: nadav, rafael, dschuff Subscribers: llvm-commits, zinovy.nis Differential Revision: http://reviews.llvm.org/D5245 llvm-svn: 218247
* Segmented stacks: omit __morestack call when there's no frame.Tim Northover2014-05-221-7/+34
| | | | | | Patch by Florian Zeitz llvm-svn: 209436
* Move the segmented stack switch to a function attributeReid Kleckner2014-04-101-23/+25
| | | | | | | | | This removes the -segmented-stacks command line flag in favor of a per-function "split-stack" attribute. Patch by Luqman Aden and Alex Crichton! llvm-svn: 205997
* Support segmented stacks on Win64Reid Kleckner2014-04-011-3/+54
| | | | | | | Identical to Win32 method except the GS segment register is used for TLS instead of FS and pvArbitrary is at TEB offset 0x28 instead of 0x14. llvm-svn: 205342
* Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to ↵Stephen Lin2013-07-141-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | function definitions for more informative error messages. No functionality change and all updated tests passed locally. This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done llvm-svn: 186280
* Instruction scheduling itinerary for Intel Atom.Andrew Trick2012-02-011-16/+16
| | | | | | | | | | | | | | Adds an instruction itinerary to all x86 instructions, giving each a default latency of 1, using the InstrItinClass IIC_DEFAULT. Sets specific latencies for Atom for the instructions in files X86InstrCMovSetCC.td, X86InstrArithmetic.td, X86InstrControl.td, and X86InstrShiftRotate.td. The Atom latencies for the remainder of the x86 instructions will be set in subsequent patches. Adds a test to verify that the scheduler is working. Also changes the scheduling preference to "Hybrid" for i386 Atom, while leaving x86_64 as ILP. Patch by Preston Gurd! llvm-svn: 149558
* Add error-reporting tests for platforms that don't support segmented stacks.Rafael Espindola2012-01-121-0/+11
| | | | | | Patch by Brian Anderson. llvm-svn: 148042
* Support segmented stacks on 64-bit FreeBSD.Rafael Espindola2012-01-121-0/+52
| | | | | | | 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-0/+50
| | | | | | | Uses the pvArbitrary slot of the TIB, which is reserved for applications. We only support frames with a static size. llvm-svn: 148040
* Support segmented stacks on mac.Rafael Espindola2012-01-111-74/+205
| | | | | | | | This uses TLS slot 90, which actually belongs to JavaScriptCore. We only support frames with static size Patch by Brian Anderson. llvm-svn: 147960
* Split segmented stacks tests into tests for static- and dynamic-size frames.Rafael Espindola2012-01-111-37/+7
| | | | | | Patch by Brian Anderson. llvm-svn: 147959
* Generate the segmented stack prologue for fastcc too.Rafael Espindola2012-01-111-0/+55
| | | | | | Patch by Brian Anderson. llvm-svn: 147958
* Use unsigned comparison in segmented stack prologue.Rafael Espindola2012-01-111-0/+6
| | | | | | | | 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-0/+4
| | | | | | Patch by Brian Anderson. llvm-svn: 147952
* Check for stack space more intelligently.Sanjoy Das2011-12-031-9/+27
| | | | | | | | | 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-6/+2
| | | | | | | | | | 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
* Run test with -verify-machineinstrs.Rafael Espindola2011-10-261-2/+2
| | | | | | Patch by Sanjoy Das. llvm-svn: 143066
* Fixes an issue reported by -verify-machineinstrs.Rafael Espindola2011-10-261-5/+10
| | | | | | Patch by Sanjoy Das. llvm-svn: 143064
* This commit introduces two fake instructions MORESTACK_RET andRafael Espindola2011-10-261-1/+1
| | | | | | | | | | | | 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
* More closely follow libgcc, which has code after the `ret' instruction toBill Wendling2011-10-131-1/+1
| | | | | | | 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/+1
| | | | | | 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-3/+0
| | | | llvm-svn: 140441
* Verify that terminators follow non-terminators.Jakob Stoklund Olesen2011-09-231-0/+3
| | | | | | This exposes a -segmented-stacks bug. llvm-svn: 140429
* Add a triple.Rafael Espindola2011-08-301-2/+2
| | | | llvm-svn: 138831
* Some test code to check if correct code is being generated.Rafael Espindola2011-08-301-0/+87
Patch by Sanjoy Das. llvm-svn: 138820
OpenPOWER on IntegriCloud