summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up redundant copies of Triple objects. NFCDaniel Sanders2015-06-162-2/+2
| | | | | | | | | | | | | | Summary: Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10382 llvm-svn: 239823
* [mips][ias] Expand on r238751 to cover as many relocs as possible.Daniel Sanders2015-06-161-22/+36
| | | | | | | | | | | | | | | | | | | | | | | Summary: Relocs that can be converted from absolute to PC-relative now do so if IsPCRel is true. Relocs that require PC-relative now call llvm_unreachable() if IsPCRel is false and similarly those that require absolute assert that IsPCRel is false. Note that while it looks like some relocs (e.g. R_MIPS_26) can be converted into the MIPS32r6/MIPS64r6 relocs (R_MIPS_PC*_S2), it isn't actually valid to do so. Placeholders have been left in the testcase for unsupported relocs and relocs that cannot be generated at the moment. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits, rafael Differential Revision: http://reviews.llvm.org/D10184 llvm-svn: 239817
* Replace string GNU Triples with llvm::Triple in MCSubtargetInfo and ↵Daniel Sanders2015-06-102-7/+5
| | | | | | | | | | | | | | | | | | create*MCSubtargetInfo(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rafael Reviewed By: rafael Subscribers: rafael, ted, jfb, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10311 llvm-svn: 239467
* Replace string GNU Triples with llvm::Triple in MCAsmBackend subclasses and ↵Daniel Sanders2015-06-102-24/+20
| | | | | | | | | | | | | | | | | | create*AsmBackend(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: echristo, rafael Reviewed By: rafael Subscribers: rafael, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10243 llvm-svn: 239464
* MC: Add target hook to control symbol quotingMatt Arsenault2015-06-092-3/+3
| | | | llvm-svn: 239370
* Replace string GNU Triples with llvm::Triple in MCAsmInfo subclasses and ↵Daniel Sanders2015-06-043-5/+5
| | | | | | | | | | | | | | | | | | | | create*AsmInfo(). NFC. Summary: This is the first of several patches to eliminate StringRef forms of GNU triples from the internals of LLVM. After this is complete, GNU triples will be replaced by a more authoratitive representation in the form of an LLVM TargetTuple. Reviewers: rengolin Reviewed By: rengolin Subscribers: ted, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10236 llvm-svn: 239036
* Bring back r239006 with a fix.Rafael Espindola2015-06-043-14/+5
| | | | | | | | | | | | | | | | | | | The fix is just that getOther had not been updated for packing the st_other values in fewer bits and could return spurious values: - unsigned Other = (getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift; + unsigned Other = (getFlags() & (0x7 << ELF_STO_Shift)) >> ELF_STO_Shift; Original message: Pack the MCSymbolELF bit fields into MCSymbol's Flags. This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64. While at it, also make getOther/setOther easier to use by accepting unshifted STO_* values. llvm-svn: 239012
* Revert "Pack the MCSymbolELF bit fields into MCSymbol's Flags."Rafael Espindola2015-06-043-5/+14
| | | | | | | | This reverts commit r239006. I am debugging the powerpc failures. llvm-svn: 239010
* Pack the MCSymbolELF bit fields into MCSymbol's Flags.Rafael Espindola2015-06-043-14/+5
| | | | | | | | | This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64. While at it, also make getOther/setOther easier to use by accepting unshifted STO_* values. llvm-svn: 239006
* Remove getOrCreateSymbolData. There is no MCSymbolData anymore.Rafael Espindola2015-06-032-2/+2
| | | | llvm-svn: 238952
* Merge MCELF.h into MCSymbolELF.h.Rafael Espindola2015-06-023-17/+18
| | | | | | | Now that we have a dedicated type for ELF symbol, these helper functions can become member function of MCSymbolELF. llvm-svn: 238864
* [mips] Add support for dynamic stack realignment.Vasileios Kalintiris2015-06-022-0/+5
| | | | | | | | | | | | | | | | | | | | Summary: With this change we are able to realign the stack dynamically, whenever it contains objects with alignment requirements that are larger than the alignment specified from the given ABI. We have to use the $fp register as the frame pointer when we perform dynamic stack realignment. In complex stack frames, with variably-sized objects, we reserve additionally the callee-saved register $s7 as the base pointer in order to reference locals. Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8633 llvm-svn: 238829
* [mips] [IAS] Add support for the .set softfloat/hardfloat directives.Toma Tabacu2015-06-021-0/+16
| | | | | | | | | | | | | | Summary: These directives are used to set the current value of the SoftFloat feature. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits, mpf Differential Revision: http://reviews.llvm.org/D9074 llvm-svn: 238813
* Fix relocation selection for foo-. on mips.Rafael Espindola2015-06-011-1/+1
| | | | | | This handles only the 32 bit case. llvm-svn: 238751
* Simplify code, NFC.Rafael Espindola2015-06-011-107/+60
| | | | llvm-svn: 238750
* MC: Clean up MCExpr naming. NFC.Jim Grosbach2015-05-304-15/+15
| | | | llvm-svn: 238634
* Rename getOrCreateSymbolData to registerSymbol and return void.Rafael Espindola2015-05-291-1/+1
| | | | | | Another step in merging MCSymbol and MCSymbolData. llvm-svn: 238607
* Pass MCSymbols to the helper functions in MCELF.h.Rafael Espindola2015-05-293-13/+9
| | | | llvm-svn: 238596
* Pass a MCSymbol to needsRelocateWithSymbol.Rafael Espindola2015-05-291-5/+4
| | | | llvm-svn: 238589
* [mips] Remove 2 unused variables in MipsTargetStreamer.cpp. NFC.Toma Tabacu2015-05-291-2/+0
| | | | llvm-svn: 238554
* Remove a trivial forwarding function. NFC.Rafael Espindola2015-05-281-1/+1
| | | | llvm-svn: 238506
* Replace getOrCreateSectionData with registerSection.Rafael Espindola2015-05-262-7/+7
| | | | | | There is now no SectionData to be created. llvm-svn: 238208
* Use std::bitset for SubtargetFeatures.Michael Kuperstein2015-05-262-21/+21
| | | | | | | | | | | | Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first several times this was committed (e.g. r229831, r233055), it caused several buildbot failures. Apparently the reason for most failures was both clang and gcc's inability to deal with large numbers (> 10K) of bitset constructor calls in tablegen-generated initializers of instruction info tables. This should now be fixed. llvm-svn: 238192
* Stop forwarding (get|set)Aligment from MCSectionData to MCSection.Rafael Espindola2015-05-212-16/+17
| | | | llvm-svn: 237956
* Move alignment from MCSectionData to MCSection.Rafael Espindola2015-05-215-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | This starts merging MCSection and MCSectionData. There are a few issues with the current split between MCSection and MCSectionData. * It optimizes the the not as important case. We want the production of .o files to be really fast, but the split puts the information used for .o emission in a separate data structure. * The ELF/COFF/MachO hierarchy is not represented in MCSectionData, leading to some ad-hoc ways to represent the various flags. * It makes it harder to remember where each item is. The attached patch starts merging the two by moving the alignment from MCSectionData to MCSection. Most of the patch is actually just dropping 'const', since MCSectionData is mutable, but MCSection was not. llvm-svn: 237936
* Revert r237789 - [mips] The naming convention for private labels is ABI ↵Daniel Sanders2015-05-204-22/+2
| | | | | | | | | dependant. It works, but I've noticed that I missed several callers of createMCAsmInfo() and many don't have a TargetMachine to provide. llvm-svn: 237792
* [mips] The naming convention for private labels is ABI dependant.Daniel Sanders2015-05-204-2/+22
| | | | | | | | | | | | | | | | | Summary: For N32/N64, private labels begin with '.L' but for O32 they begin with '$'. MCAsmInfo now has an initializer function which can be used to provide information from the TargetMachine to control the assembly syntax. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: jfb, sandeep, llvm-commits, rafael Differential Revision: http://reviews.llvm.org/D9821 llvm-svn: 237789
* MC: Clean up method names in MCContext.Jim Grosbach2015-05-182-9/+9
| | | | | | | The naming was a mish-mash of old and new style. Update to be consistent with the new. NFC. llvm-svn: 237594
* Remove MCAssembler.h include from MCStreamer.h and fix users of MCStreamer.hPete Cooper2015-05-151-0/+1
| | | | llvm-svn: 237483
* Remove 3 includes from MCInstrDesc.h and explicitly include them where neededPete Cooper2015-05-151-0/+1
| | | | llvm-svn: 237481
* MC: MCCodeGenInfo naming update. NFC.Jim Grosbach2015-05-151-1/+1
| | | | | | s/InitMCCodeGenInfo/initMCCodeGenInfo/ llvm-svn: 237471
* MC: Update MCCodeEmitter naming. NFC.Jim Grosbach2015-05-152-4/+4
| | | | | | s/EncodeInstruction/encodeInstruction/ llvm-svn: 237469
* MC: Update MCFixup naming. NFC.Jim Grosbach2015-05-151-12/+12
| | | | | | s/MCFixup::Create/MCFixup::create/ llvm-svn: 237468
* MC: Modernize MCOperand API naming. NFC.Jim Grosbach2015-05-132-25/+25
| | | | | | MCOperand::Create*() methods renamed to MCOperand::create*(). llvm-svn: 237275
* Reverting r237234, "Use std::bitset for SubtargetFeatures"Michael Kuperstein2015-05-132-21/+21
| | | | | | | The buildbots are still not satisfied. MIPS and ARM are failing (even though at least MIPS was expected to pass). llvm-svn: 237245
* Use std::bitset for SubtargetFeaturesMichael Kuperstein2015-05-132-21/+21
| | | | | | | | | | | Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. The first two times this was committed (r229831, r233055), it caused several buildbot failures. At least some of the ARM and MIPS ones were due to gcc/binutils issues, and should now be fixed. llvm-svn: 237234
* Rename the MIPS routine abiUsesSoftFloat -> useSoftFloat to matchEric Christopher2015-05-071-2/+2
| | | | | | some incoming changes and the general scheme used by features (use/has). llvm-svn: 236794
* [MIPS] Move MIPS ABI flags structure constants to the separate headerSimon Atanasyan2015-05-072-84/+26
| | | | | | | | | | | http://reviews.llvm.org/D9517 The separate header file allows to reuse the MIPS ABI flags structure constants in other LLVM tools like the llvm-readobj. No functional changes. llvm-svn: 236732
* [mips] Add the SoftFloat MipsSubtarget feature.Toma Tabacu2015-05-072-3/+8
| | | | | | | | | | | | | | Summary: This will enable the IAS to reject floating point instructions if soft-float is enabled. Reviewers: dsanders, echristo Reviewed By: dsanders Subscribers: jfb, llvm-commits, mpf Differential Revision: http://reviews.llvm.org/D9053 llvm-svn: 236713
* [mips][microMIPSr6] Implement mips32 to microMIPSr6 mapping supportZoran Jovanovic2015-04-221-3/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D8661 llvm-svn: 235505
* [mips][microMIPSr6] Implement initial mapping supportJozef Kolek2015-04-201-2/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D8387 llvm-svn: 235298
* [mips][microMIPSr6] Implement initial subtarget supportJozef Kolek2015-04-202-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D8386 llvm-svn: 235296
* [mc] Clean up emission of byte sequencesBenjamin Kramer2015-04-171-6/+1
| | | | | | No functional change intended. llvm-svn: 235178
* [mips] Move ABI-dependent register selections to MipsABIInfo. NFC.Daniel Sanders2015-04-172-0/+42
| | | | | | | | | | | | | | | | | | | | | Summary: For example, a common idiom was 'isN64 ? Mips::SP_64 : Mips::SP'. This has been moved to MipsABIInfo and replaced with 'ABI.GetStackPtr()'. There are others that should also be moved. This patch sticks to the ones that are obviously non-functional. The others have minor mistakes that need fixing at the same time, mostly involving checks for 64-bit GPR's instead of checks for 64-bit pointers. Reviewers: tomatabacu Reviewed By: tomatabacu Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8972 llvm-svn: 235173
* [mips] [IAS] Preserve microMIPS label marking for objects when assigning.Toma Tabacu2015-04-161-3/+2
| | | | | | | | | | | | | | Summary: Previously, this was only happening for functions, but because of .insn, objects can also be marked now. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8007 llvm-svn: 235095
* [mips] [IAS] Add support for the .insn directive.Toma Tabacu2015-04-163-2/+23
| | | | | | | | | | | | | | | | | Summary: This assembler directive marks the current label as an instruction label in microMIPS and MIPS16. This initial implementation works only for microMIPS. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8006 llvm-svn: 235084
* Use raw_pwrite_stream in the object writer/streamer.Rafael Espindola2015-04-149-15/+18
| | | | | | The ELF object writer will take advantage of that in the next commit. llvm-svn: 234950
* Re-enable target-specific relocation table sorting and use it for MipsPetar Jovanovic2015-04-141-0/+180
| | | | | | | | | | | | | | Some targets (ie. Mips) have additional rules for ordering the relocation table entries. Allow them to override generic sortRelocs(), which sorts entries by Offset. Then override this function for Mips, to emit HI16 and GOT16 relocations against the local symbol in pair with the corresponding LO16 relocation. Patch by Vladimir Stefanovic. Differential Revision: http://reviews.llvm.org/D7414 llvm-svn: 234883
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-113-3/+3
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* Replace the MCSubtargetInfo parameter with a Triple when creatingEric Christopher2015-03-311-3/+3
| | | | | | | an MCInstPrinter. Update all callers and use where we wanted a Triple previously. llvm-svn: 233648
OpenPOWER on IntegriCloud