mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[mips] Modify definitions of floating point comparison instructions.
No functionality change. llvm-svn: 170077
This commit is contained in:
parent
a2c716142c
commit
91fcd99fe7
@ -284,6 +284,14 @@ class BC1F_FT<string opstr, InstrItinClass Itin,
|
||||
let Uses = [FCR31];
|
||||
}
|
||||
|
||||
class CEQS_FT<string typestr, RegisterClass RC, InstrItinClass Itin,
|
||||
SDPatternOperator OpNode = null_frag> :
|
||||
InstSE<(outs), (ins RC:$fs, RC:$ft, condcode:$cond),
|
||||
!strconcat("c.$cond.", typestr, "\t$fs, $ft"),
|
||||
[(OpNode RC:$fs, RC:$ft, imm:$cond)], Itin, FrmFR> {
|
||||
let Defs = [FCR31];
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Floating Point Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -537,15 +545,12 @@ class FCMP<bits<5> fmt, RegisterClass RC, string typestr> :
|
||||
[(MipsFPCmp RC:$fs, RC:$ft, imm:$cc)]>;
|
||||
|
||||
/// Floating Point Compare
|
||||
let Defs=[FCR31] in {
|
||||
def FCMP_S32 : FCMP<0x10, FGR32, "s">;
|
||||
def FCMP_D32 : FCMP<0x11, AFGR64, "d">,
|
||||
Requires<[NotFP64bit, HasStdEnc]>;
|
||||
def FCMP_D64 : FCMP<0x11, FGR64, "d">,
|
||||
Requires<[IsFP64bit, HasStdEnc]> {
|
||||
let DecoderNamespace = "Mips64";
|
||||
}
|
||||
}
|
||||
def FCMP_S32 : CEQS_FT<"s", FGR32, IIFcmp, MipsFPCmp>, CEQS_FM<16>;
|
||||
def FCMP_D32 : CEQS_FT<"d", AFGR64, IIFcmp, MipsFPCmp>, CEQS_FM<17>,
|
||||
Requires<[NotFP64bit, HasStdEnc]>;
|
||||
let DecoderNamespace = "Mips64" in
|
||||
def FCMP_D64 : CEQS_FT<"d", FGR64, IIFcmp, MipsFPCmp>, CEQS_FM<17>,
|
||||
Requires<[IsFP64bit, HasStdEnc]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Floating Point Pseudo-Instructions
|
||||
|
@ -466,3 +466,19 @@ class BC1F_FM<bit nd, bit tf> {
|
||||
let Inst{16} = tf;
|
||||
let Inst{15-0} = offset;
|
||||
}
|
||||
|
||||
class CEQS_FM<bits<5> fmt> {
|
||||
bits<5> fs;
|
||||
bits<5> ft;
|
||||
bits<4> cond;
|
||||
|
||||
bits<32> Inst;
|
||||
|
||||
let Inst{31-26} = 0x11;
|
||||
let Inst{25-21} = fmt;
|
||||
let Inst{20-16} = ft;
|
||||
let Inst{15-11} = fs;
|
||||
let Inst{10-8} = 0; // cc
|
||||
let Inst{7-4} = 0x3;
|
||||
let Inst{3-0} = cond;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user