summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Update namespace.Matheus Almeida2014-03-211-5/+1
| | | | | | | We should be using the llvm namespace and not an anonymous namespace in a header file. llvm-svn: 204450
* Mark alias symbols as microMIPS if necessary. Differential Revision: ↵Zoran Jovanovic2014-03-201-0/+20
| | | | | | http://llvm-reviews.chandlerc.com/D3080 llvm-svn: 204323
* [mips] Splitting up class definition from implementation.Matheus Almeida2014-03-202-129/+171
| | | | | | | | Also removed some unnecessary #includes. No functional changes. llvm-svn: 204320
* [mips] 80-column.Matheus Almeida2014-03-191-8/+12
| | | | llvm-svn: 204252
* Try harder to evaluate expressions when printing assembly.Rafael Espindola2014-03-121-3/+1
| | | | | | | | | When printing assembly we don't have a Layout object, but we can still try to fold some constants. Testcase by Ulrich Weigand. llvm-svn: 203677
* [mips] Implement NaCl sandboxing of function calls:Sasa Stankovic2014-03-111-2/+56
| | | | | | | | | * Add masking instructions before indirect calls (in MC layer). * Align call + branch delay to the bundle end (in MC layer). Differential Revision: http://llvm-reviews.chandlerc.com/D3032 llvm-svn: 203606
* [mips] Implement NaCl sandboxing of loads, stores and SP changes:Sasa Stankovic2014-03-102-5/+110
| | | | | | | | | | * Add masking instructions before loads and stores (in MC layer). * Add masking instructions after SP changes (in MC layer). * Forbid loads, stores and SP changes in delay slots (in MI layer). Differential Revision: http://llvm-reviews.chandlerc.com/D2904 llvm-svn: 203484
* This patch implements .set dsp directive and sets appropriate feature ↵Vladimir Medic2014-03-051-0/+7
| | | | | | bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file. llvm-svn: 202966
* [cleanup] Re-sort all the includes with utils/sort_includes.py.Chandler Carruth2014-03-043-4/+4
| | | | llvm-svn: 202811
* This patch implements .set mips32r2 directive and sets appropriate feature ↵Vladimir Medic2014-03-041-0/+8
| | | | | | bits. It also introduces helper functions that are used to set and clear feature bits as necessary. This directive is a counterpart of -mips32r2 command line options with the exception that it does not influence elf header flags. The usage example is gives in test file. llvm-svn: 202807
* [mips] support FK_Data_2 and FK_Data_8 to fix big-endian debug dataEd Maste2014-03-031-0/+4
| | | | | | | | | This fixes invalid lengths in .debug_aranges on big-endian mips64 (lengths appear to be left-shifted by 32 bits) and in .debug_loc. Differential Revision: http://llvm-reviews.chandlerc.com/D2517 llvm-svn: 202716
* Reorder Mips/MCTargetDesc/CMakeLists.txt.NAKAMURA Takumi2014-02-281-1/+1
| | | | llvm-svn: 202483
* [mips] Add MipsNaClELFStreamer.cpp to CMakeLists.txt.Sasa Stankovic2014-02-281-0/+1
| | | | llvm-svn: 202482
* [mips] Implement NaCl sandboxing of indirect jumps:Sasa Stankovic2014-02-283-3/+133
| | | | | | | | | * Align targets of indirect jumps to instruction bundle boundaries (in MI layer). * Add masking instructions before indirect jumps (in MC layer). Differential Revision: http://llvm-reviews.chandlerc.com/D2847 llvm-svn: 202479
* [mips] Treat -mcpu=generic the same way as an empty CPU string.Daniel Sanders2014-02-261-1/+1
| | | | | | | | | | | | | | | | | Summary: This should fix the MCJIT unit tests that were broken by r201792 on the MIPS buildbot. MIPS currently uses the default implementation of sys::getHostCPUName() which always returns "generic". For now, we will accept "generic" and coerce it to "mips32" or "mips64" depending on the target architecture like we do for empty CPU names. Reviewers: jacksprat, matheusalmeida Reviewed By: jacksprat Differential Revision: http://llvm-reviews.chandlerc.com/D2878 llvm-svn: 202253
* [mips] Make mips64 the default CPU for the mips64 architectureDaniel Sanders2014-02-201-9/+15
| | | | | | | | | | | | | | | | | | | | Summary: This is consistent with the integrated assembler. All mips64 codegen tests previously passed -mcpu. Removed -mcpu from blez_bgez.ll and const-mult.ll to cover the default case. Ideally, the two implementations of selectMipsCPU() will be merged but it's proven difficult to find a home for the function that doesn't cause link errors. For now, we'll hoist the common functionality into a function and mark it with FIXME's. Reviewers: jacksprat, matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D2830 llvm-svn: 201782
* [mips] In the integrated assembler, select the default feature bits by ↵Daniel Sanders2014-02-191-27/+8
| | | | | | | | | | changing the CPU value. This is consistent with the way CodeGen acheives this. However, CodeGen always selects mips32 (even when the architecture is mips64). llvm-svn: 201694
* [mips] Use llvm::Triple in ParseMipsTriple() instead of manually parsing itDaniel Sanders2014-02-191-14/+4
| | | | | | No functional change. llvm-svn: 201689
* Remove support for not using .loc directives.Rafael Espindola2014-02-051-5/+5
| | | | | | Clang itself was not using this. The only way to access it was via llc. llvm-svn: 200862
* [mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressionsPetar Jovanovic2014-02-044-0/+164
| | | | | | | | | | | Patch implements %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions for MIPS by creating target expression class MipsMCExpr. Patch by Sasa Stankovic. Differential Revision: http://llvm-reviews.chandlerc.com/D2592 llvm-svn: 200783
* Remove another hasRawTextSupport.Rafael Espindola2014-01-314-113/+43
| | | | | | | | | To remove this one simply move the end of file logic from the asm printer to the target mc streamer. This removes the last call to hasRawTextSupport from lib/Target. llvm-svn: 200590
* Delete MCSubtargetInfo data members from target MCCodeEmitter classesDavid Woodhouse2014-01-281-28/+28
| | | | | | | | The subtarget info is explicitly passed to the EncodeInstruction method and we should use that subtarget info to influence any encoding decisions. llvm-svn: 200350
* Propagate MCSubtargetInfo through TableGen's getBinaryCodeForInstr()David Woodhouse2014-01-281-40/+65
| | | | llvm-svn: 200349
* Explictly pass MCSubtargetInfo to MCCodeEmitter::EncodeInstruction()David Woodhouse2014-01-281-2/+4
| | | | llvm-svn: 200348
* [mips] Fix ELF header flags.Matheus Almeida2014-01-281-1/+8
| | | | | | | As opposed to GCC/GAS the default ABI for Mips64 is n64. Compatibility bit should be set if o32 ABI is used when targeting Mips64. llvm-svn: 200332
* Print .mask and .fmask with the target streamer.Rafael Espindola2014-01-271-1/+32
| | | | | | | Testing this also found the missing '\n' after .frame that this patch also fixes. llvm-svn: 200192
* Print .frame via the target streamer.Rafael Espindola2014-01-271-0/+14
| | | | llvm-svn: 200186
* Implement the missing bits corresponding to .mips_hack_elf_flags.Rafael Espindola2014-01-262-22/+45
| | | | | | | | | | | | These were: * noreorder handling on the target object streamer and asm parser. * setting the initial flag bits based on the enabled features. * setting the elf header flag for micromips It is *really* depressing I am the one doing this instead of someone at mips actually taking the time to understand the infrastructure. llvm-svn: 200138
* Pass a MCSubtargetInfo down to the TargetStreamer creation.Rafael Espindola2014-01-261-0/+1
| | | | | | | With this the target streamers will be able to know the target features that are in use. llvm-svn: 200135
* Construct the MCStreamer before constructing the MCTargetStreamer.Rafael Espindola2014-01-262-11/+17
| | | | | | | | | | This has a few advantages: * Only targets that use a MCTargetStreamer have to worry about it. * There is never a MCTargetStreamer without a MCStreamer, so we can use a reference. * A MCTargetStreamer can talk to the MCStreamer in its constructor. llvm-svn: 200129
* Convert some easy uses of EmitRawText to TargetStreamer methods.Rafael Espindola2014-01-261-0/+56
| | | | llvm-svn: 200122
* This reverts commit r200064 and r200051.Rafael Espindola2014-01-251-2/+12
| | | | | | | | | | | | | | | | | | | r200064 depends on r200051. r200051 is broken: I tries to replace .mips_hack_elf_flags, which is a good thing, but what it replaces it with is even worse. The new emitMipsELFFlags it adds corresponds to no assembly directive, is not marked as a hack and is not even printed to the .s file. The patch also introduces more uses of hasRawTextSupport. The correct way to remove .mips_hack_elf_flags is to have the mips target streamer handle the default flags (and command line options). That way the same code path is used for asm and obj. The streamer interface should *really* correspond to what is printed in the .s file. llvm-svn: 200078
* [Mips] TargetStreamer ELF flag Support for default and commandline options.Jack Carter2014-01-251-12/+2
| | | | | | | | | | | | | | | This patch uses a common MipsTargetSteamer interface for both MipsAsmPrinter and MipsAsmParser for recording default and commandline driven directives that affect ELF header flags. It has been noted that the .ll tests affected by this patch belong in test/Codegen/Mips. I will move them in a separate patch. Also, a number of directives do not get expressed by AsmPrinter in the resultant .s assembly such as setting the correct ASI. I have noted this in the tests and they will be addressed in later patches. llvm-svn: 200051
* Unify duplicated functions.Rafael Espindola2014-01-241-17/+4
| | | | llvm-svn: 200014
* [Mips] TargetStreamer Support for .set mips16.Jack Carter2014-01-221-0/+16
| | | | | | | | | | This patch updates .set mips16 support which affects the ELF ABI and its flags. In addition the patch uses a common interface for both the MipsTargetSteamer and MipsObjectStreamer that the assembler uses for both ELF and ASCII output for these directives. llvm-svn: 199851
* Fix uninitialized variable.Rafael Espindola2014-01-151-1/+1
| | | | llvm-svn: 199288
* Only mark functions as micromips.Rafael Espindola2014-01-151-2/+7
| | | | | | | | | The GNU as behavior is a bit different and very strange. It will mark any label that contains an instruction. We can implement that, but using the type looks more natural since gas will not mark a function if a .word is used to output the instructions! llvm-svn: 199287
* Fix a low hanging use of hasRawTextSupport.Rafael Espindola2014-01-141-0/+24
| | | | | | | This also fixes the placement of the function label comment. It was being placed next to the mips16 directive instead of next to the label. llvm-svn: 199245
* Replace .mips_hack_stocg with ".set micromips" and ".set nomicromips".Rafael Espindola2014-01-141-15/+23
| | | | | | | This matches what gnu as does and implementing this is easier than arguing about it. llvm-svn: 199181
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-072-2/+2
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* [Mips] TargetStreamer Support for .abicalls and .set pic0.Jack Carter2014-01-062-3/+22
| | | | | | | | | | This patch adds .abicalls and .set pic0 support which affects the ELF ABI and its flags. In addition the patch uses a common interface for both the MipsTargetSteamer and MipsObjectStreamer that both the integrated and standalone assemblers will use for the output for these directives. llvm-svn: 198646
* Fix misaligned indentation in "if" block in MipsMCCodeEmitter.cppMark Seaborn2013-12-311-92/+92
| | | | llvm-svn: 198262
* Fix indentation alignment of a declaration in MipsMCCodeEmitter.cppMark Seaborn2013-12-291-2/+2
| | | | llvm-svn: 198162
* Support for microMIPS TLS relocations.Zoran Jovanovic2013-12-194-2/+18
| | | | llvm-svn: 197685
* [mips] Fix off by one issue when applying a fixup.Matheus Almeida2013-12-171-2/+2
| | | | | | | The branch offset for a R_MIPS_PC16 relocation is indeed a 16-bit signed immediate. llvm-svn: 197506
* [mips] Add checks for alignment and maximum displacements for most of theMatheus Almeida2013-12-131-5/+31
| | | | | | | | | | | branch instructions for mips and micromips instruction sets thus avoiding the situation of generating branches to undesired locations if offsets cannot be encoded. This patch also checks if a fixup cannot be applied and returns a fatal error if that's the case. llvm-svn: 197223
* [mips][msa] Fix issue with immediate fields of LD/ST instructionsMatheus Almeida2013-12-051-0/+46
| | | | | | | | | not being correctly encoded/decoded. In more detail, immediate fields of LD/ST instructions should be divided/multiplied by the size of the data format before encoding and after decoding, respectively. llvm-svn: 196494
* [CMake] Let add_public_tablegen_target responsible to provide dependency to ↵NAKAMURA Takumi2013-11-281-2/+0
| | | | | | | | | CommonTableGen. add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS. LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope. llvm-svn: 195927
* reverts 195057 per requestJack Carter2013-11-192-4/+26
| | | | llvm-svn: 195152
* Remove unused special member functions and reformat.Eric Christopher2013-11-191-12/+2
| | | | llvm-svn: 195077
OpenPOWER on IntegriCloud