summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsoleted files (from AsmPrinter move)Daniel Dunbar2009-08-131-486/+0
| | | | llvm-svn: 78917
* This void is implicit in C++.Dan Gohman2009-08-121-1/+1
| | | | llvm-svn: 78848
* Change TargetAsmInfo to be constructed via TargetRegistry from a Target+TripleChris Lattner2009-08-121-0/+3
| | | | | | | | pair instead of from a virtual method on TargetMachine. This cuts the final ties of TargetAsmInfo to TargetMachine, meaning that MC can now use TargetAsmInfo. llvm-svn: 78802
* fix some warnings for the MSVC build, by Yonggang Luo!Chris Lattner2009-08-101-1/+1
| | | | llvm-svn: 78571
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-081-4/+6
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* Simplify code and avoid allocations.Benjamin Kramer2009-08-071-10/+3
| | | | llvm-svn: 78382
* go through PIC16TargetObjectFile to make sections instead of Chris Lattner2009-08-061-10/+3
| | | | | | creating them directly in the pic16 asmprinter. llvm-svn: 78317
* Don't call SectionForGlobal for hasAvailableExternallyLinkage()Dan Gohman2009-08-021-1/+1
| | | | | | variables either. llvm-svn: 77844
* don't call SectionForGlobal on declarations, you can't tell the section aChris Lattner2009-08-021-1/+3
| | | | | | declaration will end up in. llvm-svn: 77843
* Make SectionKind::get() private.Chris Lattner2009-08-021-2/+2
| | | | llvm-svn: 77835
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-011-2/+2
| | | | | | | | | | | | | | | | | | should have no state that is specific to particular globals in the section. In this case, it means the removal of the "isWeak" and "ExplicitSection" bits. MCSection uses the new form of SectionKind. To handle isWeak, I introduced a new SectionInfo class, which is SectionKind + isWeak, and it is used by the part of the code generator that does classification of a specific global. The ExplicitSection disappears. It is moved onto MCSection as a new "IsDirective" bit. Since the Name of a section is either a section or directive, it makes sense to keep this bit in MCSection. Ultimately the creator of MCSection should canonicalize (e.g.) .text to whatever the actual section is. llvm-svn: 77803
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-311-6/+6
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* Keep track of references to mem(cpy,move,set) and then print only one externSanjiv Gupta2009-07-301-2/+27
| | | | | | declaration for them. llvm-svn: 77578
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-1/+1
| | | | | | No functionality change. llvm-svn: 77432
* fix a casting problem on the llvm-x86_64-linux testerChris Lattner2009-07-281-1/+1
| | | | llvm-svn: 77295
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-15/+27
| | | | | | | | | | | | | | | | | | | | 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
* Remove duplicate entries while printing decls for external symbols.Sanjiv Gupta2009-07-271-2/+23
| | | | | | Some libcall names are same, so they were getting printed twice. llvm-svn: 77215
* Eliminate getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-271-2/+2
| | | | | | | | getOrCreateSection instead. llvm-svn: 77186
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-4/+4
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-1/+1
| | | | | | | | | | | | | | 1. Spell SectionFlags::Writeable as "Writable". 2. Add predicates for deriving SectionFlags from SectionKinds. 3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into ELFTargetAsmInfo. 4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the BSS bit set (the real fix for PR4619). 5. Fix isSuitableForBSS to not put globals with explicit sections set in BSS (which was the reason #4 wasn't fixed earlier). 6. Remove my previous hack for PR4619. llvm-svn: 77085
* Add new helpers for registering targets.Daniel Dunbar2009-07-251-11/+9
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* Do not call getMangledName on Intrinsics.Sanjiv Gupta2009-07-231-4/+3
| | | | llvm-svn: 76842
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-2/+1
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* more random whitespace cleanup, eliminate #define, avoid copyingChris Lattner2009-07-211-1/+1
| | | | | | vectors needlessly, doxygenify comments, improve constness, etc. llvm-svn: 76585
* some simple whitespace cleanup, avoid copying vectors for no reasonChris Lattner2009-07-211-31/+24
| | | | | | as much, etc. llvm-svn: 76578
* Register AsmPrinter for XCore, MSP430, and PIC16 targets.Daniel Dunbar2009-07-151-1/+1
| | | | | | - Switch to standard addAssemblyEmitter logic. llvm-svn: 75854
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-141-2/+2
| | | | | | dynamic_cast<>. llvm-svn: 75670
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-11/+11
| | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | 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-11/+11
| | | | | | | | | | | | | | | | | | --- 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-11/+11
| | | | llvm-svn: 75615
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-3/+4
| | | | | | | | | 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
* pic16 isn't ready to handle llvm.metadata yet.Sanjiv Gupta2009-07-061-0/+2
| | | | llvm-svn: 74838
* Implement _CONFIG macro to allow users to se to configuration settings on ↵Sanjiv Gupta2009-07-061-12/+13
| | | | | | | | | | | the part. Implement _section macro to allow users to place objects in specific sections. Implement _address macro to allow users to place objects at a particular address. Placing objects at a memory address: crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter. llvm-svn: 74822
* Remove unused AsmPrinter OptLevel argument, and propogate.Daniel Dunbar2009-07-011-2/+1
| | | | | | | - 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
* Code Restructuring. No functionality change.Sanjiv Gupta2009-06-161-31/+8
| | | | llvm-svn: 73481
* The subprogram descriptor for a function may be missing (llvm-ld linking two ↵Sanjiv Gupta2009-06-131-5/+17
| | | | | | | | | static functions with same name), so pick up the compilation unit for the function from the first valid debug loc of its instructions. This patch also emits debug info for structure (aggregate types in general) types. llvm-svn: 73295
* More formatting.Sanjiv Gupta2009-06-111-3/+13
| | | | llvm-svn: 73185
* Fixed source comments. No functionality change.Sanjiv Gupta2009-06-111-5/+15
| | | | llvm-svn: 73184
* PIC16 emits auto variables as globals. When optimizer removes a function ↵Sanjiv Gupta2009-06-091-0/+34
| | | | | | entierly by estimating its side effects on globals, those globals(autos) without a function were not being printed by the Asm printer. llvm-svn: 73135
* Emit file directives correctly in case of a .bc is generated by llvm-ld ↵Sanjiv Gupta2009-06-031-8/+4
| | | | | | after linking in several .bc files. llvm-svn: 72781
* Emit debug info for locals with proper scope.Sanjiv Gupta2009-05-281-64/+35
| | | | llvm-svn: 72531
* Emit debug information for globals (which include automatic variables as ↵Sanjiv Gupta2009-05-221-0/+47
| | | | | | well because on PIC16 they are emitted as globals by the frontend). llvm-svn: 72262
* Run through the list of globals once and sectionize all types of globlas ↵Sanjiv Gupta2009-05-131-34/+41
| | | | | | includeing declarations. Later emit them from their section lists. llvm-svn: 71661
* Iterate over globals once and sectionize them into appropriate sections.Sanjiv Gupta2009-05-121-73/+53
| | | | | | | Later in asmprinter, go over thsese sections and print them. Do not print empty sections. llvm-svn: 71560
* We do not need to create a label for external defs and decls,Sanjiv Gupta2009-05-121-3/+4
| | | | | | just emit a comment for readability. llvm-svn: 71544
* Fix more naming issues.Sanjiv Gupta2009-05-111-4/+4
| | | | | | | compiler libcalls start with .lib. now. fixed section names. llvm-svn: 71424
* Detect calls to compiler intrinsics and emit an extern declarations Sanjiv Gupta2009-05-111-5/+30
| | | | | | | | | | | only for those. These extern declarations to intrinsics are currently being emitted at the bottom of generated .s file, which works fine with gpasm(not sure about MPSAM though). PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any extern declarations (even if no intrinsics are being used), but that needs to be fixed in the linker itself. llvm-svn: 71423
* Module iterator contains list of filescope functions as well, we don't need ↵Sanjiv Gupta2009-05-101-2/+2
| | | | | | to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming. llvm-svn: 71394
* Changed lowering and asmprinter to use ABI Names class called PAN.Sanjiv Gupta2009-05-101-69/+58
| | | | llvm-svn: 71386
OpenPOWER on IntegriCloud