@@ -1004,105 +1004,105 @@ defm : BitwisePat<"XOR", xor>;
10041004// Floating point arithmetic instruction
10051005//===----------------------------------------------------------------------===//
10061006
1007- let Defs = [FPS] in
1008- class MxFArithBase_FF<dag outs, dag ins, string asm, string rounding,
1009- list<dag> patterns>
1010- : MxInst<outs, ins, asm, patterns> {
1011- let Uses = !if(!eq(rounding, ""), [FPC], []);
1012-
1013- let Predicates = !if(!eq(rounding, ""), [AtLeastM68881], [AtLeastM68040]);
1014- }
1015-
1016- class MxFPOpModeSelector<string rounding, bits<7> single, bits<7> double,
1017- bits<7> extended> {
1018- bits<7> Mode = !cond(!eq(rounding, "s"): single,
1019- !eq(rounding, "d"): double,
1020- !eq(rounding, ""): extended);
1021- }
1022-
1023- //===----------------------------------------------------------------------===//
1024- // Unary floating point instruction
1025- //===----------------------------------------------------------------------===//
1026-
1027- class MxFUnary_FF<MxOpBundle Opnd, string rounding,
1028- string mnemonic, bits<7> opmode>
1029- : MxFArithBase_FF<(outs Opnd.Op:$dst), (ins Opnd.Op:$src),
1030- "f"#rounding#mnemonic#".x\t$src, $dst", rounding, [(null_frag)]> {
1031- let Inst = (ascend
1032- (descend 0b1111,
1033- /*COPROCESSOR ID*/0b001,
1034- 0b000,
1035- /*MODE+REGISTER*/0b000000),
1036- (descend 0b0, /* R/M */ 0b0, 0b0,
1037- /*SOURCE SPECIFIER*/
1038- (operand "$src", 3),
1039- /*DESTINATION*/
1040- (operand "$dst", 3),
1041- /*OPMODE*/
1042- opmode)
1043- );
1044- }
1045-
1046- multiclass MxFUnaryOp<string mnemonic, bits<7> single, bits<7> double,
1047- bits<7> extended> {
1048- foreach rounding = ["", "s", "d"] in {
1049- defvar opmode = MxFPOpModeSelector<rounding, single, double, extended>.Mode;
1050-
1051- def F # !toupper(rounding) # !substr(NAME, 1) # "80fp_fp"
1052- : MxFUnary_FF<MxOp80AddrMode_fpr, rounding, mnemonic, opmode>;
1007+ // let Defs = [FPS] in
1008+ // class MxFArithBase_FF<dag outs, dag ins, string asm, string rounding,
1009+ // list<dag> patterns>
1010+ // : MxInst<outs, ins, asm, patterns> {
1011+ // let Uses = !if(!eq(rounding, ""), [FPC], []);
1012+
1013+ // let Predicates = !if(!eq(rounding, ""), [AtLeastM68881], [AtLeastM68040]);
1014+ // }
1015+
1016+ // class MxFPOpModeSelector<string rounding, bits<7> single, bits<7> double,
1017+ // bits<7> extended> {
1018+ // bits<7> Mode = !cond(!eq(rounding, "s"): single,
1019+ // !eq(rounding, "d"): double,
1020+ // !eq(rounding, ""): extended);
1021+ // }
1022+
1023+ // // ===----------------------------------------------------------------------===//
1024+ // // Unary floating point instruction
1025+ // // ===----------------------------------------------------------------------===//
1026+
1027+ // class MxFUnary_FF<MxOpBundle Opnd, string rounding,
1028+ // string mnemonic, bits<7> opmode>
1029+ // : MxFArithBase_FF<(outs Opnd.Op:$dst), (ins Opnd.Op:$src),
1030+ // "f"#rounding#mnemonic#".x\t$src, $dst", rounding, [(null_frag)]> {
1031+ // let Inst = (ascend
1032+ // (descend 0b1111,
1033+ // /*COPROCESSOR ID*/0b001,
1034+ // 0b000,
1035+ // /*MODE+REGISTER*/0b000000),
1036+ // (descend 0b0, /* R/M */ 0b0, 0b0,
1037+ // /*SOURCE SPECIFIER*/
1038+ // (operand "$src", 3),
1039+ // /*DESTINATION*/
1040+ // (operand "$dst", 3),
1041+ // /*OPMODE*/
1042+ // opmode)
1043+ // );
1044+ // }
1045+
1046+ // multiclass MxFUnaryOp<string mnemonic, bits<7> single, bits<7> double,
1047+ // bits<7> extended> {
1048+ // foreach rounding = ["", "s", "d"] in {
1049+ // defvar opmode = MxFPOpModeSelector<rounding, single, double, extended>.Mode;
1050+
1051+ // def F # !toupper(rounding) # !substr(NAME, 1) # "80fp_fp"
1052+ // : MxFUnary_FF<MxOp80AddrMode_fpr, rounding, mnemonic, opmode>;
10531053
1054- let isCodeGenOnly = 1 in
1055- foreach size = [32, 64] in
1056- def F # !toupper(rounding) # !substr(NAME, 1) # size # "fp_fp"
1057- : MxFUnary_FF<!cast<MxOpBundle>("MxOp"#size#"AddrMode_fpr"),
1058- rounding, mnemonic, opmode>;
1059- }
1060- }
1061-
1062- defm FABS : MxFUnaryOp<"abs", 0b1011000, 0b1011100, 0b0011000>;
1063- defm FNEG : MxFUnaryOp<"neg", 0b1011010, 0b1011110, 0b0011010>;
1064-
1065- //===----------------------------------------------------------------------===//
1066- // Binary floating point instruction
1067- //===----------------------------------------------------------------------===//
1068-
1069- let Constraints = "$src = $dst" in
1070- class MxFBinary_FF<MxOpBundle Opnd, string rounding,
1071- string mnemonic, bits<7> opmode>
1072- : MxFArithBase_FF<(outs Opnd.Op:$dst), (ins Opnd.Op:$src, Opnd.Op:$opd),
1073- "f"#rounding#mnemonic#".x\t$opd, $dst", rounding, [(null_frag)]> {
1074- let Inst = (ascend
1075- (descend 0b1111,
1076- /*COPROCESSOR ID*/0b001,
1077- 0b000,
1078- /*MODE+REGISTER*/0b000000),
1079- (descend 0b0, /* R/M */ 0b0, 0b0,
1080- /*SOURCE SPECIFIER*/
1081- (operand "$opd", 3),
1082- /*DESTINATION*/
1083- (operand "$dst", 3),
1084- /*OPMODE*/
1085- opmode)
1086- );
1087- }
1088-
1089- multiclass MxFBinaryOp<string mnemonic, bits<7> single, bits<7> double,
1090- bits<7> extended> {
1091- foreach rounding = ["", "s", "d"] in {
1092- defvar opmode = MxFPOpModeSelector<rounding, single, double, extended>.Mode;
1093-
1094- def F # !toupper(rounding) # !substr(NAME, 1) # "80fp_fp"
1095- : MxFBinary_FF<MxOp80AddrMode_fpr, rounding, mnemonic, opmode>;
1096-
1097- let isCodeGenOnly = 1 in
1098- foreach size = [32, 64] in
1099- def F # !toupper(rounding) # !substr(NAME, 1) # size # "fp_fp"
1100- : MxFBinary_FF<!cast<MxOpBundle>("MxOp"#size#"AddrMode_fpr"),
1101- rounding, mnemonic, opmode>;
1102- }
1103- }
1104-
1105- defm FADD : MxFBinaryOp<"add", 0b1100010, 0b1100110, 0b0100010>;
1106- defm FSUB : MxFBinaryOp<"sub", 0b1101000, 0b1101100, 0b0101000>;
1107- defm FMUL : MxFBinaryOp<"mul", 0b1100011, 0b1100111, 0b0100011>;
1108- defm FDIV : MxFBinaryOp<"div", 0b1100000, 0b1100100, 0b0100000>;
1054+ // let isCodeGenOnly = 1 in
1055+ // foreach size = [32, 64] in
1056+ // def F # !toupper(rounding) # !substr(NAME, 1) # size # "fp_fp"
1057+ // : MxFUnary_FF<!cast<MxOpBundle>("MxOp"#size#"AddrMode_fpr"),
1058+ // rounding, mnemonic, opmode>;
1059+ // }
1060+ // }
1061+
1062+ // defm FABS : MxFUnaryOp<"abs", 0b1011000, 0b1011100, 0b0011000>;
1063+ // defm FNEG : MxFUnaryOp<"neg", 0b1011010, 0b1011110, 0b0011010>;
1064+
1065+ // // ===----------------------------------------------------------------------===//
1066+ // // Binary floating point instruction
1067+ // // ===----------------------------------------------------------------------===//
1068+
1069+ // let Constraints = "$src = $dst" in
1070+ // class MxFBinary_FF<MxOpBundle Opnd, string rounding,
1071+ // string mnemonic, bits<7> opmode>
1072+ // : MxFArithBase_FF<(outs Opnd.Op:$dst), (ins Opnd.Op:$src, Opnd.Op:$opd),
1073+ // "f"#rounding#mnemonic#".x\t$opd, $dst", rounding, [(null_frag)]> {
1074+ // let Inst = (ascend
1075+ // (descend 0b1111,
1076+ // /*COPROCESSOR ID*/0b001,
1077+ // 0b000,
1078+ // /*MODE+REGISTER*/0b000000),
1079+ // (descend 0b0, /* R/M */ 0b0, 0b0,
1080+ // /*SOURCE SPECIFIER*/
1081+ // (operand "$opd", 3),
1082+ // /*DESTINATION*/
1083+ // (operand "$dst", 3),
1084+ // /*OPMODE*/
1085+ // opmode)
1086+ // );
1087+ // }
1088+
1089+ // multiclass MxFBinaryOp<string mnemonic, bits<7> single, bits<7> double,
1090+ // bits<7> extended> {
1091+ // foreach rounding = ["", "s", "d"] in {
1092+ // defvar opmode = MxFPOpModeSelector<rounding, single, double, extended>.Mode;
1093+
1094+ // def F # !toupper(rounding) # !substr(NAME, 1) # "80fp_fp"
1095+ // : MxFBinary_FF<MxOp80AddrMode_fpr, rounding, mnemonic, opmode>;
1096+
1097+ // let isCodeGenOnly = 1 in
1098+ // foreach size = [32, 64] in
1099+ // def F # !toupper(rounding) # !substr(NAME, 1) # size # "fp_fp"
1100+ // : MxFBinary_FF<!cast<MxOpBundle>("MxOp"#size#"AddrMode_fpr"),
1101+ // rounding, mnemonic, opmode>;
1102+ // }
1103+ // }
1104+
1105+ // defm FADD : MxFBinaryOp<"add", 0b1100010, 0b1100110, 0b0100010>;
1106+ // defm FSUB : MxFBinaryOp<"sub", 0b1101000, 0b1101100, 0b0101000>;
1107+ // defm FMUL : MxFBinaryOp<"mul", 0b1100011, 0b1100111, 0b0100011>;
1108+ // defm FDIV : MxFBinaryOp<"div", 0b1100000, 0b1100100, 0b0100000>;
0 commit comments