def FSUBQ : F3_16<2, 0b110100, 0x47, "fsubq">; // fsubq f, f, f
// Section A.13: Floating-point compare - p159
-// FIXME: FCMPS, FCMPD, FCMPQ !!!
-#if 0
-def FSTOX : F3_14<2, 0b110100, 0b011001001, "fstod">; // fstod rs2, rd
-def FDTOX : F3_14<2, 0b110100, 0b011001101, "fstoq">; // fstoq rs2, rd
-def FQTOX : F3_14<2, 0b110100, 0b011000110, "fstos">; // fstos rs2, rd
-def FSTOI : F3_14<2, 0b110100, 0b011001110, "fdtoq">; // fdtoq rs2, rd
-def FDTOI : F3_14<2, 0b110100, 0b011000111, "fqtos">; // fqtos rs2, rd
-def FQTOI : F3_14<2, 0b110100, 0b011001011, "fqtod">; // fqtod rs2, rd
-#endif
+def FCMPS : F3_15<2, 0b110101, 0b010100001, "fcmps">; // fcmps %fcc, r1, r2
+def FCMPD : F3_15<2, 0b110101, 0b010100010, "fcmpd">; // fcmpd %fcc, r1, r2
+def FCMPQ : F3_15<2, 0b110101, 0b010100011, "fcmpq">; // fcmpq %fcc, r1, r2
+def FCMPES : F3_15<2, 0b110101, 0b010100101, "fcmpes">; // fcmpes %fcc, r1, r2
+def FCMPED : F3_15<2, 0b110101, 0b010100110, "fcmped">; // fcmped %fcc, r1, r2
+def FCMPEQ : F3_15<2, 0b110101, 0b010100111, "fcmpeq">; // fcmpeq %fcc, r1, r2
// Section A.14: Convert floating-point to integer - p161
def FSTOX : F3_14<2, 0b110100, 0b010000001, "fstox">; // fstox rs2, rd
}
class F3_14<bits<2> opVal, bits<6> op3Val,
- bits<9> opfval, string name> : F3_rs2rd {
+ bits<9> opfVal, string name> : F3_rs2rd {
set op = opVal;
set op3 = op3Val;
set Name = name;
//set Inst{18-14} = dontcare;
- set Inst{13-5} = opfval;
+ set Inst{13-5} = opfVal;
+}
+
+class F3_15<bits<2> opVal, bits<6> op3Val,
+ bits<9> opfVal, string name> : F3 {
+ bits<2> cc;
+ bits<5> rs1;
+ bits<5> rs2;
+
+ set op = opVal;
+ set op3 = op3Val;
+ set Inst{26-25} = cc;
+ set Inst{18-14} = rs1;
+ set Inst{13-5} = opfVal;
+ set Inst{4-0} = rs2;
}
class F3_16<bits<2> opVal, bits<6> op3Val,