diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2011-11-07 21:37:33 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-11-07 21:37:33 +0000 |
commit | c370619bac3ad2e9c9ae08a4c2fa9652b7ab31f7 (patch) | |
tree | b979946cf4a79e20fbbc612fe88a40e1012eddf8 /lib/Target/Mips/MipsInstrFPU.td | |
parent | 29d525a3edf6df1e7797ecb60ebfa445a27e37c6 (diff) | |
download | external_llvm-c370619bac3ad2e9c9ae08a4c2fa9652b7ab31f7.zip external_llvm-c370619bac3ad2e9c9ae08a4c2fa9652b7ab31f7.tar.gz external_llvm-c370619bac3ad2e9c9ae08a4c2fa9652b7ab31f7.tar.bz2 |
Add definition of the base class for floating point comparison instructions
and add Mips64's version too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrFPU.td')
-rw-r--r-- | lib/Target/Mips/MipsInstrFPU.td | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/Mips/MipsInstrFPU.td b/lib/Target/Mips/MipsInstrFPU.td index 0778c3d..baf3ebd 100644 --- a/lib/Target/Mips/MipsInstrFPU.td +++ b/lib/Target/Mips/MipsInstrFPU.td @@ -267,16 +267,16 @@ def MIPS_FCOND_NGE : PatLeaf<(i32 13)>; def MIPS_FCOND_LE : PatLeaf<(i32 14)>; def MIPS_FCOND_NGT : PatLeaf<(i32 15)>; +class FCMP<bits<5> fmt, RegisterClass RC, string typestr> : + FCC<fmt, (outs), (ins RC:$fs, RC:$ft, condcode:$cc), + !strconcat("c.$cc.", typestr, "\t$fs, $ft"), + [(MipsFPCmp RC:$fs, RC:$ft, imm:$cc)]>; + /// Floating Point Compare let Defs=[FCR31] in { - def FCMP_S32 : FCC<0x10, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc), - "c.$cc.s\t$fs, $ft", - [(MipsFPCmp FGR32:$fs, FGR32:$ft, imm:$cc)]>; - - def FCMP_D32 : FCC<0x11, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc), - "c.$cc.d\t$fs, $ft", - [(MipsFPCmp AFGR64:$fs, AFGR64:$ft, imm:$cc)]>, - Requires<[NotFP64bit]>; + def FCMP_S32 : FCMP<0x10, FGR32, "s">; + def FCMP_D32 : FCMP<0x11, AFGR64, "d">, Requires<[NotFP64bit]>; + def FCMP_D64 : FCMP<0x11, FGR64, "d">, Requires<[IsFP64bit]>; } //===----------------------------------------------------------------------===// |