summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips] Implement NaCl sandboxing of indirect jumps:Sasa Stankovic2014-02-281-3/+8
| | | | | | | | | * 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
* Implement the missing bits corresponding to .mips_hack_elf_flags.Rafael Espindola2014-01-261-1/+1
| | | | | | | | | | | | 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-261-7/+9
| | | | | | | | | | 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
* [Mips] TargetStreamer Support for .abicalls and .set pic0.Jack Carter2014-01-061-1/+0
| | | | | | | | | | 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
* reverts 195057 per requestJack Carter2013-11-191-1/+1
| | | | llvm-svn: 195152
* Fix previous commit and fully remove variable.Eric Christopher2013-11-191-1/+1
| | | | llvm-svn: 195076
* [Mips] MipsTargetStreamer refactoring.Jack Carter2013-11-181-64/+0
| | | | | | No functionality changes. llvm-svn: 195057
* Revert r194865 and r194874.Alexey Samsonov2013-11-181-3/+0
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-151-0/+3
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Add a MCTargetStreamer interface.Rafael Espindola2013-10-081-7/+91
| | | | | | | | | | | | | This patch fixes an old FIXME by creating a MCTargetStreamer interface and moving the target specific functions for ARM, Mips and PPC to it. The ARM streamer is still declared in a common place because it is used from lib/CodeGen/ARMException.cpp, but the Mips and PPC are completely hidden in the corresponding Target directories. I will send an email to llvmdev with instructions on how to use this. llvm-svn: 192181
* Remove some really nasty uses of hasRawTextSupport.Rafael Espindola2013-10-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MC was first added, targets could use hasRawTextSupport to keep features working before they were added to the MC interface. The design goal of MC is to provide an uniform api for printing assembly and object files. Short of relaxations and other corner cases, a object file is just another representation of the assembly. It was never the intention that targets would keep doing things like if (hasRawTextSupport()) Set flags in one way. else Set flags in another way. When they do that they create two code paths and the object file is no longer just another representation of the assembly. This also then requires testing with llc -filetype=obj, which is extremelly brittle. This patch removes some of these hacks by replacing them with smaller ones. The ARM flag setting is trivial, so I just moved it to the constructor. For Mips, the patch adds two temporary hack directives that allow the assembly to represent the same things as the object file was already able to. The hope is that the mips developers will replace the hack directives with the same ones that gas uses and drop the -print-hack-directives flag. I will also try to implement a target streamer interface, so that we can move this out of the common code. In summary, for any new work, two rules of the thumb are * Don't use "llc -filetype=obj" in tests. * Don't add calls to hasRawTextSupport. llvm-svn: 192035
* Remove the MachineMove class.Rafael Espindola2013-05-131-4/+4
| | | | | | | | | | | | It was just a less powerful and more confusing version of MCCFIInstruction. A side effect is that, since MCCFIInstruction uses dwarf register numbers, calls to getDwarfRegNum are pushed out, which should allow further simplifications. I left the MachineModuleInfo::addFrameMove interface unchanged since this patch was already fairly big. llvm-svn: 181680
* Remove unused argument.Rafael Espindola2013-05-101-2/+2
| | | | llvm-svn: 181618
* This patch implements runtime Mips specificJack Carter2013-01-301-1/+2
| | | | | | | | setting of ELF header e_flags. Contributer: Jack Carter llvm-svn: 173884
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Add disassembler to MIPS. Akira Hatanaka2012-04-171-1/+40
| | | | | | Patch by Vladimir Medic. llvm-svn: 154935
* Revert r153924. There were buildbot failures.Akira Hatanaka2012-04-031-40/+1
| | | | llvm-svn: 153925
* MIPS disassembler support.Akira Hatanaka2012-04-031-1/+40
| | | | | | Patch by Vladimir Medic. llvm-svn: 153924
* Initial 64 bit direct object support.Akira Hatanaka2012-04-021-4/+4
| | | | | | | | | | | This patch allows llvm to recognize that a 64 bit object file is being produced and that the subsequently generated ELF header has the correct information. The test case checks for both big and little endian flavors. Patch by Jack Carter. llvm-svn: 153889
* Make MCInstrInfo available to the MCInstPrinter. This will be used to remove ↵Craig Topper2012-04-021-1/+2
| | | | | | getInstructionName and the static data it contains since the same tables are already in MCInstrInfo. llvm-svn: 153860
* Select static relocation model if it is jitting.Akira Hatanaka2012-03-311-1/+3
| | | | llvm-svn: 153795
* Make MCRegisterInfo available to the the MCInstPrinter.Jim Grosbach2012-03-051-1/+2
| | | | | | | Used to allow context sensitive printing of super-register or sub-register references. llvm-svn: 152043
* Pass endian information to constructors. Define separate functions to createAkira Hatanaka2012-03-011-14/+13
| | | | | | | | objects for big endian and little endian targets. Patch by Jack Carter. llvm-svn: 151788
* remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.Jia Liu2012-02-171-1/+1
| | | | llvm-svn: 150805
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-051-0/+1
| | | | llvm-svn: 149814
* Add big endian mips support. Based on a patch by Jack Carter.Rafael Espindola2012-01-111-4/+8
| | | | llvm-svn: 147924
* Tidy up. Simplify logic. No functional change intended.Akira Hatanaka2011-12-191-1/+2
| | | | llvm-svn: 146896
* Sink codegen optimization level into MCCodeGenInfo along side relocation modelEvan Cheng2011-11-161-2/+3
| | | | | | | and code model. This eliminates the need to pass OptLevel flag all over the place and makes it possible for any codegen pass to use this information. llvm-svn: 144788
* Mips MC object code emission improvements:Bruno Cardoso Lopes2011-11-111-1/+4
| | | | | | | | | | "With this patch we can now generate runnable Mips code through LLVM direct object emission. We have run numerous simple programs, both C and C++ and with -O0 and -O3 from the output. The code is not production ready, but quite useful for experimentation." Patch and message by Jack Carter llvm-svn: 144414
* Register the MC object streamer.Akira Hatanaka2011-09-301-0/+18
| | | | | | Patch by Reed Kotler at Mips Technologies. llvm-svn: 140887
* Register Asm backend. Add functions to MipsAsmBackend.Akira Hatanaka2011-09-301-0/+6
| | | | | | Patch by Reed Kotler at Mips Technologies. llvm-svn: 140886
* Initial implementation of MipsMCCodeEmitter.Akira Hatanaka2011-09-301-0/+9
| | | | | | Patch by Reed Kotler at Mips Technologies. llvm-svn: 140878
* Add a base class for Mips TargetMachines and add Mips64 TargetMachines. Akira Hatanaka2011-09-211-0/+22
| | | | llvm-svn: 140233
* Support for PSP is gone too.Akira Hatanaka2011-09-131-7/+2
| | | | llvm-svn: 139622
* It is not necessary to search for mipsallegrex in target triple string.Akira Hatanaka2011-09-131-2/+1
| | | | llvm-svn: 139607
* Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= ↵James Molloy2011-09-071-1/+2
| | | | | | handling to llvm-mc. Reviewed by Owen Anderson. llvm-svn: 139237
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-1/+1
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Some refactoring so TargetRegistry.h no longer has to include any filesEvan Cheng2011-08-231-0/+1
| | | | | | from MC. llvm-svn: 138367
* Separate MCInstPrinter registration from AsmPrinter registration.Evan Cheng2011-07-251-0/+13
| | | | llvm-svn: 135974
* createXXXMCCodeGenInfo should be static.Evan Cheng2011-07-231-2/+2
| | | | llvm-svn: 135826
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-221-20/+17
| | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-2/+3
| | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-191-0/+21
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng2011-07-181-2/+13
| | | | | | better location welcome). llvm-svn: 135438
OpenPOWER on IntegriCloud