aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCAsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Wire up primitive support in the assembler backend for writing .o filesChris Lattner2010-11-151-1/+4
| | | | | | | | | | | | | | | | directly on the mac. This is very early, doesn't support relocations and has a terrible hack to avoid .machine from being printed, but despite that it generates an bitwise-identical-to-cctools .o file for stuff like this: define i32 @test() nounwind { ret i32 42 } I don't plan to continue pushing this forward, but if anyone else was interested in doing it, it should be really straight-forward. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119136 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a regression with the new instprinter: we lost the ability toChris Lattner2010-11-151-0/+22
| | | | | | | | print DBG_VALUE instructions. This should unbreak the llvm-gcc-powerpc-darwin9 buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119132 91177308-0d34-0410-b5e6-96231b3b80d8
* strength reduce TOC temp label generation, no functionality change.Chris Lattner2010-11-151-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119112 91177308-0d34-0410-b5e6-96231b3b80d8
* rip out a ton of old instruction printing junk now that theChris Lattner2010-11-151-419/+86
| | | | | | | new instprinting logic is there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119111 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn on the new instprinter by default.Chris Lattner2010-11-151-1/+1
| | | | | | | | | | | | | | | | The only change in the output is: 1) we get a better comment on mfcr, we get: mfcr r2 ; cr2 instead of: mfcr r2 ; 32 2) we no longer emit $stub's on powerpc/leopard. The Leopard linker autosynthesizes them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119108 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some extraneous quotes to make the new instprinter match.Chris Lattner2010-11-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119104 91177308-0d34-0410-b5e6-96231b3b80d8
* with the picbase nonsense starting to be figured out, implementChris Lattner2010-11-141-0/+22
| | | | | | | | lowering support for MovePCtoLR[8]. Down to 4 failures again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119090 91177308-0d34-0410-b5e6-96231b3b80d8
* move the pic base symbol stuff up to MachineFunctionChris Lattner2010-11-141-2/+0
| | | | | | | | since it is trivial and will be shared between ppc and x86. This substantially simplifies the X86 backend also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119089 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement ppc asmprinter "toc" handling to use a VariantKindChris Lattner2010-11-141-0/+26
| | | | | | | | | on the operand, required for .o file writing and fixing the PowerPC/mult-alt-generic-powerpc64.ll failure with the new instprinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119087 91177308-0d34-0410-b5e6-96231b3b80d8
* lower PPC::MFCRpseud when transforming to MC, avoiding callingChris Lattner2010-11-141-2/+11
| | | | | | | the aborting printSpecial() method. This gets us to 8 failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119084 91177308-0d34-0410-b5e6-96231b3b80d8
* properly wire up the instprinter to the ppc64 backend, down to 5 failures.Chris Lattner2010-11-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119081 91177308-0d34-0410-b5e6-96231b3b80d8
* switch PPC to a simplified MCInstLowering model.Chris Lattner2010-11-141-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119074 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for printing register and immediate operands,Chris Lattner2010-11-141-3/+1
| | | | | | | | | | | | | | | | add support for darwin vs aix syntax. We now can print instructions like this: add r3, r3, r4 blr and (in aix mode): add 3, 3, 4 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119062 91177308-0d34-0410-b5e6-96231b3b80d8
* stub out PPCMCInstLowering, add a new option that uses it and the newChris Lattner2010-11-141-0/+24
| | | | | | | instprinter when -enable-ppc-inst-printer is passed to llc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119061 91177308-0d34-0410-b5e6-96231b3b80d8
* stub out a powerpc MCInstPrinter implementation.Chris Lattner2010-11-141-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119059 91177308-0d34-0410-b5e6-96231b3b80d8
* move PPCAsmPrinter into the main PPC library, like ARM and X86.Chris Lattner2010-11-141-0/+918
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119054 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out asmprinter out of ppcAnton Korobeynikov2008-08-171-1119/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54887 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle visibility printing with all generality. Remove bunch of duplicate code.Anton Korobeynikov2008-08-081-12/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54540 91177308-0d34-0410-b5e6-96231b3b80d8
* Use chars, where possibleAnton Korobeynikov2008-08-081-30/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54539 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert PPC/Linux to new section printing stuffAnton Korobeynikov2008-08-081-84/+68
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54538 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch PPC/Darwin to new section handling stuffAnton Korobeynikov2008-08-081-146/+99
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54537 91177308-0d34-0410-b5e6-96231b3b80d8
* CleanupAnton Korobeynikov2008-08-081-72/+70
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54536 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra call to DW.SetModuleInfo on Linux.Dale Johannesen2008-07-091-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53365 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit debug into for data-only files for Linux PPC.Dale Johannesen2008-07-091-3/+10
| | | | | | | | I cannot test this target, let me know if it breaks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53362 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit debug info for data-only files. This versionDale Johannesen2008-07-091-5/+9
| | | | | | | | applies to ppc Darwin only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53353 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out 53254. It broke ppc debug info codegen.Evan Cheng2008-07-091-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53280 91177308-0d34-0410-b5e6-96231b3b80d8
* Make debug info come out in data-only files.Dale Johannesen2008-07-081-3/+6
| | | | | | | | | | | | | This is a question of the debugging setup code not being called at the right time, and it's called from target-dependent code for some reason. I have only attempted to fix Darwin, but I'm pretty sure it's broken elsewhere; I'll leave that to people who can test it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53254 91177308-0d34-0410-b5e6-96231b3b80d8
* Put initialized const weak objects into correctDale Johannesen2008-05-241-1/+9
| | | | | | | | sections on ppc32 darwin. g++.dg/abi/key2.C git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51527 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle quoted names when constructing $stub's,Dale Johannesen2008-05-191-18/+35
| | | | | | | | $non_lazy_ptr's and $lazy_ptr's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51277 91177308-0d34-0410-b5e6-96231b3b80d8
* Record weak external linkage in a case where we wereDale Johannesen2008-05-161-0/+12
| | | | | | | | | missing it. gcc.dg/darwin-weakimport-2.c. Handle common and weak differently for darwin ppc32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51201 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-6/+8
| | | | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51118 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-021-1/+2
| | | | | | | | | | | | | | | | | review feedback. -enable-eh is still accepted but doesn't do anything. EH intrinsics use Dwarf EH if the target supports that, and are handled by LowerInvoke otherwise. The separation of the EH table and frame move data is, I think, logically figured out, but either one still causes full EH info to be generated (not sure how to split the metadata correctly). MachineModuleInfo::needsFrameInfo is no longer used and is removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49064 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 49006 for the moment.Dale Johannesen2008-04-011-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49046 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit exception handling info for functions which areDale Johannesen2008-03-311-1/+2
| | | | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006 91177308-0d34-0410-b5e6-96231b3b80d8
* Smaller function alignment when optimizing for size.Evan Cheng2008-03-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48805 91177308-0d34-0410-b5e6-96231b3b80d8
* A quick nm audit turned up several fixed tables and objects that wereDan Gohman2008-03-251-1/+1
| | | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to ↵Evan Cheng2008-02-281-2/+2
| | | | | | 16-byte boundaries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47703 91177308-0d34-0410-b5e6-96231b3b80d8
* Change "Name" to "AsmName" in the target register info. Gee, a refactoring toolBill Wendling2008-02-261-1/+1
| | | | | | | would have been a Godsend here! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47625 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle \n's in value names for more targets. The asm printers Chris Lattner2008-02-151-6/+21
| | | | | | | | really really really need refactoring :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47171 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite tblgen handling of subtarget features soDale Johannesen2008-02-141-0/+1
| | | | | | | | | | | | it follows the order of the enum, not alphabetical. The motivation is to make -mattr=+ssse3,+sse41 select SSE41 as it ought to. Added "ignored" enum values of 0 to PPC and SPU to avoid compiler warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47143 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
* Ident mnemonics appropriatelyNate Begeman2008-02-051-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46746 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the annoying blank lines before labels.Evan Cheng2008-02-021-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46667 91177308-0d34-0410-b5e6-96231b3b80d8
* If there's no instructions being emitted on X86 for a function, emit aBill Wendling2008-01-261-6/+2
| | | | | | | nop. Emit the nop directly for PPC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46398 91177308-0d34-0410-b5e6-96231b3b80d8
* If there are no machine instructions emitted for a function, then insertBill Wendling2008-01-261-2/+15
| | | | | | | | | a "nop" instruction so that we don't have the function's label associated with something that it's not supposed to be associated with. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46394 91177308-0d34-0410-b5e6-96231b3b80d8
* Honor explicit section information on Darwin.Dale Johannesen2008-01-231-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46267 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the part of 45848 that treated weak globalsDale Johannesen2008-01-171-1/+2
| | | | | | | | | | as weak globals rather than commons. While not wrong, this change tickled a latent bug in Darwin's strip, so revert it for now as a workaround. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46144 91177308-0d34-0410-b5e6-96231b3b80d8
* Weak things initialized to 0 don't go in bss on Darwin.Dale Johannesen2008-01-111-9/+8
| | | | | | | | | Cosmetic changes to spacing to match gcc (some dejagnu tests actually care). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45848 91177308-0d34-0410-b5e6-96231b3b80d8
* leopard and above support alignment for common symbols.Chris Lattner2008-01-021-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45493 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-3/+3
| | | | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45464 91177308-0d34-0410-b5e6-96231b3b80d8