summaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix a layering problem by moving the x86 implementationChris Lattner2010-07-191-632/+0
| | | | | | | | | of AsmPrinter and InstLowering into libx86 and out of the asmprinter subdirectory. Now X86/AsmPrinter just depends on MC stuff, not all of codegen and LLVM IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108782 91177308-0d34-0410-b5e6-96231b3b80d8
* fix indentationChris Lattner2010-07-141-9/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108368 91177308-0d34-0410-b5e6-96231b3b80d8
* have the mc lowering process handle a few tail call forms, lowering them toChris Lattner2010-07-091-3/+18
| | | | | | | | | | | | | | jumps where possible and turning the TAILCALL marker in the instruction asm string into a proper comment. This eliminates a FIXME and is on the path to finishing: rdar://7639610 - eliminate encoding and asm info for TAILJMPd TAILJMPr TAILJMPn, etc. However, I can't eliminate the encodings for these instructions because the JIT still exists and has its own copy of the encoder, sigh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107946 91177308-0d34-0410-b5e6-96231b3b80d8
* reject pseudo instructions early in the encoder.Chris Lattner2010-07-091-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107939 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LEA to have 5 operands for its memory operand, justChris Lattner2010-07-081-0/+9
| | | | | | | | | | | | like all other instructions, even though a segment is not allowed. This resolves a bunch of gross hacks in the encoder and makes LEA more consistent with the rest of the instruction set. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107934 91177308-0d34-0410-b5e6-96231b3b80d8
* Print undefined/unknown debug value as "undef".Devang Patel2010-07-071-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107818 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR7545 crash.Devang Patel2010-07-061-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107678 91177308-0d34-0410-b5e6-96231b3b80d8
* Hack to let the move lowering handle dynamic-no-pic absolute moves ofEric Christopher2010-06-171-4/+15
| | | | | | | | | | | TLVP: movl _a@TLVP, %eax Daniel: Please review if you get a chance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106194 91177308-0d34-0410-b5e6-96231b3b80d8
* Add first pass at darwin tls compiler support.Eric Christopher2010-06-031-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105381 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Lower TAILCALLd[64] to JMP_1, to allow relaxation and to avoid sameDaniel Dunbar2010-05-191-0/+10
| | | | | | | prefix byte problem as in r104062. - As a total hack to keep the TAILCALL markers in the output, which some tests depend on, this invents a new TAILJMP_1 instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104120 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Strip spurious operands from TAILJMPr64 as we do for CALL64r andDaniel Dunbar2010-05-191-3/+5
| | | | | | CALL64pcrel32, for the same reason. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104116 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Lower MOV{8,16,32,64}{rm,mr} to fixed-register forms, as appropriate.Daniel Dunbar2010-05-191-9/+50
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104112 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Strip spurious operands from CALL64r as we do for CALL64pcrel32, toDaniel Dunbar2010-05-191-6/+8
| | | | | | avoid same prefix byte problem as in r104062. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104108 91177308-0d34-0410-b5e6-96231b3b80d8
* make mcinstlower remove all but the first operand to CALL64pcrel32.Chris Lattner2010-05-181-1/+11
| | | | | | | | | | | | | The register use operands (e.g. the first argument is passed in a register) is currently being modeled as a normal register use, instead of correctly being an implicit use. This causes the operand to get propagated onto the mcinst, which was causing the encoder to emit a rex prefix byte, which generates an invalid call. This fixes rdar://7998435 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104062 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Implement custom lowering to make sure we match things likeDaniel Dunbar2010-05-181-0/+68
| | | | | | | | X86::ADC32ri $0, %eax to X86::ADC32i32 $0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104030 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
* Print variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.Devang Patel2010-04-291-0/+2
| | | | | | | | | | | | ##DEBUG_VALUE: runOnMachineFunction:this <- RDI+0 ##DEBUG_VALUE: runOnMachineFunction:fn <- RSI+0 ##DEBUG_VALUE: DeadDefs <- undef ## SimpleRegisterCoalescing.cpp:2706 ##DEBUG_VALUE: getRegInfo:this <- [%rsp+$56]+$0 ##DEBUG_VALUE: getTarget:this <- [%rsp+$56]+$0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102655 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit debug info for byval parameters.Devang Patel2010-04-281-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102486 91177308-0d34-0410-b5e6-96231b3b80d8
* Use const_cast instead of a C-style cast to cast away const.Dan Gohman2010-04-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101639 91177308-0d34-0410-b5e6-96231b3b80d8
* Use .set expression for x86 pic jump table reference to reduce assembly ↵Evan Cheng2010-04-121-0/+9
| | | | | | relocation. rdar://7738756 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101085 91177308-0d34-0410-b5e6-96231b3b80d8
* Move printing of target-indepedent DEBUG_VALUE commentsDale Johannesen2010-04-071-48/+10
| | | | | | | | | into AsmPrinter. Target-dependent form is still generated by FastISel and still handled in X86 code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100596 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 100573, it's causing some testsuite problems.Dale Johannesen2010-04-061-1/+67
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100578 91177308-0d34-0410-b5e6-96231b3b80d8
* Move printing of DEBUG_VALUE comments to target-independent place.Dale Johannesen2010-04-061-67/+1
| | | | | | | | There is probably a more elegant way to do this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100573 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up the asmprinter header and privatize some stuff.Chris Lattner2010-04-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100342 91177308-0d34-0410-b5e6-96231b3b80d8
* streamerize printing of dbg_value, the x86 backend is now fullyChris Lattner2010-04-041-3/+6
| | | | | | | streamerized for everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100316 91177308-0d34-0410-b5e6-96231b3b80d8
* split DEBUG_VALUE printing stuff out to its own method.Chris Lattner2010-04-041-58/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100315 91177308-0d34-0410-b5e6-96231b3b80d8
* use predicates in DBG_VALUE printing code to simplify it.Chris Lattner2010-04-041-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100312 91177308-0d34-0410-b5e6-96231b3b80d8
* remove more implicit uses of "O".Chris Lattner2010-04-041-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100311 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace V_SET0 with variants for each SSE execution domain.Jakob Stoklund Olesen2010-03-311-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99975 91177308-0d34-0410-b5e6-96231b3b80d8
* Rip out the 'is temporary' nonsense from the MCContext interface toChris Lattner2010-03-301-4/+4
| | | | | | | | | | create symbols. It is extremely error prone and a source of a lot of the remaining integrated assembler bugs on x86-64. This fixes rdar://7807601. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99902 91177308-0d34-0410-b5e6-96231b3b80d8
* fix GetOrCreateTemporarySymbol to require a name, clientsChris Lattner2010-03-171-1/+1
| | | | | | | | | should use CreateTempSymbol() if they don't care about the name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98712 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.Daniel Dunbar2010-03-151-17/+12
| | | | | | | - Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue. - This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98592 91177308-0d34-0410-b5e6-96231b3b80d8
* comment fix.Chris Lattner2010-03-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98494 91177308-0d34-0410-b5e6-96231b3b80d8
* shrink 4-byte branches to 1-byte branches when lowering fromChris Lattner2010-03-141-0/+23
| | | | | | | | MachineInstr -> MCInst. This is what the assembler backend wants, it relaxes from smaller to larger things. This fixes rdar://7750815 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98493 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the now-unneeded context argument of MBB::getSymbol()Chris Lattner2010-03-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98451 91177308-0d34-0410-b5e6-96231b3b80d8
* remove special case code that isn't needed anymore.Chris Lattner2010-03-121-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98391 91177308-0d34-0410-b5e6-96231b3b80d8
* inline GetGlobalValueSymbol into the rest its callers andChris Lattner2010-03-121-3/+3
| | | | | | | remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98390 91177308-0d34-0410-b5e6-96231b3b80d8
* move fastcall/stdcall mangling up into Mangler.Chris Lattner2010-03-121-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98384 91177308-0d34-0410-b5e6-96231b3b80d8
* make DecorateCygMingName a static method.Chris Lattner2010-03-121-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98377 91177308-0d34-0410-b5e6-96231b3b80d8
* minor tidying, only do work if a function is Chris Lattner2010-03-121-2/+2
| | | | | | | actually X86_StdCall or X86_FastCall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98374 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the string form of DecorateCygMingNameChris Lattner2010-03-121-12/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98373 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llc crash on invalid input.Devang Patel2010-03-121-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98369 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code to use OutContext.GetOrCreateTemporarySymbol withChris Lattner2010-03-121-5/+2
| | | | | | | | no arguments instead of having to come up with a unique name. This also makes the code less fragile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98364 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bit along with the MCSymbols stored in the MachineModuleInfo maps thatBill Wendling2010-03-101-10/+24
| | | | | | | | | indicates that an MCSymbol is external or not. (It's true if it's external.) This will be used to specify the correct information to add to non-lazy pointers. That will be explained further when this bit is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98199 91177308-0d34-0410-b5e6-96231b3b80d8
* set the temporary bit on MCSymbols correctly.Chris Lattner2010-03-101-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98124 91177308-0d34-0410-b5e6-96231b3b80d8
* print all the newlines at the end of instructions withChris Lattner2010-02-101-3/+3
| | | | | | | OutStreamer.AddBlankLine instead of textually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95734 91177308-0d34-0410-b5e6-96231b3b80d8
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-1/+1
| | | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
* unify the paths for external symbols and global variables:Chris Lattner2010-02-081-81/+47
| | | | | | | | 2 files changed, 48 insertions(+), 83 deletions(-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95599 91177308-0d34-0410-b5e6-96231b3b80d8
* switch the rest of the "@ concatentation" logic in the X86Chris Lattner2010-02-081-117/+46
| | | | | | | backend to use X86MCTargetExpr, simplifying a bunch of code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95595 91177308-0d34-0410-b5e6-96231b3b80d8
* switch ELF @GOTOFF references to use X86MCTargetExpr.Chris Lattner2010-02-081-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95593 91177308-0d34-0410-b5e6-96231b3b80d8