summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmPrinter
Commit message (Collapse)AuthorAgeFilesLines
...
* use TLOF to compute the section for a function instead ofChris Lattner2009-08-031-5/+4
| | | | | | replicating the logic manually. llvm-svn: 78011
* convert macho stub emission to use SwitchToSection instead ofChris Lattner2009-08-031-34/+50
| | | | | | textual sections. llvm-svn: 78007
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-311-1/+2
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* Until we have a "ALIGN" pseudo instruction, have asm printer emitted a .alignEvan Cheng2009-07-311-0/+7
| | | | | | | | to ensure the instruction that follows a TBB (when the number of table entries is odd) is 2-byte aligned. Patch by Sandeep Patel. llvm-svn: 77705
* Switch obvious clients to Twine instead of utostr (when they were already usingDaniel Dunbar2009-07-301-2/+1
| | | | | | | | | a Twine, e.g., for names). - I am a little ambivalent about this; we don't want the string conversion of utostr, but using overload '+' mixed with string and integer arguments is sketchy. On the other hand, this particular usage is something of an idiom. llvm-svn: 77579
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-2/+3
| | | | | | No functionality change. llvm-svn: 77432
* Optimize Thumb2 jumptable to use tbb / tbh when all the offsets fit in byte ↵Evan Cheng2009-07-291-2/+27
| | | | | | / halfword. llvm-svn: 77422
* 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-3/+4
| | | | | | | | | | | | | | | | | | | | 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/+2
| | | | | | 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-13/+2
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* Change Thumb2 jumptable codegen to one that uses two level jumps:Evan Cheng2009-07-251-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: adr r12, #LJTI3_0_0 ldr pc, [r12, +r0, lsl #2] LJTI3_0_0: .long LBB3_24 .long LBB3_30 .long LBB3_31 .long LBB3_32 After: adr r12, #LJTI3_0_0 add pc, r12, +r0, lsl #2 LJTI3_0_0: b.w LBB3_24 b.w LBB3_30 b.w LBB3_31 b.w LBB3_32 This has several advantages. 1. This will make it easier to optimize this to a TBB / TBH instruction + (smaller) table. 2. This eliminate the need for ugly asm printer hack to force the address into thumb addresses (bit 0 is one). 3. Same codegen for pic and non-pic. 4. This eliminate the need to align the table so constantpool island pass won't have to over-estimate the size. Based on my calculation, the later is probably slightly faster as well since ldr pc with shifter address is very slow. That is, it should be a win as long as the HW implementation can do a reasonable job of branch predict the second branch. llvm-svn: 77024
* Add a workaround for Darwin assembler bug where it's not setting the thumb ↵Evan Cheng2009-07-241-2/+20
| | | | | | bit in Thumb2 jumptable entries. We now pass Olden. llvm-svn: 76991
* Replace use of std::set with SmallPtrSet.Evan Cheng2009-07-241-3/+5
| | | | llvm-svn: 76983
* use section flags more correctly.Chris Lattner2009-07-241-3/+2
| | | | llvm-svn: 76944
* reduce api exposure: clients shouldn't call SectionKindForGlobal directly.Chris Lattner2009-07-241-22/+21
| | | | llvm-svn: 76941
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-6/+2
| | | | | | | 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-8/+4
| | | | llvm-svn: 76456
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-5/+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-1/+0
| | | | llvm-svn: 76344
* 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-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- 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-7/+2
| | | | | | | | 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-2/+7
| | | | | | | - This abuses TargetMachineRegistry's constructor for now, this will get cleaned up in time. llvm-svn: 75762
* convert arm/darwin stubs to use the mangler to synthesize all the names ↵Chris Lattner2009-07-151-47/+66
| | | | | | | | instead of doing it with printSuffixedName. llvm-svn: 75741
* fix an arm codegen bug (the same as PR4482 on ppc) where available_externallyChris Lattner2009-07-151-3/+3
| | | | | | | symbols were not getting stubs. While I'm at it, add a big testcase for stub generation to make sure I don't break anything. llvm-svn: 75737
* convert [Hidden]GVNonLazyPtrs to compute the global and stub namesChris Lattner2009-07-151-27/+41
| | | | | | | with the mangler (like x86 and ppc), instead of going through printSuffixedName. llvm-svn: 75736
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-141-5/+5
| | | | | | dynamic_cast<>. llvm-svn: 75670
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-5/+7
| | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | 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-7/+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
* Rename getValueName -> getMangledName.Chris Lattner2009-07-141-5/+7
| | | | llvm-svn: 75615
* Major changes to Thumb (not Thumb2). Many 16-bit instructions either ↵Evan Cheng2009-07-111-2/+2
| | | | | | | | modifies CPSR when they are outside the IT blocks, or they can predicated when in Thumb2. Move the implicit def of CPSR to an optional def which defaults CPSR. This allows the 's' bit to be toggled dynamically. A side-effect of this change is asm printer is now using unified assembly. There are some minor clean ups and fixes as well. llvm-svn: 75359
* Add a thumb2 pass to insert IT blocks.Evan Cheng2009-07-101-1/+1
| | | | llvm-svn: 75218
* Replace TM.getRegisterInfo() calls by TRI instance variable.Bob Wilson2009-07-101-25/+24
| | | | | | Use getAsmName() method instead of accessing AsmName field directly. llvm-svn: 75205
* Handle 'a' modifier on inline assembly operands.Bob Wilson2009-07-091-2/+7
| | | | | | This is part of the fix for pr4521. llvm-svn: 75201
* Added Thumb IT instruction.Evan Cheng2009-07-091-0/+16
| | | | llvm-svn: 75198
* Fix ldrd / strd address mode matching code. It allows for +/- 8 bit offset. ↵Evan Cheng2009-07-091-0/+17
| | | | | | | | Also change the printer to make the scale 4 explicit. Note, we are not yet generating these instructions. llvm-svn: 75181
* Change how so_imm and t2_so_imm are handled. At instruction selection time, ↵Evan Cheng2009-07-081-18/+6
| | | | | | the immediates are no longer encoded in the imm8 + rot format, that are left as it is. The encoding is now done in ams printing and code emission time instead. llvm-svn: 75048
* Missed an exit during the conversion.Torok Edwin2009-07-081-4/+4
| | | | | | | Will convert assert(0) that don't have abort() to LLVM_UNREACHABLE in a later commit. llvm-svn: 75045
* Implement NEON vld1 instructions.Bob Wilson2009-07-081-1/+3
| | | | llvm-svn: 75019
* Thumb2 pre/post indexed loads.Evan Cheng2009-07-021-0/+12
| | | | llvm-svn: 74696
* Add a new addressing mode for NEON load/store instructions.Bob Wilson2009-07-011-0/+17
| | | | llvm-svn: 74658
* Remove unused AsmPrinter OptLevel argument, and propogate.Daniel Dunbar2009-07-011-5/+3
| | | | | | | - 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-3/+4
| | | | | | | | | | 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
* Implement Thumb2 ldr.Evan Cheng2009-06-291-54/+113
| | | | | | After much back and forth, I decided to deviate from ARM design and split LDR into 4 instructions (r + imm12, r + imm8, r + r << imm12, constantpool). The advantage of this is 1) it follows the latest ARM technical manual, and 2) makes it easier to reduce the width of the instruction later. The down side is this creates more inconsistency between the two sub-targets. We should split ARM LDR instruction in a similar fashion later. I've added a README entry for this. llvm-svn: 74420
* Renaming for consistency.Evan Cheng2009-06-271-44/+43
| | | | llvm-svn: 74368
* Split thumb-related stuff into separate classes.Anton Korobeynikov2009-06-261-2/+2
| | | | | | Step 1: ARMInstructionInfo => {ARM,Thumb}InstructionInfo llvm-svn: 74329
OpenPOWER on IntegriCloud