summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
...
* TargetRegistry: Reorganize AsmPrinter construction so that clients pass in theDaniel Dunbar2009-08-131-5/+5
| | | | | | | | | TargetAsmInfo. This eliminates a dependency on TargetMachine.h from TargetRegistry.h, which technically was a layering violation. - Clients probably can only sensibly pass in the same TargetAsmInfo as the TargetMachine has, but there are only limited clients of this API. llvm-svn: 78928
* Various AsmWriter output cleanups. Use WriteAsOperand instead ofDan Gohman2009-08-131-15/+5
| | | | | | PrintUnmangledNameSafely. llvm-svn: 78878
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-101-1/+1
| | | | llvm-svn: 78576
* Fix a weird ppc64-specific link error during an llvm-gcc build:Chris Lattner2009-08-101-0/+2
| | | | | | | | | | ld: bad offset (0x00000091) for lo14 instruction pic-base fix-up in ___popcountdi2 from libgcc/./_popcountsi2_s.o The problem is that the non lazy symbol pointers need to be 8 byte aligned on ppc64 and .section doesn't have an implicit alignment like ".non_lazy_symbol_pointer" does. llvm-svn: 78572
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-101-31/+27
| | | | | | | | | | | | | | | | instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? llvm-svn: 78547
* make printInstruction return void since its result is omitted. Make the Chris Lattner2009-08-081-1/+1
| | | | | | error condition get trapped with an assert. llvm-svn: 78449
* don't check the result of printInstruction anymore.Chris Lattner2009-08-081-4/+1
| | | | llvm-svn: 78444
* Remove dead code. MDNode and MDString are not Constant anymore.Devang Patel2009-08-051-3/+0
| | | | llvm-svn: 78207
* 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
* make MergeableCString be a SectionKind "abstract class", andChris Lattner2009-08-041-0/+1
| | | | | | | | add new concrete versions for 1/2/4-byte mergable strings. These are not actually created yet. llvm-svn: 78055
* switch ppc to using SwitchToSection instead of textual section stuff.Chris Lattner2009-08-031-14/+43
| | | | llvm-svn: 78013
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-311-7/+8
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-5/+6
| | | | | | No functionality change. llvm-svn: 77432
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-281-1/+1
| | | | | | New name is Metadata.h. llvm-svn: 77370
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-7/+8
| | | | | | | | | | | | | | | | | | | | 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
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-1/+1
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-5/+6
| | | | llvm-svn: 77145
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-2/+2
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* Add new helpers for registering targets.Daniel Dunbar2009-07-251-1/+1
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* use section flags more correctly.Chris Lattner2009-07-241-1/+2
| | | | llvm-svn: 76944
* reduce api exposure: clients shouldn't call SectionKindForGlobal directly.Chris Lattner2009-07-241-4/+5
| | | | llvm-svn: 76941
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-23/+6
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* Rename Mangler linkage enums to something less gross.Bill Wendling2009-07-201-3/+3
| | | | llvm-svn: 76456
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-3/+10
| | | | | | | | | "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
* Put Target definitions inside Target specific header, and llvm namespace.Daniel Dunbar2009-07-181-2/+0
| | | | llvm-svn: 76344
* Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLinkDaniel Dunbar2009-07-161-3/+0
| | | | | | | variables. - Module initialization functions supplanted the need for these. llvm-svn: 75886
* fix section switching to ensure that stubs are emitted to the rightChris Lattner2009-07-161-4/+5
| | | | | | section on ppc. llvm-svn: 75881
* Remove old style hacks to register AsmPrinter into TargetMachine.Daniel Dunbar2009-07-151-8/+0
| | | | | | - No intended functionality change. llvm-svn: 75843
* Reapply TargetRegistry refactoring commits.Daniel Dunbar2009-07-151-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r75799 into '.': U test/Analysis/PointerTracking U include/llvm/Target/TargetMachineRegistry.h U include/llvm/Target/TargetMachine.h U include/llvm/Target/TargetRegistry.h U include/llvm/Target/TargetSelect.h U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp U tools/llc/llc.cpp U lib/Target/PowerPC/PPCTargetMachine.h U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp U lib/Target/PowerPC/PPCTargetMachine.cpp U lib/Target/PowerPC/PPC.h U lib/Target/ARM/ARMTargetMachine.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/ARMTargetMachine.h U lib/Target/ARM/ARM.h U lib/Target/XCore/XCoreTargetMachine.cpp U lib/Target/XCore/XCoreTargetMachine.h U lib/Target/PIC16/PIC16TargetMachine.cpp U lib/Target/PIC16/PIC16TargetMachine.h U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp U lib/Target/Alpha/AlphaTargetMachine.cpp U lib/Target/Alpha/AlphaTargetMachine.h U lib/Target/X86/X86TargetMachine.h U lib/Target/X86/X86.h U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.h U lib/Target/CppBackend/CPPTargetMachine.h U lib/Target/CppBackend/CPPBackend.cpp U lib/Target/CBackend/CTargetMachine.h U lib/Target/CBackend/CBackend.cpp U lib/Target/TargetMachine.cpp U lib/Target/IA64/IA64TargetMachine.cpp U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp U lib/Target/IA64/IA64TargetMachine.h U lib/Target/IA64/IA64.h U lib/Target/MSIL/MSILWriter.cpp U lib/Target/CellSPU/SPUTargetMachine.h U lib/Target/CellSPU/SPU.h U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp U lib/Target/CellSPU/SPUTargetMachine.cpp U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp U lib/Target/Mips/MipsTargetMachine.cpp U lib/Target/Mips/MipsTargetMachine.h U lib/Target/Mips/Mips.h U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp U lib/Target/Sparc/SparcTargetMachine.cpp U lib/Target/Sparc/SparcTargetMachine.h U lib/ExecutionEngine/JIT/TargetSelect.cpp U lib/Support/TargetRegistry.cpp llvm-svn: 75820
* Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to ↵Stuart Hastings2009-07-151-11/+4
| | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. llvm-svn: 75799
* Register Target's TargetMachine and AsmPrinter in the new registry.Daniel Dunbar2009-07-151-4/+11
| | | | | | | - This abuses TargetMachineRegistry's constructor for now, this will get cleaned up in time. llvm-svn: 75762
* get the PPC stub temporary label from the mangler instead of Chris Lattner2009-07-151-29/+5
| | | | | | | using horrible string hacking. This gives us a different label, but it's just an assembler temporary, so the name doesn't matter. llvm-svn: 75733
* turn some if/then's into ?:Chris Lattner2009-07-151-12/+3
| | | | llvm-svn: 75732
* eliminate a bunch of printSuffixedName's by using info computed fromChris Lattner2009-07-151-23/+15
| | | | | | Mangler in FnStubs. llvm-svn: 75731
* convert FnStubs to using a more structured form, eliminatingChris Lattner2009-07-151-9/+31
| | | | | | | a couple instances of printSuffixedName (in favor of having the mangler do stuff). llvm-svn: 75729
* simplify "EmitExternalGlobal": it is only used to output aChris Lattner2009-07-151-6/+1
| | | | | | | | reference to the personality function for a module, and those are all added to the GVStubs array by looping over MMI->getPersonalities() llvm-svn: 75720
* Convert GVStubs and HiddenGVStubs to work more like the X86 backend, thisChris Lattner2009-07-151-56/+52
| | | | | | eliminates a bunch of uses of "printSuffixedName" and "getGlobalLinkName". llvm-svn: 75719
* minor cleanups: only switch sections once before all function stubs, instead ofChris Lattner2009-07-151-16/+15
| | | | | | before each one. llvm-svn: 75718
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-141-7/+7
| | | | | | dynamic_cast<>. llvm-svn: 75670
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-5/+4
| | | | | | | | | | | | | | | | | | | | 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-8/+8
| | | | | | | | | 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-4/+5
| | | | | | | | | | | | | | | | | | --- 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-2/+2
| | | | llvm-svn: 75630
* Rename getValueName -> getMangledName.Chris Lattner2009-07-141-5/+4
| | | | llvm-svn: 75615
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+2
| | | | | | | | | 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
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-12/+7
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* simplify some logic by using isWeakForLinker(). Thanks to Anton forChris Lattner2009-07-021-5/+2
| | | | | | pointing this out. llvm-svn: 74700
* Fix codegen for references to available_externally symbols. This fixesChris Lattner2009-07-011-5/+8
| | | | | | PR4482. llvm-svn: 74613
* Remove unused AsmPrinter OptLevel argument, and propogate.Daniel Dunbar2009-07-011-14/+8
| | | | | | | - This more or less amounts to a revert of r65379. I'm curious to know what happened that caused this variable to become unused. llvm-svn: 74579
* Add an "alignment" field to the MachineFunction object. It makes more sense toBill Wendling2009-06-301-2/+2
| | | | | | | | | | 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
OpenPOWER on IntegriCloud