summaryrefslogtreecommitdiff
path: root/lib/Target/XCore
Commit message (Collapse)AuthorAge
* Forgot to update some CMakeLists.Benjamin Kramer2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79780 91177308-0d34-0410-b5e6-96231b3b80d8
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79777 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79763 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate AsmPrinter::SwitchToSection and just have clientsChris Lattner2009-08-19
| | | | | | | talk to the MCStreamer directly instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for mergeable sections back into the XCore backend.Richard Osborne2009-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79368 91177308-0d34-0410-b5e6-96231b3b80d8
* Put data with relocations in the same sections as data without relocations.Richard Osborne2009-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79351 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r79127. It was fixed by d0k.Bill Wendling2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79136 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r79127. It was causing compilation errors.Bill Wendling2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79135 91177308-0d34-0410-b5e6-96231b3b80d8
* Change allowsUnalignedMemoryAccesses to take type argument since some targetsEvan Cheng2009-08-15
| | | | | | | | | | | support unaligned mem access only for certain types. (Should it be size instead?) ARM v7 supports unaligned access for i16 and i32, some v6 variants support it as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79127 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79101 91177308-0d34-0410-b5e6-96231b3b80d8
* Move XCore AsmPrinter to XCore/AsmPrinter directory.Richard Osborne2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79094 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake likes its explicit list of files to build.Chris Lattner2009-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79080 91177308-0d34-0410-b5e6-96231b3b80d8
* use XCore-specific section with xcore specific cp/dp flags to restore Chris Lattner2009-08-15
| | | | | | | | | support for globals going into the appropriate sections with the flags. This hopefully finishes unbreaking the previous behavior that I broke before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79079 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for target-specific ELF section flags, add a new MCSectionXCoreChris Lattner2009-08-15
| | | | | | | | class which represents the XCore cp/dp section flags. No functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79077 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes2009-08-13
| | | | | | | | syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78890 91177308-0d34-0410-b5e6-96231b3b80d8
* This void is implicit in C++.Dan Gohman2009-08-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
* Change TargetAsmInfo to be constructed via TargetRegistry from a Target+TripleChris Lattner2009-08-12
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78802 91177308-0d34-0410-b5e6-96231b3b80d8
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-12
| | | | | | infrastructure work needed to get the contexts to where they need to be first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-11
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* pass the TargetTriple down from each target ctor to theChris Lattner2009-08-11
| | | | | | | LLVMTargetMachine ctor. It is currently unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78711 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-10
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* now that getOrCreateSection is all object-file specific,Chris Lattner2009-08-08
| | | | | | | | give the impls an object-file-specific name. In the future they can take different arguments etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78495 91177308-0d34-0410-b5e6-96231b3b80d8
* make printInstruction return void since its result is omitted. Make the Chris Lattner2009-08-08
| | | | | | | error condition get trapped with an assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78449 91177308-0d34-0410-b5e6-96231b3b80d8
* don't check the result of printInstruction anymore.Chris Lattner2009-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78444 91177308-0d34-0410-b5e6-96231b3b80d8
* Major calling convention code refactoring.Dan Gohman2009-08-05
| | | | | | | | | | | | | | | | | | | | Instead of awkwardly encoding calling-convention information with ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering provides three virtual functions for targets to override: LowerFormalArguments, LowerCall, and LowerRet, which replace the custom lowering done on the special nodes. They provide the same information, but in a more immediately usable format. This also reworks much of the target-independent tail call logic. The decision of whether or not to perform a tail call is now cleanly split between target-independent portions, and the target dependent portion in IsEligibleForTailCallOptimization. This also synchronizes all in-tree targets, to help enable future refactoring and feature work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78142 91177308-0d34-0410-b5e6-96231b3b80d8
* Move most targets TargetMachine constructor to only taking a target triple.Daniel Dunbar2009-08-02
| | | | | | | - The C, C++, MSIL, and Mips backends still need the module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77927 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra SEXT pattern.Richard Osborne2009-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77920 91177308-0d34-0410-b5e6-96231b3b80d8
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-02
| | | | | | | | | | | Module*. Also, dropped uses of TargetMachine where unnecessary. The only target which still takes a TargetMachine& is Mips, I would appreciate it if someone would normalize this to match other targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77918 91177308-0d34-0410-b5e6-96231b3b80d8
* move dwarf debug info section selection stuff from TAI toChris Lattner2009-08-02
| | | | | | | TLOF, unifying all the dwarf targets at the same time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77889 91177308-0d34-0410-b5e6-96231b3b80d8
* xcore TAI doesn't need TM.Chris Lattner2009-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77868 91177308-0d34-0410-b5e6-96231b3b80d8
* remove TargetAsmInfo::TM, which is now dead. The basic TAI class now Chris Lattner2009-08-02
| | | | | | | no longer depends on TM! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77863 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SectionKind::get() private.Chris Lattner2009-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77835 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner2009-08-01
| | | | | | | | | | | | | | compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77833 91177308-0d34-0410-b5e6-96231b3b80d8
* REmove dead fields of TAI.Chris Lattner2009-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77820 91177308-0d34-0410-b5e6-96231b3b80d8
* update for renameChris Lattner2009-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77817 91177308-0d34-0410-b5e6-96231b3b80d8
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-01
| | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77803 91177308-0d34-0410-b5e6-96231b3b80d8
* Add newline at end of file to remove gcc warning.Nick Lewycky2009-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77791 91177308-0d34-0410-b5e6-96231b3b80d8
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-31
| | | | | | | | MCSection subclasses yet, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-29
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77432 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-28
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77294 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-27
| | | | | | | | | getOrCreateSection instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77186 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-27
| | | | | | | instead and drive things based off of that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77184 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor commonality in triple match routines into helper template for registeringDaniel Dunbar2009-07-26
| | | | | | | classes, and migrate existing targets over. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77126 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill Target specific ModuleMatchQuality stuff.Daniel Dunbar2009-07-26
| | | | | | | - This was overkill and inconsistently implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77114 91177308-0d34-0410-b5e6-96231b3b80d8
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77085 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify JIT target selection.Daniel Dunbar2009-07-25
| | | | | | | | | | | - Instead of requiring targets to define a JIT quality match function, we just have them specify if they support a JIT. - Target selection for the JIT just gets the host triple and looks for the best target which matches the triple and has a JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77060 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new helpers for registering targets.Daniel Dunbar2009-07-25
| | | | | | | - Less boilerplate == good. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77052 91177308-0d34-0410-b5e6-96231b3b80d8