@@ -60,8 +60,9 @@ def SMT_VDot_Slide3 : SMTVEncoding2<0b10>;
60
60
61
61
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
62
62
// Base vector dot product (no slide) format.
63
- class RVInstSMTVDot<SMTVEncoding2 sign, string opcodestr, string argstr>
64
- : RVInst<(outs VRM2:$vd), (ins VR:$vs1, VR:$vs2), opcodestr, argstr, [], InstFormatR> {
63
+ class RVInstSMTVDot<SMTVEncoding2 sign, string opcodestr>
64
+ : RVInst<(outs VRM2:$vd), (ins VR:$vs1, VR:$vs2), opcodestr,
65
+ "$vd, $vs1, $vs2", [], InstFormatR> {
65
66
bits<5> vd;
66
67
bits<5> vs1;
67
68
bits<5> vs2;
@@ -77,8 +78,9 @@ class RVInstSMTVDot<SMTVEncoding2 sign, string opcodestr, string argstr>
77
78
}
78
79
79
80
// Sliding-window vector dot product format.
80
- class RVInstSMTVDotSlide<SMTVEncoding2 funct2, SMTVEncoding2 sign, string opcodestr, string argstr>
81
- : RVInst<(outs VRM2:$vd), (ins VRM2:$vs1, VR:$vs2), opcodestr, argstr, [], InstFormatR> {
81
+ class RVInstSMTVDotSlide<SMTVEncoding2 funct2, SMTVEncoding2 sign, string opcodestr>
82
+ : RVInst<(outs VRM2:$vd), (ins VRM2:$vs1, VR:$vs2), opcodestr,
83
+ "$vd, $vs1, $vs2", [], InstFormatR> {
82
84
bits<5> vd;
83
85
bits<5> vs1;
84
86
bits<5> vs2;
@@ -104,10 +106,10 @@ let Predicates = [HasVendorXSMTVDot], ElementsDependOn = EltDepsVL in {
104
106
// Base vector dot product (no slide) instructions
105
107
// NOTE: Destination registers (vd) MUST be even-numbered (v0, v2, ..., v30)
106
108
// due to hardware alignment constraints. Using odd registers may cause undefined behavior.
107
- def SMT_VMADOT : RVInstSMTVDot<SMT_VDot_SS, "smt.vmadot", "$vd, $vs1, $vs2" >;
108
- def SMT_VMADOTU : RVInstSMTVDot<SMT_VDot_UU, "smt.vmadotu", "$vd, $vs1, $vs2" >;
109
- def SMT_VMADOTSU : RVInstSMTVDot<SMT_VDot_SU, "smt.vmadotsu", "$vd, $vs1, $vs2" >;
110
- def SMT_VMADOTUS : RVInstSMTVDot<SMT_VDot_US, "smt.vmadotus", "$vd, $vs1, $vs2" >;
109
+ def SMT_VMADOT : RVInstSMTVDot<SMT_VDot_SS, "smt.vmadot">;
110
+ def SMT_VMADOTU : RVInstSMTVDot<SMT_VDot_UU, "smt.vmadotu">;
111
+ def SMT_VMADOTSU : RVInstSMTVDot<SMT_VDot_SU, "smt.vmadotsu">;
112
+ def SMT_VMADOTUS : RVInstSMTVDot<SMT_VDot_US, "smt.vmadotus">;
111
113
112
114
//===----------------------------------------------------------------------===//
113
115
// Sliding-window Vector Dot Product Instructions
@@ -123,17 +125,17 @@ def SMT_VMADOTUS : RVInstSMTVDot<SMT_VDot_US, "smt.vmadotus", "$vd, $vs1, $vs2">
123
125
// NOTE: Destination registers (vd) and first source register (vs1) MUST be
124
126
// even-numbered (v0, v2, ..., v30) due to hardware alignment constraints.
125
127
// Using odd registers may cause undefined behavior.
126
- def SMT_VMADOT1 : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_SS, "smt.vmadot1", "$vd, $vs1, $vs2" >;
127
- def SMT_VMADOT1U : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_UU, "smt.vmadot1u", "$vd, $vs1, $vs2" >;
128
- def SMT_VMADOT1SU : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_SU, "smt.vmadot1su", "$vd, $vs1, $vs2" >;
129
- def SMT_VMADOT1US : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_US, "smt.vmadot1us", "$vd, $vs1, $vs2" >;
130
- def SMT_VMADOT2 : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_SS, "smt.vmadot2", "$vd, $vs1, $vs2" >;
131
- def SMT_VMADOT2U : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_UU, "smt.vmadot2u", "$vd, $vs1, $vs2" >;
132
- def SMT_VMADOT2SU : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_SU, "smt.vmadot2su", "$vd, $vs1, $vs2" >;
133
- def SMT_VMADOT2US : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_US, "smt.vmadot2us", "$vd, $vs1, $vs2" >;
134
- def SMT_VMADOT3 : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_SS, "smt.vmadot3", "$vd, $vs1, $vs2" >;
135
- def SMT_VMADOT3U : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_UU, "smt.vmadot3u", "$vd, $vs1, $vs2" >;
136
- def SMT_VMADOT3SU : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_SU, "smt.vmadot3su", "$vd, $vs1, $vs2" >;
137
- def SMT_VMADOT3US : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_US, "smt.vmadot3us", "$vd, $vs1, $vs2" >;
128
+ def SMT_VMADOT1 : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_SS, "smt.vmadot1">;
129
+ def SMT_VMADOT1U : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_UU, "smt.vmadot1u">;
130
+ def SMT_VMADOT1SU : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_SU, "smt.vmadot1su">;
131
+ def SMT_VMADOT1US : RVInstSMTVDotSlide<SMT_VDot_Slide1, SMT_VDot_US, "smt.vmadot1us">;
132
+ def SMT_VMADOT2 : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_SS, "smt.vmadot2">;
133
+ def SMT_VMADOT2U : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_UU, "smt.vmadot2u">;
134
+ def SMT_VMADOT2SU : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_SU, "smt.vmadot2su">;
135
+ def SMT_VMADOT2US : RVInstSMTVDotSlide<SMT_VDot_Slide2, SMT_VDot_US, "smt.vmadot2us">;
136
+ def SMT_VMADOT3 : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_SS, "smt.vmadot3">;
137
+ def SMT_VMADOT3U : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_UU, "smt.vmadot3u">;
138
+ def SMT_VMADOT3SU : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_SU, "smt.vmadot3su">;
139
+ def SMT_VMADOT3US : RVInstSMTVDotSlide<SMT_VDot_Slide3, SMT_VDot_US, "smt.vmadot3us">;
138
140
}
139
141
} // DecoderNamespace = "XSMT"
0 commit comments