summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* delete X86IntelAsmPrinter! Now -x86-asm-syntax just switchesChris Lattner2009-09-201-649/+0
| | | | | | the instruction syntax, not the entire asmprinter. llvm-svn: 82387
* remove all but one reference to TargetRegisterDesc::AsmName.Chris Lattner2009-09-131-1/+0
| | | | llvm-svn: 81714
* switch the x86 asmprinters to use getRegisterName instead Chris Lattner2009-09-131-2/+7
| | | | | | | of getting it from TRI, inst printing now is codegen context free! llvm-svn: 81710
* make intel asmprinter use TRI::getAsmName instead of TRI::getName likeChris Lattner2009-09-131-12/+20
| | | | | | | all the other targets. Add support for weak/linkonce linkage so it doesn't crash on basically all nontrivial testcases. llvm-svn: 81704
* reduce indentation with early exit.Chris Lattner2009-09-131-45/+45
| | | | llvm-svn: 81699
* replace printBasicBlockLabel with EmitBasicBlockStart,Chris Lattner2009-09-131-1/+1
| | | | | | | now that printBasicBlockLabel is only used for starting a MBB. This allows elimination of a bunch of arguments. llvm-svn: 81684
* convert some uses of printBasicBlockLabel to use GetMBBSymbolChris Lattner2009-09-131-3/+4
| | | | | | instead. llvm-svn: 81677
* remove DebugLoc from MCInst and eliminate "Comment printing" fromChris Lattner2009-09-091-0/+4
| | | | | | | | | | | | | the MCInst path of the asmprinter. Instead, pull comment printing out of the autogenerated asmprinter into each target that uses the autogenerated asmprinter. This causes code duplication into each target, but in a way that will be easier to clean up later when more asmprinter stuff is commonized into the base AsmPrinter class. This also fixes an xcore strangeness where it inserted two tabs before every instruction. llvm-svn: 81396
* hoist the call to processDebugLoc out of the generatedChris Lattner2009-09-091-0/+2
| | | | | | | | | | | | | asm printer into the "printInstruction" routine. This fixes a problem where the experimental asmprinter would drop debug labels in some cases, and fixes issues on ppc/xcore where pseudo instructions like "mr" didn't get debug locs properly. It is annoying that this moves the call from one place into each target, but a future set of more invasive refactorings will fix that problem. llvm-svn: 81377
* remove extraneous hack.Chris Lattner2009-09-031-2/+0
| | | | llvm-svn: 80893
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-021-2/+2
| | | | llvm-svn: 80773
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-221-8/+8
| | | | llvm-svn: 79777
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-2/+2
| | | | llvm-svn: 79763
* eliminate AsmPrinter::SwitchToSection and just have clientsChris Lattner2009-08-191-4/+5
| | | | | | talk to the MCStreamer directly instead. llvm-svn: 79405
* remove some pointless null switchtosections. The IntelAsmPrinter doesn't ↵Chris Lattner2009-08-181-4/+2
| | | | | | really work anyway. llvm-svn: 79321
* the MinPad argument to PadToColumn only really makes sense to be 1,Chris Lattner2009-08-171-1/+1
| | | | | | just remove the argument and replace it with 1. llvm-svn: 79246
* Various AsmWriter output cleanups. Use WriteAsOperand instead ofDan Gohman2009-08-131-1/+1
| | | | | | PrintUnmangledNameSafely. llvm-svn: 78878
* Use PadToColumn instead of tabs.Dan Gohman2009-08-121-1/+2
| | | | llvm-svn: 78834
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-6/+6
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-7/+7
| | | | | | own struct type. llvm-svn: 78610
* Don't flush the raw_ostream between each MachineFunction. These flushDan Gohman2009-08-051-2/+0
| | | | | | | | | | | calls were originally put in place because errs() at one time was not unbuffered, and these print routines are commonly used with errs() for debugging. However, errs() is now properly unbuffered, so the flush calls are no longer needed. This significantly reduces the number of write(2) calls for regular asm printing when there are many small functions. llvm-svn: 78137
* eliminate textual section switching from intel asm printer. Chris Lattner2009-08-031-15/+15
| | | | | | | This will cause it to enter the ".text" section instead of "_text" but masm is already broken. llvm-svn: 77977
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-61/+58
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-0/+1
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-6/+5
| | | | | | | | | | | | | | | | | | | | additional bug fixes: 1. The bug that everyone hit was a problem in the asmprinter where it would remove $stub but keep the L prefix on a name when emitting the indirect symbol. This is easy to fix by keeping the name of the stub and the name of the symbol in a StringMap instead of just keeping a StringSet and trying to reconstruct it late. 2. There was a problem printing the personality function. The current logic to print out the personality function from the DWARF information is a bit of a cesspool right now that duplicates a bunch of other logic in the asm printer. The short version of it is that it depends on emitting both the L and _ prefix for symbols (at least on darwin) and until I can untangle it, it is best to switch the mangler back to emitting both prefixes. llvm-svn: 75646
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-4/+4
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Revert r75615, which depended on 75610.Daniel Dunbar2009-07-141-5/+6
| | | | | | | | | | | | | | | | | | --- Reverse-merging r75615 into '.': U lib/Target/XCore/XCoreAsmPrinter.cpp U lib/Target/PIC16/PIC16AsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp U lib/Target/MSP430/MSP430AsmPrinter.cpp U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp U lib/Target/MSIL/MSILWriter.cpp U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm-svn: 75637
* eliminate extra space.Torok Edwin2009-07-141-4/+4
| | | | llvm-svn: 75630
* Rename getValueName -> getMangledName.Chris Lattner2009-07-141-6/+5
| | | | llvm-svn: 75615
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-4/+5
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* move handling of dllimport linkage in isel, not in asmprinter.Chris Lattner2009-07-091-8/+10
| | | | llvm-svn: 75086
* Add an "alignment" field to the MachineFunction object. It makes more sense toBill Wendling2009-06-301-4/+1
| | | | | | | | | | have the alignment be calculated up front, and have the back-ends obey whatever alignment is decided upon. This allows for future work that would allow for precise no-op placement and the like. llvm-svn: 74564
* remove dead code, the main codepath never has to dealChris Lattner2009-06-201-5/+0
| | | | | | with MBB's. llvm-svn: 73830
* eliminate the "call" operand modifier from the asm descriptions, modelingChris Lattner2009-06-201-4/+36
| | | | | | | it as a pcrel immediate instead. This gets pc-rel weirdness out of the main printoperand codepath. llvm-svn: 73829
* Misc tweaks to Intel asm printing to make it more compatible with MASM. Eli Friedman2009-06-191-8/+8
| | | | | | Patch by Benedict Gaster. llvm-svn: 73753
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-1/+1
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Fix compilation for some targets other than x86.Argyrios Kyrtzidis2009-04-301-1/+0
| | | | llvm-svn: 70522
* Make DebugLoc independent of DwarfWriter.Argyrios Kyrtzidis2009-04-301-0/+1
| | | | | | | | -Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable* -Remove DwarfWriter::getOrCreateSourceID -Make necessary changes for the above (fix callsites, etc.) llvm-svn: 70520
* Re-apply 68552.Rafael Espindola2009-04-081-4/+14
| | | | | | Tested by bootstrapping llvm-gcc and using that to build llvm. llvm-svn: 68645
* Temporarily revert r68552. This was causing a failure in the self-hosting LLVMBill Wendling2009-04-071-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | builds. --- Reverse-merging (from foreign repository) r68552 into '.': U test/CodeGen/X86/tls8.ll U test/CodeGen/X86/tls10.ll U test/CodeGen/X86/tls2.ll U test/CodeGen/X86/tls6.ll U lib/Target/X86/X86Instr64bit.td U lib/Target/X86/X86InstrSSE.td U lib/Target/X86/X86InstrInfo.td U lib/Target/X86/X86RegisterInfo.cpp U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86CodeEmitter.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86InstrInfo.h U lib/Target/X86/X86ISelDAGToDAG.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86ISelLowering.h U lib/Target/X86/X86InstrInfo.cpp U lib/Target/X86/X86InstrBuilder.h U lib/Target/X86/X86RegisterInfo.td llvm-svn: 68560
* Reduce code duplication on the TLS implementation.Rafael Espindola2009-04-071-4/+14
| | | | | | | | | | This introduces a small regression on the generated code quality in the case we are just computing addresses, not loading values. Will work on it and on X86-64 support. llvm-svn: 68552
* Don't print global names twice with -asm-verbose.Evan Cheng2009-03-251-1/+1
| | | | llvm-svn: 67667
* Do not emit comments unless -asm-verbose.Evan Cheng2009-03-241-2/+5
| | | | llvm-svn: 67580
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-2/+1
| | | | | | linkage, so remove it. llvm-svn: 66690
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-3/+6
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Overhaul my earlier submission due to feedback. It's a large patch, but most ofBill Wendling2009-02-241-0/+1
| | | | | | | | | | | | them are generic changes. - Use the "fast" flag that's already being passed into the asm printers instead of shoving it into the DwarfWriter. - Instead of calling "MI->getParent()->getParent()" for every MI, set the machine function when calling "runOnMachineFunction" in the asm printers. llvm-svn: 65379
* Put code that generates debug labels into TableGen so that it can be used byBill Wendling2009-02-181-0/+1
| | | | | | everyone. llvm-svn: 64978
* Add the private linkage.Rafael Espindola2009-01-151-0/+1
| | | | llvm-svn: 62279
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-1/+1
| | | | | | suggested by Chris. llvm-svn: 62099
OpenPOWER on IntegriCloud