llvm-6502/lib/Target/Mips
Daniel Sanders 24a071b8c5 [mips] Add support for -modd-spreg/-mno-odd-spreg
Summary:
When -mno-odd-spreg is in effect, 32-bit floating point values are not
permitted in odd FPU registers. The option also prohibits 32-bit and 64-bit
floating point comparison results from being written to odd registers.

This option has three purposes:
* It allows support for certain MIPS implementations such as loongson-3a that
  do not allow the use of odd registers for single precision arithmetic.
* When using -mfpxx, -mno-odd-spreg is the default and this allows us to
  statically check that code is compliant with the O32 FPXX ABI since mtc1/mfc1
  instructions to/from odd registers are guaranteed not to appear for any
  reason. Once this has been established, the user can then re-enable
  -modd-spreg to regain the use of all 32 single-precision registers.
* When using -mfp64 and -mno-odd-spreg together, an O32 extension named
  O32 FP64A is used as the ABI. This is intended to provide almost all
  functionality of an FR=1 processor but can also be executed on a FR=0 core
  with the assistance of a hardware compatibility mode which emulates FR=0
  behaviour on an FR=1 processor.

* Added '.module oddspreg' and '.module nooddspreg' each of which update
  the .MIPS.abiflags section appropriately
* Moved setFpABI() call inside emitDirectiveModuleFP() so that the caller
  doesn't have to remember to do it.
* MipsABIFlags now calculates the flags1 and flags2 member on demand rather
  than trying to maintain them in the same format they will be emitted in.

There is one portion of the -mfp64 and -mno-odd-spreg combination that is not
implemented yet. Moves to/from odd-numbered double-precision registers must not
use mtc1. I will fix this in a follow-up.

