@@ -74,6 +74,7 @@ class CVInstMac<bits<7> funct7, bits<3> funct3, string opcodestr>
74
74
: RVInstR<funct7, funct3, OPC_CUSTOM_1,
75
75
(outs GPR:$rd_wb), (ins GPR:$rd, GPR:$rs1, GPR:$rs2),
76
76
opcodestr, "$rd, $rs1, $rs2"> {
77
+ let Constraints = "$rd = $rd_wb";
77
78
let DecoderNamespace = "XCV";
78
79
}
79
80
@@ -90,14 +91,16 @@ class CVInstMacMulN<bits<2> funct2, bits<3> funct3, dag outs, dag ins,
90
91
91
92
class CVInstMacN<bits<2> funct2, bits<3> funct3, string opcodestr>
92
93
: CVInstMacMulN<funct2, funct3, (outs GPR:$rd_wb),
93
- (ins GPR:$rd, GPR:$rs1, GPR:$rs2, uimm5:$imm5), opcodestr>;
94
+ (ins GPR:$rd, GPR:$rs1, GPR:$rs2, uimm5:$imm5), opcodestr> {
95
+ let Constraints = "$rd = $rd_wb";
96
+ }
94
97
95
98
class CVInstMulN<bits<2> funct2, bits<3> funct3, string opcodestr>
96
99
: CVInstMacMulN<funct2, funct3, (outs GPR:$rd),
97
100
(ins GPR:$rs1, GPR:$rs2, uimm5:$imm5), opcodestr>;
98
101
99
102
let Predicates = [HasVendorXCVmac, IsRV32], hasSideEffects = 0, mayLoad = 0,
100
- mayStore = 0, Constraints = "$rd = $rd_wb" in {
103
+ mayStore = 0 in {
101
104
// 32x32 bit macs
102
105
def CV_MAC : CVInstMac<0b1001000, 0b011, "cv.mac">,
103
106
Sched<[]>;
@@ -179,7 +182,9 @@ let DecoderNamespace = "XCV" in {
179
182
180
183
class CVInstAluRRNR<bits<7> funct7, bits<3> funct3, string opcodestr>
181
184
: RVInstR<funct7, funct3, OPC_CUSTOM_1, (outs GPR:$rd_wb),
182
- (ins GPR:$rd, GPR:$rs1, GPR:$rs2), opcodestr, "$rd, $rs1, $rs2">;
185
+ (ins GPR:$rd, GPR:$rs1, GPR:$rs2), opcodestr, "$rd, $rs1, $rs2"> {
186
+ let Constraints = "$rd = $rd_wb";
187
+ }
183
188
184
189
class CVInstAluRI<bits<7> funct7, bits<3> funct3, string opcodestr>
185
190
: RVInstIBase<funct3, OPC_CUSTOM_1, (outs GPR:$rd),
@@ -254,8 +259,7 @@ let Predicates = [HasVendorXCValu, IsRV32],
254
259
// hasSideEffects = 0, mayLoad = 0, mayStore = 0
255
260
256
261
let Predicates = [HasVendorXCValu, IsRV32],
257
- hasSideEffects = 0, mayLoad = 0, mayStore = 0,
258
- Constraints = "$rd = $rd_wb" in {
262
+ hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
259
263
def CV_ADDNR : CVInstAluRRNR<0b1000000, 0b011, "cv.addnr">,
260
264
Sched<[]>;
261
265
def CV_ADDUNR : CVInstAluRRNR<0b1000001, 0b011, "cv.addunr">,
@@ -275,7 +279,6 @@ let Predicates = [HasVendorXCValu, IsRV32],
275
279
276
280
} // Predicates = [HasVendorXCValu, IsRV32],
277
281
// hasSideEffects = 0, mayLoad = 0, mayStore = 0,
278
- // Constraints = "$rd = $rd_wb"
279
282
280
283
let Predicates = [HasVendorXCValu, IsRV32] in {
281
284
def : MnemonicAlias<"cv.slet", "cv.sle">;
0 commit comments