aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
* Add some section and constant support for darwin TLS.Eric Christopher2010-05-171-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103974 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 103911; it broke a test that expects bitconvertDale Johannesen2010-05-161-4/+0
| | | | | | | | | | | <1xi64> -> i64 to work in MMX registers on hosts where -no-sse is the default (not mine). The right thing is to accept this and make i64->f64 conversions go through memory, but I don't have time right now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103914 91177308-0d34-0410-b5e6-96231b3b80d8
* Make x86-64 64-bit bitconvert work when SSE is not available.Dale Johannesen2010-05-161-0/+4
| | | | | | | | | (This worked as of about 6 months ago and I didn't track down exactly what broke it; I think this fix is appropriate.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103911 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for thiscall calling convention.Anton Korobeynikov2010-05-163-2/+25
| | | | | | Patch by Charles Davis and Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103902 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uint64->{float, double} conversion to do rounding correctly in 32-bit.Dale Johannesen2010-05-151-23/+59
| | | | | | | | | | | | | | | | | | | The implementation in LegalizeIntegerTypes to handle this as sint64->float + appropriate power of 2 is subject to double rounding, considered incorrect by numerics people. Use this implementation only when it is safe. This leads to using library calls in some cases that produced inline code before, but it's correct now. (EVTToAPFloatSemantics belongs somewhere else, any suggestions?) Add a correctly rounding (though not particularly fast) conversion that uses X87 80-bit computations for x86-32. 7885399, 5901940. This shows up in gcc.c-torture/execute/ieee/rbug.c in the gcc testsuite on some platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103883 91177308-0d34-0410-b5e6-96231b3b80d8
* Several tail call tests apparently rely upon this being "adjusts stack" insteadBill Wendling2010-05-141-1/+1
| | | | | | | | of "has calls". That's probably wrong, but it needs further investigation. Revert to the original behavior until this is settled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103824 91177308-0d34-0410-b5e6-96231b3b80d8
* This should happen if there are no calls, not if it just doesn't adjust theBill Wendling2010-05-141-1/+1
| | | | | | | stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103813 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r103804. The comment is correct.Bill Wendling2010-05-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103808 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Bill Wendling2010-05-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103804 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename "HasCalls" in MachineFrameInfo to "AdjustsStack" to better describe whatBill Wendling2010-05-142-2/+2
| | | | | | | | | | the variable actually tracks. N.B., several back-ends are using "HasCalls" as being synonymous for something that adjusts the stack. This isn't 100% correct and should be looked into. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103802 91177308-0d34-0410-b5e6-96231b3b80d8
* Lowering of atomic instructions can result in operands beingDan Gohman2010-05-141-1/+7
| | | | | | | | used more than once. If ISel had put a kill flag on one of them, it's not valid to transfer the kill flag to each new instance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103799 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix so "int3" is correctly accepted, added "into" and fixed "int" with anKevin Enderby2010-05-141-2/+4
| | | | | | | argument, like "int $4", to not get an Assertion error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103791 91177308-0d34-0410-b5e6-96231b3b80d8
* Set isTerminator on TRAP instructions.Dan Gohman2010-05-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103778 91177308-0d34-0410-b5e6-96231b3b80d8
* Add mayLoad and mayStore flags to instructions which missed them.Dan Gohman2010-05-142-2/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103776 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: fixes 64 bit Visual Studio IDE build. Fixes bug 4936.Oscar Fuentes2010-05-131-1/+6
| | | | | | | Patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103727 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r103668 with a fix. Never make "minor syntax changes"Chris Lattner2010-05-132-3/+36
| | | | | | | after testing before committing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103681 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r103668 for now, it is apparently breaking things.Chris Lattner2010-05-122-36/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103677 91177308-0d34-0410-b5e6-96231b3b80d8
* moffset forms of moves are x86-32 only, make the parserChris Lattner2010-05-122-3/+36
| | | | | | | | | lower them to the correct x86-64 instructions since we don't have a clean way to handle this in td files yet. rdar://7947184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103668 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the encoding of the obscure "moffset" forms of moves, i386Chris Lattner2010-05-121-5/+6
| | | | | | | part first. rdar://7947184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103660 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Extend suffix matching hack to match 'q' suffix.Daniel Dunbar2010-05-121-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103535 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Add a new hook for checking whether a particular section canDaniel Dunbar2010-05-121-0/+20
| | | | | | | | be diced into atoms, and adjust getAtom() to take this into account. - This fixes relocations to symbols in fixed size literal sections, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103532 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial kill flag support to FastISel.Dan Gohman2010-05-111-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103529 91177308-0d34-0410-b5e6-96231b3b80d8
* I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename itDuncan Sands2010-05-112-2/+2
| | | | | | | | to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is the opposite, for future use by dragonegg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103495 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a bunch more TargetSelectionDAGInfo infrastructure.Dan Gohman2010-05-116-236/+261
| | | | | | | | | Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and EmitTargetCodeForMemmove out of TargetLowering and into SelectionDAGInfo to exercise this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103481 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the TargetLowering::getSubtarget() virtual function, whichDan Gohman2010-05-111-1/+1
| | | | | | | was unused. TargetMachine::getSubtarget() is used instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103474 91177308-0d34-0410-b5e6-96231b3b80d8
* updated handling dllexport in X86AsmPrinterNathan Jeffords2010-05-091-8/+22
| | | | | | changed dllexport code to use EmitBytes instead of EmitRawText, and changed the export option to use /EXPORT: instead of -export: on the windows platform git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103377 91177308-0d34-0410-b5e6-96231b3b80d8
* made COFF target dllexport logic apply to all subtargetsNathan Jeffords2010-05-091-28/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103373 91177308-0d34-0410-b5e6-96231b3b80d8
* break coff symbol definition stuff out into proper MCStreamer callbacks,Chris Lattner2010-05-082-20/+20
| | | | | | | patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103346 91177308-0d34-0410-b5e6-96231b3b80d8
* Use overloaded operators instead of DIDescriptor::getNode()Devang Patel2010-05-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103276 91177308-0d34-0410-b5e6-96231b3b80d8
* switch MCSectionCOFF from a syntactic to semantic representation,Chris Lattner2010-05-071-3/+1
| | | | | | | patch by Peter Housel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103267 91177308-0d34-0410-b5e6-96231b3b80d8
* When rematerializing, use the debug location of the originalDan Gohman2010-05-071-1/+1
| | | | | | | | instruction, rather than a location near where the new instruction is being inserted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103232 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: X86AbsMemAsmOperand is subclass of X86NoSegMemAsmOperand.Daniel Dunbar2010-05-061-4/+4
| | | | | | - This fixes "leal 0, %eax", for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103205 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://7947167 - llvm-mc doesn't match movsqChris Lattner2010-05-061-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103199 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminated the classification of control registers into %ecr_Sean Callanan2010-05-067-64/+32
| | | | | | | | | | and %rcr_, leaving just %cr_ which is what people expect. Updated the disassembler to support this unified register set. Added a testcase to verify that the registers continue to be decoded correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103196 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Error out if we see a non-constant FK_Data_1 or FK_Data_2 fixup, sinceDaniel Dunbar2010-05-061-2/+14
| | | | | | we don't currently support relaxing them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103195 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that itDan Gohman2010-05-063-7/+9
| | | | | | | doesn't have to guess. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103194 91177308-0d34-0410-b5e6-96231b3b80d8
* Add argument TargetRegisterInfo to loadRegFromStackSlot and storeRegToStackSlot.Evan Cheng2010-05-062-6/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103193 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 103156 and 103157. 103156 didn't break anything. 10315 exposed a ↵Evan Cheng2010-05-061-1/+1
| | | | | | coalescer bug that's fixed by 103170. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103172 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r103156 since it was breaking the build bots.Eric Christopher2010-05-061-1/+1
| | | | | | | | | | | | | Reverse-merging r103156 into '.': U lib/Target/ARM/ARMInstrNEON.td U lib/Target/ARM/ARMRegisterInfo.h U lib/Target/ARM/ARMBaseRegisterInfo.cpp U lib/Target/ARM/ARMBaseInstrInfo.cpp U lib/Target/ARM/ARMRegisterInfo.td git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103159 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a sign-extension bug in the X86 disassemblerSean Callanan2010-05-051-3/+55
| | | | | | | | | that was causing PC-relative branch targets to be evaluated incorrectly. Also added support for checking operand values to the llvm-mc tester. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103128 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim include.Evan Cheng2010-05-051-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103103 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 102941, we're going to do this via attr and can justEric Christopher2010-05-051-8/+1
| | | | | | | hack the code to turn it off when debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103083 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comment.Eric Christopher2010-05-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103057 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form ofDaniel Dunbar2010-05-041-5/+0
| | | | | | | | | | | | | | | instructions which have no direct register usage. Darwin 'as' accepts: add $0, (%rax) but rejects mov $0, (%rax) for example. Given that, only accept suffix matches which match exactly one form. We still need to emit nice diagnostics for failures... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103015 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Add "support" for matching ATT style mnemonic prefixes.Daniel Dunbar2010-05-042-4/+66
| | | | | | | | | | | | | | | | | - The idea is that when a match fails, we just try to match each of +'b', +'w', +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept it. If all match, we assume it is width generic, and take the 'l' form. - This would be a horrible hack, if it weren't so simple. Therefore it is an elegant solution! Chris gets the credit for this particular elegant solution. :) - Next step to making this more robust is to have the X86 matcher generate the mnemonic prefix information. Ideally we would also compute up-front exactly which mnemonic to attempt to match, but this may require more custom code in the matcher than is really worth it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103012 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix to r102952. The MOV64toSDrm record in X86Instr64bit.td needed the opcodeKevin Enderby2010-05-041-1/+1
| | | | | | | changed to 0x7E from 0x6E as well as the previous change of RPDI to S3SI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102991 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm-mc to use the same suffixes with floating point compareKevin Enderby2010-05-031-6/+6
| | | | | | | | instructions as the Mac OS X darwin assembler. Some of which like 'fcoml' assembled to different opcodes. While some of the suffixes were just different. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102958 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the encoding of two of the X86 movq instuctions. The Move quadword fromKevin Enderby2010-05-032-2/+2
| | | | | | | | mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect encodings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102952 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the encoding of the x86 push instructions. Using a 32-bit immediate valueKevin Enderby2010-05-031-4/+4
| | | | | | | | | | | caused the a pushl instruction to be incorrectly encoding using only two bytes of immediate, causing the following 2 instruction bytes to be part of the 32-bit immediate value. Also fixed the one byte form of push to be used when the immediate would fit in a signed extended byte. Lastly changed the names to not include the 32 of PUSH32 since they actually push the size of the stack pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102951 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option, defaulting to off, to disable the sse domain crossing opts.Eric Christopher2010-05-031-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102941 91177308-0d34-0410-b5e6-96231b3b80d8