@@ -109,61 +109,52 @@ class SWPFormat<dag outs, dag ins, string opcodestr, string argstr>
109
109
110
110
let Predicates = [HasVendorXMIPSCMove], hasSideEffects = 0, mayLoad = 0, mayStore = 0,
111
111
DecoderNamespace = "Xmipscmove" in {
112
- def CCMOV : RVInstR4<0b11, 0b011, OPC_CUSTOM_0, (outs GPR:$rd),
113
- (ins GPR:$rs1, GPR:$rs2, GPR:$rs3),
114
- "mips.ccmov", "$rd, $rs2, $rs1, $rs3">,
115
- Sched<[]>;
112
+ def MIPS_CCMOV : RVInstR4<0b11, 0b011, OPC_CUSTOM_0, (outs GPR:$rd),
113
+ (ins GPR:$rs1, GPR:$rs2, GPR:$rs3),
114
+ "mips.ccmov", "$rd, $rs2, $rs1, $rs3">,
115
+ Sched<[]>;
116
116
}
117
117
118
118
let Predicates = [UseCCMovInsn] in {
119
119
def : Pat<(select (XLenVT (setne (XLenVT GPR:$rs2), (XLenVT 0))),
120
120
(XLenVT GPR:$rs1), (XLenVT GPR:$rs3)),
121
- (CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;
121
+ (MIPS_CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;
122
122
def : Pat<(select (XLenVT (setne (XLenVT GPR:$x), (XLenVT simm12_plus1:$y))),
123
123
(XLenVT GPR:$rs1), (XLenVT GPR:$rs3)),
124
- (CCMOV GPR:$rs1, (ADDI GPR:$x, (NegImm simm12_plus1:$y)), GPR:$rs3)>;
124
+ (MIPS_CCMOV GPR:$rs1, (ADDI GPR:$x, (NegImm simm12_plus1:$y)), GPR:$rs3)>;
125
125
def : Pat<(select (XLenVT (setne (XLenVT GPR:$x), (XLenVT GPR:$y))),
126
126
(XLenVT GPR:$rs1), (XLenVT GPR:$rs3)),
127
- (CCMOV GPR:$rs1, (XOR GPR:$x, GPR:$y), GPR:$rs3)>;
127
+ (MIPS_CCMOV GPR:$rs1, (XOR GPR:$x, GPR:$y), GPR:$rs3)>;
128
128
def : Pat<(select (XLenVT (seteq (XLenVT GPR:$rs2), (XLenVT 0))),
129
129
(XLenVT GPR:$rs3), (XLenVT GPR:$rs1)),
130
- (CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;
130
+ (MIPS_CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;
131
131
def : Pat<(select (XLenVT (seteq (XLenVT GPR:$x), (XLenVT simm12_plus1:$y))),
132
132
(XLenVT GPR:$rs3), (XLenVT GPR:$rs1)),
133
- (CCMOV GPR:$rs1, (ADDI GPR:$x, (NegImm simm12_plus1:$y)), GPR:$rs3)>;
133
+ (MIPS_CCMOV GPR:$rs1, (ADDI GPR:$x, (NegImm simm12_plus1:$y)), GPR:$rs3)>;
134
134
def : Pat<(select (XLenVT (seteq (XLenVT GPR:$x), (XLenVT GPR:$y))),
135
135
(XLenVT GPR:$rs3), (XLenVT GPR:$rs1)),
136
- (CCMOV GPR:$rs1, (XOR GPR:$x, GPR:$y), GPR:$rs3)>;
136
+ (MIPS_CCMOV GPR:$rs1, (XOR GPR:$x, GPR:$y), GPR:$rs3)>;
137
137
def : Pat<(select (XLenVT GPR:$rs2), (XLenVT GPR:$rs1), (XLenVT GPR:$rs3)),
138
- (CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;
138
+ (MIPS_CCMOV GPR:$rs1, GPR:$rs2, GPR:$rs3)>;
139
139
}
140
140
141
141
let Predicates = [HasVendorXMIPSLSP], hasSideEffects = 0,
142
142
DecoderNamespace = "Xmipslsp" in {
143
-
144
- def LWP : LWPFormat<(outs GPR:$rd1, GPR:$rd2), (ins GPR:$rs1, uimm7_lsb00:$imm7),
145
- "mips.lwp", "$rd1, $rd2, ${imm7}(${rs1})">,
146
- Sched<[WriteLDW, WriteLDW, ReadMemBase]> {
147
- let mayLoad = 1;
148
- let mayStore = 0;
149
- }
150
- def LDP : LDPFormat<(outs GPR:$rd1, GPR:$rd2), (ins GPR:$rs1, uimm7_lsb000:$imm7),
151
- "mips.ldp", "$rd1, $rd2, ${imm7}(${rs1})">,
152
- Sched<[WriteLDD, WriteLDD, ReadMemBase]> {
153
- let mayLoad = 1;
154
- let mayStore = 0;
155
- }
156
- def SWP : SWPFormat<(outs), (ins GPR:$rs2, GPR:$rs3, GPR:$rs1, uimm7_lsb00:$imm7),
157
- "mips.swp", "$rs2, $rs3, ${imm7}(${rs1})">,
158
- Sched<[WriteSTW, ReadStoreData, ReadStoreData, ReadMemBase]> {
159
- let mayLoad = 0;
160
- let mayStore = 1;
161
- }
162
- def SDP : SDPFormat<(outs), (ins GPR:$rs2, GPR:$rs3, GPR:$rs1, uimm7_lsb000:$imm7),
163
- "mips.sdp", "$rs2, $rs3, ${imm7}(${rs1})">,
164
- Sched<[WriteSTD, ReadStoreData, ReadStoreData, ReadMemBase]> {
165
- let mayLoad = 0;
166
- let mayStore = 1;
167
- }
168
-
169
- }
143
+ let mayLoad = 1, mayStore = 0 in {
144
+ def MIPS_LWP : LWPFormat<(outs GPR:$rd1, GPR:$rd2), (ins GPR:$rs1, uimm7_lsb00:$imm7),
145
+ "mips.lwp", "$rd1, $rd2, ${imm7}(${rs1})">,
146
+ Sched<[WriteLDW, WriteLDW, ReadMemBase]>;
147
+ def MIPS_LDP : LDPFormat<(outs GPR:$rd1, GPR:$rd2), (ins GPR:$rs1, uimm7_lsb000:$imm7),
148
+ "mips.ldp", "$rd1, $rd2, ${imm7}(${rs1})">,
149
+ Sched<[WriteLDD, WriteLDD, ReadMemBase]>;
150
+ } // mayLoad = 1, mayStore = 0
151
+
152
+ let mayLoad = 0, mayStore = 1 in {
153
+ def MIPS_SWP : SWPFormat<(outs), (ins GPR:$rs2, GPR:$rs3, GPR:$rs1, uimm7_lsb00:$imm7),
154
+ "mips.swp", "$rs2, $rs3, ${imm7}(${rs1})">,
155
+ Sched<[WriteSTW, ReadStoreData, ReadStoreData, ReadMemBase]>;
156
+ def MIPS_SDP : SDPFormat<(outs), (ins GPR:$rs2, GPR:$rs3, GPR:$rs1, uimm7_lsb000:$imm7),
157
+ "mips.sdp", "$rs2, $rs3, ${imm7}(${rs1})">,
158
+ Sched<[WriteSTD, ReadStoreData, ReadStoreData, ReadMemBase]>;
159
+ } // mayLoad = 0, mayStore = 1
160
+ } // Predicates = [HasVendorXMIPSLSP], hasSideEffects = 0, DecoderNamespace = "Xmipslsp"
0 commit comments