diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-12-13 00:49:23 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-12-13 00:49:23 +0000 |
commit | 10bd7264598a806aced15d0b7a3a5fc6803112a1 (patch) | |
tree | 14ea3ebd7def06e55b5e554c604385c7cbfb9bed /lib/Target/Mips/MipsInstrFPU.td | |
parent | 2f3e06399a703a20f544a0029a11e9a484d4cead (diff) | |
download | external_llvm-10bd7264598a806aced15d0b7a3a5fc6803112a1.zip external_llvm-10bd7264598a806aced15d0b7a3a5fc6803112a1.tar.gz external_llvm-10bd7264598a806aced15d0b7a3a5fc6803112a1.tar.bz2 |
[mips] Move classes that do not belong in MipsInstrFormats.td into
MipsInstrFPU.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrFPU.td')
-rw-r--r-- | lib/Target/Mips/MipsInstrFPU.td | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrFPU.td b/lib/Target/Mips/MipsInstrFPU.td index 44c4d7a..d38584c 100644 --- a/lib/Target/Mips/MipsInstrFPU.td +++ b/lib/Target/Mips/MipsInstrFPU.td @@ -86,6 +86,29 @@ def fpimm0neg : PatLeaf<(fpimm), [{ // Only S32 and D32 are supported right now. //===----------------------------------------------------------------------===// +// FP unary instructions without patterns. +class FFR1<bits<6> funct, bits<5> fmt, string opstr, RegisterClass DstRC, + RegisterClass SrcRC> : + FFR<0x11, funct, fmt, (outs DstRC:$fd), (ins SrcRC:$fs), + !strconcat(opstr, "\t$fd, $fs"), []> { + let ft = 0; +} + +// FP unary instructions with patterns. +class FFR1P<bits<6> funct, bits<5> fmt, string opstr, RegisterClass DstRC, + RegisterClass SrcRC, SDNode OpNode> : + FFR<0x11, funct, fmt, (outs DstRC:$fd), (ins SrcRC:$fs), + !strconcat(opstr, "\t$fd, $fs"), + [(set DstRC:$fd, (OpNode SrcRC:$fs))]> { + let ft = 0; +} + +class FFR2P<bits<6> funct, bits<5> fmt, string opstr, RegisterClass RC, + SDNode OpNode> : + FFR<0x11, funct, fmt, (outs RC:$fd), (ins RC:$fs, RC:$ft), + !strconcat(opstr, "\t$fd, $fs, $ft"), + [(set RC:$fd, (OpNode RC:$fs, RC:$ft))]>; + // FP load. let DecoderMethod = "DecodeFMem" in { class FPLoad<bits<6> op, string opstr, RegisterClass RC, Operand MemOpnd>: |