summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
...
* Now that we have everything nicely factored (e.g. asmprinter is notChris Lattner2010-01-191-185/+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
* add a bool for whether .lcomm takes an alignment instead of basing this on ↵Chris Lattner2010-01-191-1/+3
| | | | | | "isdarwin". llvm-svn: 93852
* hoist handling of external globals and special globals up to common code.Chris Lattner2010-01-191-29/+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-8/+1
| | | | | | darwin into common code. llvm-svn: 93849
* use BSSLocal classifier to identify 'lcomm' data instead ofChris Lattner2010-01-191-32/+23
| | | | | | 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-37/+11
| | | | llvm-svn: 93845
* introduce a section kind for common linkage. Use this to slightlyChris Lattner2010-01-191-17/+50
| | | | | | | | | 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-25/+36
| | | | | | | | | | | | | 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
* now that MCSymbol::print doesn't use it's MAI argument, we can Chris Lattner2010-01-171-161/+65
| | | | | | | remove it and change all the code that prints MCSymbols to use << instead, which is much simpler and cleaner. llvm-svn: 93695
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-161-1/+1
| | | | llvm-svn: 93664
* rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,Chris Lattner2010-01-161-6/+6
| | | | | | | | and add an explicit ForcePrivate argument. Switch FunctionEHFrameInfo to be MCSymbol based instead of string based. llvm-svn: 93646
* more string -> sym, getMangledName is now gone from this file.Chris Lattner2010-01-161-29/+35
| | | | llvm-svn: 93624
* use symbols instead of strings, eliminating a bunch of getMangledNameChris Lattner2010-01-161-39/+55
| | | | | | calls. Add FIXMEs about a bunch of nondeterminism in stub output. llvm-svn: 93621
* simplify some code.Chris Lattner2010-01-161-9/+5
| | | | llvm-svn: 93619
* switch more stuff onto MCSymbolsChris Lattner2010-01-161-38/+72
| | | | llvm-svn: 93608
* MCize a bunch more stuff, eliminating a lot of uses of the manglerChris Lattner2010-01-161-16/+40
| | | | | | and CurrentFnName. llvm-svn: 93594
* just finish MCizing FnStubInfo which cleans it up and simplifies it.Chris Lattner2010-01-131-48/+33
| | | | llvm-svn: 93334
* don't call getNameWithPrefix repeatedly and unnecesarily.Chris Lattner2010-01-131-5/+7
| | | | llvm-svn: 93333
* properly use MCSymbol to print the strings aquired from getNameWithPrefix.Chris Lattner2010-01-131-25/+64
| | | | llvm-svn: 93332
* eliminate some uses of Mangler::makeNameProper.Chris Lattner2010-01-131-6/+7
| | | | llvm-svn: 93305
* change Mangler::makeNameProper to return its result in a SmallVectorChris Lattner2010-01-131-8/+16
| | | | | | | | | | | | instead of returning it in an std::string. Based on this change: 1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef 2. Change a bunch of targets to call makeNameProper with a smallstring, making several of them *much* more efficient. 3. Rewrite Mangler::makeNameProper to not build names and then prepend prefixes, not use temporary std::strings, and to avoid other crimes. llvm-svn: 93298
* Make sure debug info hook gets called when emittingDale Johannesen2010-01-061-12/+11
| | | | | | synonyms for PPC. llvm-svn: 92817
* Move DebugInfo checks into EmitComments and remove them fromDavid Greene2009-11-131-1/+1
| | | | | | | | target-specific AsmPrinters. Not all comments need DebugInfo. Re-enable the line numbers comment test. llvm-svn: 88697
* Similar to r86588, but for Darwin this time.Bill Wendling2009-11-091-3/+3
| | | | llvm-svn: 86592
* The jump table was being generated before the end label for exception handlingBill Wendling2009-11-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was generated. This caused code like this: ## The asm code for the function .section __TEXT,__const .align 2 lJTI11_0: LJTI11_0: .long LBB11_16 .long LBB11_4 .long LBB11_5 .long LBB11_6 .long LBB11_7 .long LBB11_8 .long LBB11_9 .long LBB11_10 .long LBB11_11 .long LBB11_12 .long LBB11_13 .long LBB11_14 Leh_func_end11: ## <---now in the wrong section! The `Leh_func_end11' would then end up in the wrong section, causing the resulting EH frame information to be wrong: __ZL11CheckRightsjPKcbRbRP6NSData.eh: .set Lset500eh,Leh_frame_end11-Leh_frame_begin11 .long Lset500eh ; Length of Frame Information Entry Leh_frame_begin11: .long Leh_frame_begin11-Leh_frame_common .long Leh_func_begin11-. .set Lset501eh,Leh_func_end11-Leh_func_begin11 .long Lset501eh ; FDE address range `Lset501eh' is now something huge instead of the real value. The X86 back-end generates the jump table after the EH information is emitted. Do the same here. llvm-svn: 86588
* Add PowerPC codegen for indirect branches.Bob Wilson2009-11-041-0/+3
| | | | llvm-svn: 86050
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-3/+3
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* emit .subsections_via_symbols through MCStreamer instead of textually.Chris Lattner2009-10-191-1/+1
| | | | llvm-svn: 84509
* Instead of printing unnecessary basic block labels as labels inDan Gohman2009-10-061-2/+0
| | | | | | | | | | verbose-asm mode, print comments instead. This eliminates a non-comment difference between verbose-asm mode and non-verbose-asm mode. Also, factor out the relevant code out of all the targets and into target-independent code. llvm-svn: 83392
* Update processDebugLoc() so that it can be used to process debug info before ↵Devang Patel2009-10-061-1/+3
| | | | | | and after printing an instruction. llvm-svn: 83363
* Use MachineInstr as an processDebugLoc() argument.Devang Patel2009-09-301-1/+1
| | | | | | This will allow processDebugLoc() to handle scopes for DWARF debug info. llvm-svn: 83183
* Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use thisBob Wilson2009-09-301-7/+2
| | | | | | | | | | | | | | | | to emit target-specific things at the beginning of the asm output. This fixes a problem for PPC, where the text sections are not being kept together as expected. The base class doInitialization code calls DW->BeginModule() which emits a bunch of DWARF section directives. The PPC doInitialization code then emits all the TEXT section directives, with the intention that they will be kept together. But as I understand it, the Darwin assembler treats the default TEXT section as a special case and moves it to the beginning of the file, which means that all those DWARF sections are in the middle of the text. With this change, the EmitStartOfAsmFile hook is called before the DWARF section directives are emitted, so that all the PPC text section directives come out right at the beginning of the file. llvm-svn: 83176
* eliminate the PPC backend's implementation of EmitExternalGlobalChris Lattner2009-09-161-15/+0
| | | | | | | | | | | | | | | | and use PersonalityPrefix/Suffix to achieve the same effect (like the x86 backend). This changes the code generated for ppc static mode, but guess what, we were generating this before: .byte 0x9B ; Personality (indirect pcrel sdata4) .long ___gxx_personality_v0-. ; Personality which is not correct! (it is not an 'indirect' reference). llvm-svn: 81965
* remove all but one reference to TargetRegisterDesc::AsmName.Chris Lattner2009-09-131-1/+1
| | | | llvm-svn: 81714
* the tblgen produced 'getRegisterName' method does not accessChris Lattner2009-09-131-1/+1
| | | | | | the object, make it static instead of const. llvm-svn: 81711
* make tblgen produce a function that returns the name for a physreg.Chris Lattner2009-09-131-0/+2
| | | | | | Nothing is using this info yet. llvm-svn: 81707
* replace printBasicBlockLabel with EmitBasicBlockStart,Chris Lattner2009-09-131-2/+2
| | | | | | | 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-2/+3
| | | | | | 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
* Alter 79292 to produce output that actually assembles.Dale Johannesen2009-08-261-0/+2
| | | | llvm-svn: 80119
* Make linkerprivate work for ARM and PPC. Testcase coversDale Johannesen2009-08-241-4/+4
| | | | | | | | | all Darwin targets; could be split into separate tests for the chip subdirectories, but from Chris' last mail on testing I assume he'd rather have only one test. Generic seems to be the best available, maybe there should be a Darwin subdirectory? llvm-svn: 79877
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-221-13/+13
| | | | llvm-svn: 79777
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-5/+5
| | | | llvm-svn: 79763
* eliminate AsmPrinter::SwitchToSection and just have clientsChris Lattner2009-08-191-21/+25
| | | | | | talk to the MCStreamer directly instead. llvm-svn: 79405
* PowerPC inline asm was emitting two output operandsDale Johannesen2009-08-181-4/+6
| | | | | | | | | for a single "m" constraint; this is wrong because the opcode of a load or store would have to change in parallel. This patch makes it always compute addresses into a register, which is correct but not as efficient as possible. 7144566. llvm-svn: 79292
* Add support for the PowerPC 64-bit SVR4 ABI.Tilmann Scheller2009-08-151-3/+57
| | | | | | | | | | | | | | | | | The Link Register is volatile when using the 32-bit SVR4 ABI. Make it possible to use the 64-bit SVR4 ABI. Add non-volatile registers for the 64-bit SVR4 ABI. Make sure r2 is a reserved register when using the 64-bit SVR4 ABI. Update PPCFrameInfo for the 64-bit SVR4 ABI. Add FIXME for 64-bit Darwin PPC. Insert NOP instruction after direct function calls. Emit official procedure descriptors. Create TOC entries for GlobalAddress references. Spill 64-bit non-volatile registers to the correct slots. Only custom lower VAARG when using the 32-bit SVR4 ABI. Use simple VASTART lowering for the 64-bit SVR4 ABI. llvm-svn: 79091
* TargetRegistry: Change AsmPrinter constructor to be typed as returning anDaniel Dunbar2009-08-131-4/+4
| | | | | | AsmPrinter instance (instead of just a FunctionPass) llvm-svn: 78962
OpenPOWER on IntegriCloud