aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
* pass machinemoduleinfo down into getSymbolForDwarfGlobalReference, Chris Lattner2009-09-172-0/+2
| | | | | | | currently unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82157 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the LODS (load byte into register, usuallySean Callanan2009-09-162-0/+10
| | | | | | | | as part string parsing) instructions to the Intel instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82089 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the LAR (load segment access rights)Sean Callanan2009-09-162-0/+21
| | | | | | | instructions to the Intel instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82084 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the LOOP family of instructions to the IntelSean Callanan2009-09-161-0/+6
| | | | | | | instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82083 91177308-0d34-0410-b5e6-96231b3b80d8
* Added an alternate form of register-register CMPSean Callanan2009-09-162-0/+8
| | | | | | | to the Intel instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82081 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.Kevin Enderby2009-09-161-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82054 91177308-0d34-0410-b5e6-96231b3b80d8
* move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinterChris Lattner2009-09-164-43/+44
| | | | | | | | and use MachineModuleInfoMachO instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82022 91177308-0d34-0410-b5e6-96231b3b80d8
* revert a hunk of r82018 that wasn't supposed to go in yet.Chris Lattner2009-09-161-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82020 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new MachineModuleInfoMachO class, which is the per-moduleChris Lattner2009-09-161-5/+0
| | | | | | | | stuff common across all macho targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82018 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2009-09-161-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82011 91177308-0d34-0410-b5e6-96231b3b80d8
* rearrange X86ATTAsmPrinter::doFinalization, making a scan of Chris Lattner2009-09-162-33/+43
| | | | | | | the global variable list only happen for COFF targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82010 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the AsmPrinter::printMCInst hook hack now thatChris Lattner2009-09-161-2/+1
| | | | | | | | we have MCInstPrinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82006 91177308-0d34-0410-b5e6-96231b3b80d8
* fix cmake buildShantonu Sen2009-09-161-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81999 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not try and sink a load whose chain result has more than one use, when Nate Begeman2009-09-161-2/+5
| | | | | | | | | | trying to create RMW opportunities in the x86 backend. This can cause a cycle to appear in the graph, since the other uses may eventually feed into the TokenFactor we are sinking the load below. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81996 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the ENTER instruction, which sets up a stackSean Callanan2009-09-161-0/+5
| | | | | | | frame, to the Intel instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81995 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the definitions for one-bit left shifts toSean Callanan2009-09-162-4/+15
| | | | | | | | | | | the Intel instruction tables. The patterns will stay blank because ADD reg, reg is faster, but having the encoding available is useful for the disassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81994 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed a few instructions that were alreadySean Callanan2009-09-161-5/+0
| | | | | | | covered by other definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81992 91177308-0d34-0410-b5e6-96231b3b80d8
* Big change #1 for personality function references:Chris Lattner2009-09-164-9/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding fields from MAI: they aren't part of the asm syntax, they are related to the structure of the object file. To replace their functionality, add a new TLOF::getSymbolForDwarfGlobalReference method which asks targets to decide how to reference a global from EH in a pc-relative way. The default implementation just returns the symbol. The default darwin implementation references the symbol through an indirect $non_lazy_ptr stub. The bizarro x86-64 darwin specialization handles the weird "foo@GOTPCREL+4" hack. DwarfException.cpp now uses this to emit the reference to the symbol in the right way, and this also eliminates another horrible hack from DwarfException.cpp: - if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL")) - O << "-" << MAI->getPCSymbol(); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81991 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a variety of floating-point and SSE instructions.Sean Callanan2009-09-162-0/+51
| | | | | | | | | | | | | All of these do not have patterns (they're for the disassembler). Many of the floating-point instructions will probably be rolled into definitions that have patterns, and may eventually be superseded by mdefs. So I put them together and left a comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81979 91177308-0d34-0410-b5e6-96231b3b80d8
* Added far return instructions (that is, returns to Sean Callanan2009-09-151-0/+4
| | | | | | | | code in other segments) to the Intel instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81953 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated comments per Eli's suggestion.Sean Callanan2009-09-152-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81923 91177308-0d34-0410-b5e6-96231b3b80d8
* Added register-to-register ADD instructions to theSean Callanan2009-09-152-0/+13
| | | | | | | | | Intel tables, where the source operand is specified by the R/M field and the destination operand by the Reg field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81914 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a new register class for segment registersSean Callanan2009-09-153-0/+25
| | | | | | | | | to the Intel register table. Added 16- and 64-bit MOVs to and from the segment registers to the Intel instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81895 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the marker byte for stubs from 0xcd to 0xce (another form ofDale Johannesen2009-09-151-3/+6
| | | | | | | | | | | interrupt instruction, which shouldn't arise any other way). 0xcd is also used by JITMemoryManager to initialize the buffer to garbage, which means it could appear following a noreturn call even when that is not a stub, confusing X86CompilationCallback2. PR 4929. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81888 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR4984 by ensuring that fastisel adds properly sign extended GEP ↵Chris Lattner2009-09-151-1/+1
| | | | | | | | | displacement values to machineinstrs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81886 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pull a load through a callseq_start if the load's chainDan Gohman2009-09-151-1/+2
| | | | | | | | | | has multiple uses, as one of the other uses may be on a path to a different node above the callseq_start, because that leads to a cyclic graph. This problem is exposed when -combiner-global-alias-analysis is used. This fixes PR4880. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81821 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified the Intel instruction tables to includeSean Callanan2009-09-152-4/+37
| | | | | | | | versions of CALL and JMP with segmented addresses provided in-line, as pairs of immediates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81818 91177308-0d34-0410-b5e6-96231b3b80d8
* On x86-64, the 32-bit cmov doesn't actually clear the high 32-bit ofDan Gohman2009-09-151-3/+5
| | | | | | | its result if the condition is false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81814 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MCAsmStreamer to take an MCInstPrinter instead of a Chris Lattner2009-09-141-0/+16
| | | | | | | | | | | | | full AsmPrinter, and change TargetRegistry to keep track of registered MCInstPrinters. llvm-mc is still linking in the entire target foo to get the code emitter stuff, but this is an important step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81754 91177308-0d34-0410-b5e6-96231b3b80d8
* Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinterChris Lattner2009-09-143-11/+14
| | | | | | | be a MCInstPrinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81746 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy up a bit.Chris Lattner2009-09-141-16/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81744 91177308-0d34-0410-b5e6-96231b3b80d8
* add some special case handling for strangely named x86 registers.Chris Lattner2009-09-131-1/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81726 91177308-0d34-0410-b5e6-96231b3b80d8
* remove all but one reference to TargetRegisterDesc::AsmName.Chris Lattner2009-09-132-5/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81714 91177308-0d34-0410-b5e6-96231b3b80d8
* the tblgen produced 'getRegisterName' method does not accessChris Lattner2009-09-132-3/+2
| | | | | | | the object, make it static instead of const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81711 91177308-0d34-0410-b5e6-96231b3b80d8
* switch the x86 asmprinters to use getRegisterName instead Chris Lattner2009-09-135-18/+11
| | | | | | | | of getting it from TRI, inst printing now is codegen context free! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81710 91177308-0d34-0410-b5e6-96231b3b80d8
* make tblgen produce a function that returns the name for a physreg.Chris Lattner2009-09-132-1/+6
| | | | | | | Nothing is using this info yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81707 91177308-0d34-0410-b5e6-96231b3b80d8
* make intel asmprinter use TRI::getAsmName instead of TRI::getName likeChris Lattner2009-09-132-15/+21
| | | | | | | | all the other targets. Add support for weak/linkonce linkage so it doesn't crash on basically all nontrivial testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81704 91177308-0d34-0410-b5e6-96231b3b80d8
* split MCInst printing out of the X86ATTInstPrinterChris Lattner2009-09-136-69/+108
| | | | | | | | | class into its own X86ATTInstPrinter class. The inst printer now has just one dependence on the code generator (TRI). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81703 91177308-0d34-0410-b5e6-96231b3b80d8
* reduce indentation with early exit.Chris Lattner2009-09-131-45/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81699 91177308-0d34-0410-b5e6-96231b3b80d8
* delete the fixme too! :)Chris Lattner2009-09-131-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81689 91177308-0d34-0410-b5e6-96231b3b80d8
* merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.Chris Lattner2009-09-131-8/+2
| | | | | | | | | Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to ".L4$pb". The actual name doesn't matter and the darwin name is shorter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81688 91177308-0d34-0410-b5e6-96231b3b80d8
* make X86ATTAsmPrinter::PrintPICBaseSymbol forward to X86MCInstLower.Chris Lattner2009-09-132-9/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81685 91177308-0d34-0410-b5e6-96231b3b80d8
* replace printBasicBlockLabel with EmitBasicBlockStart,Chris Lattner2009-09-132-2/+2
| | | | | | | | now that printBasicBlockLabel is only used for starting a MBB. This allows elimination of a bunch of arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81684 91177308-0d34-0410-b5e6-96231b3b80d8
* convert some uses of printBasicBlockLabel to use GetMBBSymbolChris Lattner2009-09-132-7/+10
| | | | | | | instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81677 91177308-0d34-0410-b5e6-96231b3b80d8
* devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.Chris Lattner2009-09-122-11/+1
| | | | | | | | | Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that we only have one place that decides what to name bb labels. Hopefully various clients of printBasicBlockLabel can start using GetMBBSymbol instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81652 91177308-0d34-0410-b5e6-96231b3b80d8
* factor MBB label lowering betterChris Lattner2009-09-122-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81630 91177308-0d34-0410-b5e6-96231b3b80d8
* X86MCInstLower::Lower should only not emit anything to OutStreamer,Chris Lattner2009-09-122-27/+43
| | | | | | | | | this means that it can only lower one MachineInstr to one MCInst. To make this fly, we need to pull out handling of MO_GOT_ABSOLUTE_ADDRESS (which generates an implicit label) out of X86MCInstLower. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81629 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol forChris Lattner2009-09-123-8/+12
| | | | | | | MBB labels like everything else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81628 91177308-0d34-0410-b5e6-96231b3b80d8
* split MachineInstr -> MCInst lowering into its own class (notChris Lattner2009-09-123-134/+198
| | | | | | | | being embedded into X86ATTAsmPrinter). This still depends heavily on X86ATTAsmPrinter, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81627 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the "old" at&t style asmprinter. Unfortunately, most of theChris Lattner2009-09-122-19/+1
| | | | | | | | operand printing crapola cannot be removed yet because it is used by the inline asm print stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81626 91177308-0d34-0410-b5e6-96231b3b80d8