diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2011-10-08 03:50:18 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-10-08 03:50:18 +0000 |
| commit | 6be7d6c97681a1978ef4130101e6eb66ae348d50 (patch) | |
| tree | 4af3089890981de183ec61235247e32894f84a03 /llvm | |
| parent | 2365f906763c58297a5caaab312186bb2bffe762 (diff) | |
| download | llvm-6be7d6c97681a1978ef4130101e6eb66ae348d50.zip llvm-6be7d6c97681a1978ef4130101e6eb66ae348d50.tar.gz llvm-6be7d6c97681a1978ef4130101e6eb66ae348d50.tar.bz2 | |
Simplify definition of FP move instructions.
llvm-svn: 141476
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrFPU.td | 9 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrFPU.td b/llvm/lib/Target/Mips/MipsInstrFPU.td index 7a02343..836e0e4 100644 --- a/llvm/lib/Target/Mips/MipsInstrFPU.td +++ b/llvm/lib/Target/Mips/MipsInstrFPU.td @@ -163,10 +163,11 @@ let fd = 0 in { [(set FGR32:$fs, (bitconvert CPURegs:$rt))]>; } -def FMOV_S32 : FFR<0x11, 0b000110, 0x0, (outs FGR32:$fd), (ins FGR32:$fs), - "mov.s\t$fd, $fs", []>; -def FMOV_D32 : FFR<0x11, 0b000110, 0x1, (outs AFGR64:$fd), (ins AFGR64:$fs), - "mov.d\t$fd, $fs", []>; +def FMOV_S : FFR1<0x6, 16, "mov", "s", FGR32, FGR32>; +def FMOV_D32 : FFR1<0x6, 17, "mov", "d", AFGR64, AFGR64>, + Requires<[NotFP64bit]>; +def FMOV_D64 : FFR1<0x6, 17, "mov", "d", FGR64, FGR64>, + Requires<[IsFP64bit]>; /// Floating Point Memory Instructions let Predicates = [IsNotSingleFloat] in { diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.cpp b/llvm/lib/Target/Mips/MipsInstrInfo.cpp index 533f6fc..b79b521 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.cpp +++ b/llvm/lib/Target/Mips/MipsInstrInfo.cpp @@ -119,7 +119,7 @@ copyPhysReg(MachineBasicBlock &MBB, Opc = Mips::MTLO, DestReg = 0; } else if (Mips::FGR32RegClass.contains(DestReg, SrcReg)) - Opc = Mips::FMOV_S32; + Opc = Mips::FMOV_S; else if (Mips::AFGR64RegClass.contains(DestReg, SrcReg)) Opc = Mips::FMOV_D32; else if (Mips::CCRRegClass.contains(DestReg, SrcReg)) |
