summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-58/+0
| | | | llvm-svn: 79763
* Change TargetAsmInfo to be constructed via TargetRegistry from a Target+TripleChris Lattner2009-08-121-2/+1
| | | | | | | | 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
* 1. Make MCSection an abstract class.Chris Lattner2009-08-081-1/+0
| | | | | | | | | 2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
* PIC16 TAI doesn't need TMChris Lattner2009-08-021-5/+5
| | | | llvm-svn: 77867
* remove TargetAsmInfo::TM, which is now dead. The basic TAI class now Chris Lattner2009-08-021-2/+1
| | | | | | no longer depends on TM! llvm-svn: 77863
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-386/+10
| | | | | | | | | | | | | | | | | | | | 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 getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-271-23/+31
| | | | | | | | getOrCreateSection instead. llvm-svn: 77186
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-13/+25
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* reduce indentationChris Lattner2009-07-261-3/+3
| | | | llvm-svn: 77161
* Fix the breakage caused by 76950. Sanjiv Gupta2009-07-261-0/+3
| | | | | | PIC16 has special naming conventions for variables having section names specified via section attribute. llvm-svn: 77153
* make SectionKind be a first-class pod struct instead of justChris Lattner2009-07-251-2/+2
| | | | | | an enum. llvm-svn: 77096
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-2/+2
| | | | | | | | | | | | | | 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
* we already know the sectionkind when invoking SelectSectionForGlobal,Chris Lattner2009-07-241-4/+5
| | | | | | pass it in instead of recomputing it. llvm-svn: 76990
* make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" ↵Chris Lattner2009-07-241-12/+11
| | | | | | hack. llvm-svn: 76989
* start refactoring pic16 section selection logic.Chris Lattner2009-07-241-14/+11
| | | | llvm-svn: 76977
* Switch to getNameStr().Daniel Dunbar2009-07-241-3/+3
| | | | llvm-svn: 76962
* simplify code by making special case more obviousChris Lattner2009-07-241-9/+5
| | | | llvm-svn: 76950
* more random whitespace cleanup, eliminate #define, avoid copyingChris Lattner2009-07-211-44/+31
| | | | | | vectors needlessly, doxygenify comments, improve constness, etc. llvm-svn: 76585
* clean up some formatting, indent by 2 instead of 4.Chris Lattner2009-07-201-19/+9
| | | | llvm-svn: 76490
* rename TargetAsmInfo::getASDirective -> getDataASDirectiveChris Lattner2009-07-201-15/+11
| | | | llvm-svn: 76431
* Avoid compiler warnings when assertions are turned off.Duncan Sands2009-07-101-4/+4
| | | | llvm-svn: 75269
* pic16 doesn't have a Data64bitsDirective. Set it NULL explicitly to tell the ↵Sanjiv Gupta2009-07-061-0/+1
| | | | | | generic code to not pick the default. llvm-svn: 74839
* Implement _CONFIG macro to allow users to se to configuration settings on ↵Sanjiv Gupta2009-07-061-6/+189
| | | | | | | | | | | 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
* Emit debug info for locals with proper scope.Sanjiv Gupta2009-05-281-0/+3
| | | | llvm-svn: 72531
* Run through the list of globals once and sectionize all types of globlas ↵Sanjiv Gupta2009-05-131-1/+19
| | | | | | 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-4/+49
| | | | | | | Later in asmprinter, go over thsese sections and print them. Do not print empty sections. llvm-svn: 71560
* Changed lowering and asmprinter to use ABI Names class called PAN.Sanjiv Gupta2009-05-101-35/+19
| | | | llvm-svn: 71386
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-2/+2
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Moved pic16 naming functions to correct place.Sanjiv Gupta2009-05-081-53/+1
| | | | | | No functionality change. llvm-svn: 71207
* Eliminate compiler warnings.Evan Cheng2009-05-071-2/+2
| | | | llvm-svn: 71149
* Emit banksel and movlp instructions.Sanjiv Gupta2009-05-061-0/+203
| | | | | | | Split large global data (both initialized and un-initialized) into multiple sections of <= 80 bytes. Provide routines to manage PIC16 ABI naming conventions. llvm-svn: 71073
* Emit .line debug directives for stoppoints. The debug location is retrieved ↵Sanjiv Gupta2009-04-081-0/+3
| | | | | | by the MachineInstr itself, rather than by custom handling the DBG_STOPPOINT nodes. llvm-svn: 68602
* Made the common case of default address space directive as non-virtual for ↵Sanjiv Gupta2009-02-021-22/+19
| | | | | | performance reasons. Provide a single virtual interface for directives of all sizes in non-default address spaces. llvm-svn: 63521
* Enable emitting of constant values in non-default address space as well. The ↵Sanjiv Gupta2009-01-301-2/+30
| | | | | | APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces. llvm-svn: 63377
* Checking in conditionals, function call, arrays and libcalls implementation.Sanjiv Gupta2009-01-131-4/+8
| | | | llvm-svn: 62174
* Added a more function PIC16 backend. However to get this working a patch inSanjiv Gupta2008-11-191-5/+9
| | | | | | ExpandIntegerOperand (LegalizeIntegerTypes.cpp) is needed which is yet to be reworked and submitted. llvm-svn: 59617
* Refactor various TargetAsmInfo subclasses' TargetMachine members awayDan Gohman2008-11-031-2/+3
| | | | | | adding a TargetMachine member to the base TargetAsmInfo class instead. llvm-svn: 58624
* Adding files for Microchip's PIC16 target.Sanjiv Gupta2008-05-131-0/+26
A brief description about PIC16: =============================== PIC16 is an 8-bit microcontroller with only one 8-bit register which is the accumulator. All arithmetic/load/store operations are 8-bit only. The architecture has two address spaces: program and data. The program memory is divided into 2K pages and the data memory is divided into banks of 128 byte, with only 80 usable bytes, resulting in an non-contiguous data memory. It supports direct data memory access (by specifying the address as part of the instruction) and indirect data and program memory access (in an unorthodox fashion which utilize a 16 bit pointer register). Two classes of registers exist: (8-bit class which is only one accumulator) (16-bit class, which contains one or more 16 bit pointer(s)) llvm-svn: 51027
OpenPOWER on IntegriCloud