summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
...
* factor code better in X86MCInstLower::Lower, teach it toChris Lattner2010-02-051-44/+26
| | | | | | lower the SETB* instructions. llvm-svn: 95431
* Rewrite FP constant handling in DEBUG_VALUE yetDale Johannesen2010-02-041-5/+17
| | | | | | | again, so it more or less handles long double. Restore \n removed in latest MC frenzy. llvm-svn: 95271
* reapply r95206, this time actually delete the code I'm replacing in the ↵Chris Lattner2010-02-031-9/+23
| | | | | | third stub case. llvm-svn: 95209
* revert r95206, it is apparently causing bootstrap failure on i386-darwin9Chris Lattner2010-02-031-24/+7
| | | | llvm-svn: 95208
* make the x86 backend emit darwin stubs through mcstreamerChris Lattner2010-02-031-7/+24
| | | | | | instead of textually. llvm-svn: 95206
* make MachineModuleInfoMachO hold non-const MCSymbol*'s insteadChris Lattner2010-02-032-9/+9
| | | | | | | of const ones. non-const ones aren't very useful, because you can't even, say, emit them. llvm-svn: 95205
* don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,Chris Lattner2010-02-031-1/+0
| | | | | | .o files don't like that. llvm-svn: 95187
* Finally eliminate printMCInst and send instructions throughChris Lattner2010-02-033-17/+4
| | | | | | | | | | | | | | | | | | | | | | | the streamer. Demo: $ cat t.ll define i32 @test() nounwind { ret i32 42 } $ llc t.ll -o - ... _test: movl $42, %eax ret $ llc t.ll -o t.o -filetype=obj $ otool -tv t.o t.o: (__TEXT,__text) section _test: 00000000 movl $0x0000002a,%eax 00000005 ret llvm-svn: 95179
* rejigger the world so that EmitInstruction prints the \n atChris Lattner2010-02-031-0/+4
| | | | | | | | the end of the instruction instead of expecting the caller to do it. This currently causes the asm-verbose instruction comments to be on the next line. llvm-svn: 95178
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-033-16/+0
| | | | | | | | than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. llvm-svn: 95177
* Print FPImm a less kludgy way; APFloat.toString seemsDale Johannesen2010-02-031-6/+3
| | | | | | to have some problems anyway. llvm-svn: 95171
* Accept floating point immediates in DEBUG_VALUE.Dale Johannesen2010-02-021-1/+11
| | | | llvm-svn: 95159
* refactor code so that LLVMTargetMachine creates the asmstreamer and Chris Lattner2010-02-021-2/+3
| | | | | | | mccontext instead of having AsmPrinter do it. This allows other types of MCStreamer's to be passed in. llvm-svn: 95155
* Remove the argument from EmitJumpTableInfo, because it doesn't need it.Chris Lattner2010-01-283-62/+7
| | | | | | | | Move the X86 implementation of function body emission up to AsmPrinter::EmitFunctionBody, which works by calling the virtual EmitInstruction method. llvm-svn: 94716
* Treat MO_REG 0 location as undefined in DEBUG_VALUE,Dale Johannesen2010-01-271-2/+8
| | | | | | per document. llvm-svn: 94693
* now that enough stuff is constified, move function header printingChris Lattner2010-01-262-88/+22
| | | | | | | logic up from X86 into the common code. The other targets will hopefully start using this soon. llvm-svn: 94614
* Move getJTISymbol from MachineJumpTableInfo to MachineFunction,Chris Lattner2010-01-263-22/+6
| | | | | | | | | | | | | | | | | | which is more convenient, and change getPICJumpTableRelocBaseExpr to take a MachineFunction to match. Next, move the X86 code that create a PICBase symbol to X86TargetLowering::getPICBaseSymbol from X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific library. This eliminates a 'gross hack', and allows us to implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now calls it. This in turn allows us to eliminate the X86AsmPrinter::printPICJumpTableSetLabel method, which was the only overload of printPICJumpTableSetLabel. llvm-svn: 94526
* simplify asmprinter: only emit .set directives when entries haveChris Lattner2010-01-261-11/+2
| | | | | | | EK_LabelDifference32 kind and the target has .set support. Simplify X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers. llvm-svn: 94518
* implement X86 @GOTOFF jump table entries with the new EK_Custom32Chris Lattner2010-01-262-20/+0
| | | | | | | | | | | jump table entry kind, instead of overloading AsmPrinter::printPICJumpTableEntry. This has a pretty horrible and inefficient FIXME around how @GOTOFF is currently smashed into the mcsymbol name, but otherwise this is much cleaner. llvm-svn: 94516
* add a new MachineBasicBlock::getSymbol method, replacingChris Lattner2010-01-262-5/+5
| | | | | | the AsmPrinter::GetMBBSymbol. llvm-svn: 94515
* don't bother setting the AsmPrinter::MF ivar, now thatChris Lattner2010-01-261-1/+0
| | | | | | | AsmPrinter::SetupMachineFunction sets it. Note that systemz and msp430 didn't. Yay for reduced inconsistency! :) llvm-svn: 94510
* Accept immediate as value of a dbg_value.Dale Johannesen2010-01-261-2/+3
| | | | llvm-svn: 94489
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-251-1/+1
| | | | | | | | | | | | | | | | | | 1. MachineJumpTableInfo is now created lazily for a function the first time it actually makes a jump table instead of for every function. 2. The encoding of jump table entries is now described by the MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the TLI::getJumpTableEncoding() hook, instead of by lots of code scattered throughout the compiler that "knows" that jump table entries are always 32-bits in pic mode (for example). 3. The size and alignment of jump table entries is now calculated based on their kind, instead of at machinefunction creation time. Future work includes using the EntryKind in more places in the compiler, eliminating other logic that "knows" the layout of jump tables in various situations. llvm-svn: 94470
* eliminate redundant argument to EmitJumpTableInfoChris Lattner2010-01-251-1/+1
| | | | llvm-svn: 94464
* handle the _set_ symbol with an MCSymbol.Chris Lattner2010-01-251-2/+1
| | | | llvm-svn: 94449
* pull the non-pic jump table case out of printPICJumpTableEntryChris Lattner2010-01-251-1/+2
| | | | | | | and MCize the non-pic case. Now printPICJumpTableEntry really is just about printing PIC entries. llvm-svn: 94446
* remove JumpTableDirective, it is always null.Chris Lattner2010-01-251-1/+1
| | | | llvm-svn: 94445
* sink an arm specific method out of asmprinter into the ARMAsmPrinter andChris Lattner2010-01-251-4/+0
| | | | | | rename it to avoid shadowing. llvm-svn: 94440
* mcstreamerize .file and .file. This also fixes an issue where theChris Lattner2010-01-251-1/+4
| | | | | | | normal form of .file would fail if the filename had a weird character in it. llvm-svn: 94437
* emit ELF .type directives through MCStreamer instead of doing it textually.Chris Lattner2010-01-251-1/+1
| | | | llvm-svn: 94436
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* move the various directive enums out of the MCStreamer classChris Lattner2010-01-231-4/+4
| | | | | | into a new MCDirectives.h file. llvm-svn: 94294
* use some helpers instead of duplicating logic.Chris Lattner2010-01-232-6/+7
| | | | llvm-svn: 94285
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* Avoid including DebugInfo.h in AsmPrinter.hDevang Patel2010-01-191-0/+1
| | | | llvm-svn: 93864
* Now that we have everything nicely factored (e.g. asmprinter is notChris Lattner2010-01-192-126/+0
| | | | | | | | | | | | | | | | | | | | | | | doing global variable classification anymore) and hookized, sink almost all target targets global variable emission code into AsmPrinter and out of each target. Some notes: 1. PIC16 does completely custom and crazy stuff, so it is not changed. 2. XCore has some custom handling for extra directives. I'll look at it next. 3. This switches linux/ppc to use .globl instead of .global. If .globl is actually wrong, let me know and I'll fix it. 4. This makes linux/ppc get a lot of random cases right which were obviously wrong before, it is probably now a bit healthier. 5. Blackfin will probably start getting .comm and other things that it didn't before. If this is undesirable, it should explicitly opt out of these things by clearing the relevant fields of MCAsmInfo. This leads to a nice diffstat: 14 files changed, 127 insertions(+), 830 deletions(-) llvm-svn: 93858
* hookize the cygwin ".linkonce" directive.Chris Lattner2010-01-191-6/+11
| | | | llvm-svn: 93855
* more cleanups. Emit the .local directive even on cygwin/mingw.Chris Lattner2010-01-191-6/+3
| | | | | | | | I'm not sure that this is correct, but it causes no test failures, and just emitting a .comm without protecting its linkage somehow is surely not right. llvm-svn: 93854
* some cleanupsChris Lattner2010-01-191-16/+19
| | | | llvm-svn: 93853
* add a bool for whether .lcomm takes an alignment instead of basing this on ↵Chris Lattner2010-01-191-3/+4
| | | | | | "isdarwin". llvm-svn: 93852
* hoist handling of external globals and special globals up to common code.Chris Lattner2010-01-191-21/+14
| | | | | | | | | | This makes a similar code dead in all the other targets, I'll clean it up in a bit. This also moves handling of lcomm up before acquisition of a section, since lcomm never needs a section. llvm-svn: 93851
* move production of .reference directives for static ctor/dtor list onChris Lattner2010-01-191-9/+1
| | | | | | darwin into common code. llvm-svn: 93849
* use BSSLocal classifier to identify 'lcomm' data instead ofChris Lattner2010-01-191-17/+9
| | | | | | duplicating the logic (differently) in lots of different targets. llvm-svn: 93847
* now that elf weak bss symbols are handled correctly, simplify a bunch of code.Chris Lattner2010-01-191-23/+3
| | | | llvm-svn: 93845
* fix a significant difference between llvm and gcc on ELF systems:Chris Lattner2010-01-191-1/+1
| | | | | | | | GCC would put weak zero initialized mutable data in the .bss section, we would put it into a crasy '.gnu.linkonce.b.test,"aw",@nobits' section. Fixing this will allow simplifications next up. llvm-svn: 93844
* introduce a section kind for common linkage. Use this to slightlyChris Lattner2010-01-191-2/+21
| | | | | | | | | simplify and commonize some of the asmprinter logic for globals. This also avoids printing the MCSection for .zerofill, which broke the llvm-gcc build. llvm-svn: 93843
* change an accessor to a predicate.Chris Lattner2010-01-191-2/+2
| | | | llvm-svn: 93839
* Cleanup handling of .zerofill on darwin:Chris Lattner2010-01-191-66/+61
| | | | | | | | | | | | | 1. TargetLoweringObjectFileMachO should decide if something goes in zerofill instead of having every target do it. 2. TargetLoweringObjectFileMachO should assign said symbols to the right MCSection, the asmprinters should just emit to the right section. 3. Since all zerofill stuff goes through mcstreamer anymore, MAI can have a bool "haszerofill" instead of having the textual directive to emit. llvm-svn: 93838
* switch x86 zerofill emission over to use MCStreamer.Chris Lattner2010-01-181-3/+12
| | | | llvm-svn: 93702
* Change CurrentFnSym to be a non-const pointer since asmprinter mutates it Chris Lattner2010-01-181-14/+14
| | | | | | | as it emits code. Switch .globl directives to use OutStreamer instead of doing it textually (in x86) llvm-svn: 93700
OpenPOWER on IntegriCloud