@@ -216,16 +216,25 @@ class fpimm_pos_inf<ValueType vt>
216
216
217
217
// Utility class to wrap up information about a register and DAG type for more
218
218
// convenient iteration and parameterization
219
- class RegTyInfo<ValueType ty, NVPTXRegClass rc, Operand imm> {
219
+ class RegTyInfo<ValueType ty, NVPTXRegClass rc, Operand imm, SDNode imm_node,
220
+ bit supports_imm = 1> {
220
221
ValueType Ty = ty;
221
222
NVPTXRegClass RC = rc;
222
223
Operand Imm = imm;
224
+ SDNode ImmNode = imm_node;
225
+ bit SupportsImm = supports_imm;
223
226
int Size = ty.Size;
224
227
}
225
228
226
- def I16RT : RegTyInfo<i16, Int16Regs, i16imm>;
227
- def I32RT : RegTyInfo<i32, Int32Regs, i32imm>;
228
- def I64RT : RegTyInfo<i64, Int64Regs, i64imm>;
229
+ def I16RT : RegTyInfo<i16, Int16Regs, i16imm, imm>;
230
+ def I32RT : RegTyInfo<i32, Int32Regs, i32imm, imm>;
231
+ def I64RT : RegTyInfo<i64, Int64Regs, i64imm, imm>;
232
+
233
+ def F32RT : RegTyInfo<f32, Float32Regs, f32imm, fpimm>;
234
+ def F64RT : RegTyInfo<f64, Float64Regs, f64imm, fpimm>;
235
+ def F16RT : RegTyInfo<f16, Int16Regs, f16imm, fpimm, supports_imm = 0>;
236
+ def BF16RT : RegTyInfo<bf16, Int16Regs, bf16imm, fpimm, supports_imm = 0>;
237
+
229
238
230
239
// Template for instructions which take three int64, int32, or int16 args.
231
240
// The instructions are named "<OpcStr><Width>" (e.g. "add.s64").
0 commit comments