Differential Revision: http://reviews.llvm.org/D4383


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212717 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10 13:38:23 +00:00
..
AsmParser [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
Disassembler [mips][mips64r6] Add BLTC and BLTUC instructions 2014-06-18 14:36:00 +00:00
InstPrinter [mips][mips64r6] Add Relocations R_MIPS_PCHI16, R_MIPS_PCLO16 2014-05-27 14:58:51 +00:00
MCTargetDesc [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
TargetInfo
CMakeLists.txt
LLVMBuild.txt
Makefile
MicroMipsInstrFormats.td
MicroMipsInstrFPU.td [mips][mips64r6] bc1[tf] are not available on MIPS32r6/MIPS64r6 2014-06-12 15:00:17 +00:00
MicroMipsInstrInfo.td [mips][mips64r6] Use JALR for returns instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:16:07 +00:00
Mips16FrameLowering.cpp So that we can include frame lowering in the subtarget, remove include 2014-07-02 23:29:55 +00:00
Mips16FrameLowering.h So that we can include frame lowering in the subtarget, remove include 2014-07-02 23:29:55 +00:00
Mips16HardFloat.cpp
Mips16HardFloat.h
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp
Mips16InstrInfo.h
Mips16InstrInfo.td [mips][mips64r6] Use JALR for indirect branches instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:21:59 +00:00
Mips16ISelDAGToDAG.cpp
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp Remove dead code. 2014-07-03 00:44:28 +00:00
Mips16ISelLowering.h Make these preprocessor directives match all of the others in the port. 2014-07-03 00:44:31 +00:00
Mips16RegisterInfo.cpp
Mips16RegisterInfo.h
Mips32r6InstrFormats.td [mips][mips64r6] Correct cond names in the cmp.cond.[ds] instructions 2014-07-09 10:40:20 +00:00
Mips32r6InstrInfo.td [mips][mips64r6] Correct select patterns that have the condition or true/false values backwards 2014-07-09 10:47:26 +00:00
Mips64InstrInfo.td [mips][mips64r6] Use JALR for indirect branches instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:21:59 +00:00
Mips64r6InstrInfo.td [mips][mips64r6] Correct select patterns that have the condition or true/false values backwards 2014-07-09 10:47:26 +00:00
Mips.h
Mips.td [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MipsAsmPrinter.h [mips][mips64r6] Use JALR for indirect branches instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:21:59 +00:00
MipsCallingConv.td
MipsCodeEmitter.cpp [mips][mips64r6] Add LDPC instruction 2014-06-09 09:49:51 +00:00
MipsCondMov.td [mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS32r6/MIPS64r6 2014-06-12 13:39:06 +00:00
MipsConstantIslandPass.cpp
MipsDelaySlotFiller.cpp [mips][mips64r6] Replace m[tf]hi, m[tf]lo, mult, multu, dmult, dmultu, div, ddiv, divu, ddivu for MIPS32r6/MIPS64. 2014-06-12 10:44:10 +00:00
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td
MipsFastISel.cpp Add load/store functionality 2014-06-16 22:05:47 +00:00
MipsFrameLowering.cpp
MipsFrameLowering.h So that we can include frame lowering in the subtarget, remove include 2014-07-02 23:29:55 +00:00
MipsInstrFormats.td [mips] Added support for assembling sdbbp. 2014-06-24 13:00:32 +00:00
MipsInstrFPU.td [mips][mips64r6] [ls][wd]c2 were re-encoded with 11-bit signed immediates rather than 16-bit in MIPS32r6/MIPS64r6 2014-06-16 10:00:45 +00:00
MipsInstrInfo.cpp
MipsInstrInfo.h
MipsInstrInfo.td [mips][mips64r6] Use JALR for indirect branches instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:21:59 +00:00
MipsISelDAGToDAG.cpp [mips][mips64r6] [ls][dw][lr] are not available in MIPS32r6/MIPS64r6 2014-05-23 13:18:02 +00:00
MipsISelDAGToDAG.h
MipsISelLowering.cpp Make it possible for ints/floats to return different values from getBooleanContents() 2014-07-10 10:18:12 +00:00
MipsISelLowering.h So that we can include target lowering in the subtarget, remove include 2014-07-02 23:18:40 +00:00
MipsJITInfo.cpp
MipsJITInfo.h
MipsLongBranch.cpp [mips][mips64r6] b(ge|lt)zal are not available on MIPS32r6/MIPS64r6 and bal is a normal instruction 2014-06-13 13:02:52 +00:00
MipsMachineFunction.cpp
MipsMachineFunction.h Remove unnecessary include. 2014-07-02 00:54:10 +00:00
MipsMCInstLower.cpp [mips] Optimize long branch for MIPS64 by removing %higher and %highest. 2014-05-27 18:53:06 +00:00
MipsMCInstLower.h [mips] Optimize long branch for MIPS64 by removing %higher and %highest. 2014-05-27 18:53:06 +00:00
MipsModuleISelDAGToDAG.cpp
MipsModuleISelDAGToDAG.h
MipsMSAInstrFormats.td
MipsMSAInstrInfo.td
MipsOptimizePICCall.cpp
MipsOs16.cpp
MipsOs16.h
MipsRegisterInfo.cpp [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MipsRegisterInfo.h
MipsRegisterInfo.td [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MipsRelocations.h
MipsSchedule.td
MipsSEFrameLowering.cpp So that we can include frame lowering in the subtarget, remove include 2014-07-02 23:29:55 +00:00
MipsSEFrameLowering.h So that we can include frame lowering in the subtarget, remove include 2014-07-02 23:29:55 +00:00
MipsSEInstrInfo.cpp [mips][mips64r6] Use JALR for returns instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:16:07 +00:00
MipsSEInstrInfo.h [mips][mips64r6] Use JALR for returns instead of JR (which is not available on MIPS32r6/MIPS64r6) 2014-07-09 10:16:07 +00:00
MipsSEISelDAGToDAG.cpp
MipsSEISelDAGToDAG.h
MipsSEISelLowering.cpp So that we can include target lowering in the subtarget, remove include 2014-07-02 23:18:40 +00:00
MipsSEISelLowering.h Make these preprocessor directives match all of the others in the port. 2014-07-03 00:44:31 +00:00
MipsSelectionDAGInfo.cpp Have MipsSelectionDAGInfo constructor take a DataLayout rather 2014-06-27 04:38:30 +00:00
MipsSelectionDAGInfo.h Have MipsSelectionDAGInfo constructor take a DataLayout rather 2014-06-27 04:38:30 +00:00
MipsSERegisterInfo.cpp
MipsSERegisterInfo.h
MipsSubtarget.cpp [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MipsSubtarget.h [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MipsTargetMachine.cpp Move subtarget dependent features into the subtarget from the target 2014-07-03 00:10:24 +00:00
MipsTargetMachine.h Move subtarget dependent features into the subtarget from the target 2014-07-03 00:10:24 +00:00
MipsTargetObjectFile.cpp
MipsTargetObjectFile.h
MipsTargetStreamer.h [mips] Add support for -modd-spreg/-mno-odd-spreg 2014-07-10 13:38:23 +00:00
MSA.txt