@@ -218,50 +218,61 @@ def GPRMemAtomic : RegisterOperand<GPR> {
218
218
def grlenimm : Operand<GRLenVT>;
219
219
def imm32 : Operand<GRLenVT> {
220
220
let ParserMatchClass = ImmAsmOperand<"", 32, "">;
221
+ let OperandType = "OPERAND_IMMEDIATE";
221
222
}
222
223
223
224
def uimm1 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<1>(Imm);}]>{
224
225
let ParserMatchClass = UImmAsmOperand<1>;
226
+ let OperandType = "OPERAND_IMMEDIATE";
225
227
}
226
228
227
229
def uimm2 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<2>(Imm);}]> {
228
230
let ParserMatchClass = UImmAsmOperand<2>;
231
+ let OperandType = "OPERAND_IMMEDIATE";
229
232
}
230
233
231
234
def uimm2_plus1 : Operand<GRLenVT>,
232
235
ImmLeaf<GRLenVT, [{return isUInt<2>(Imm - 1);}]> {
233
236
let ParserMatchClass = UImmAsmOperand<2, "plus1">;
234
237
let EncoderMethod = "getImmOpValueSub1";
235
238
let DecoderMethod = "decodeUImmOperand<2, 1>";
239
+ let OperandType = "OPERAND_IMMEDIATE";
236
240
}
237
241
238
242
def uimm3 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<3>(Imm);}]> {
239
243
let ParserMatchClass = UImmAsmOperand<3>;
244
+ let OperandType = "OPERAND_IMMEDIATE";
240
245
}
241
246
242
247
def uimm4 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<4>(Imm);}]> {
243
248
let ParserMatchClass = UImmAsmOperand<4>;
249
+ let OperandType = "OPERAND_IMMEDIATE";
244
250
}
245
251
246
252
def uimm5 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<5>(Imm);}]> {
247
253
let ParserMatchClass = UImmAsmOperand<5>;
254
+ let OperandType = "OPERAND_IMMEDIATE";
248
255
}
249
256
250
257
def uimm6 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<6>(Imm);}]> {
251
258
let ParserMatchClass = UImmAsmOperand<6>;
259
+ let OperandType = "OPERAND_IMMEDIATE";
252
260
}
253
261
254
262
def uimm7 : Operand<GRLenVT> {
255
263
let ParserMatchClass = UImmAsmOperand<7>;
264
+ let OperandType = "OPERAND_IMMEDIATE";
256
265
}
257
266
258
267
def uimm8 : Operand<GRLenVT>, ImmLeaf<GRLenVT, [{return isUInt<8>(Imm);}]> {
259
268
let ParserMatchClass = UImmAsmOperand<8>;
269
+ let OperandType = "OPERAND_IMMEDIATE";
260
270
}
261
271
262
272
class UImm12Operand : Operand<GRLenVT>,
263
273
ImmLeaf <GRLenVT, [{return isUInt<12>(Imm);}]> {
264
274
let DecoderMethod = "decodeUImmOperand<12>";
275
+ let OperandType = "OPERAND_IMMEDIATE";
265
276
}
266
277
267
278
def uimm12 : UImm12Operand {
@@ -275,56 +286,66 @@ def uimm12_ori : UImm12Operand {
275
286
def uimm14 : Operand<GRLenVT>,
276
287
ImmLeaf <GRLenVT, [{return isUInt<14>(Imm);}]> {
277
288
let ParserMatchClass = UImmAsmOperand<14>;
289
+ let OperandType = "OPERAND_IMMEDIATE";
278
290
}
279
291
280
292
def uimm15 : Operand<GRLenVT>,
281
293
ImmLeaf <GRLenVT, [{return isUInt<15>(Imm);}]> {
282
294
let ParserMatchClass = UImmAsmOperand<15>;
295
+ let OperandType = "OPERAND_IMMEDIATE";
283
296
}
284
297
285
298
def simm5 : Operand<GRLenVT> {
286
299
let ParserMatchClass = SImmAsmOperand<5>;
287
300
let DecoderMethod = "decodeSImmOperand<5>";
301
+ let OperandType = "OPERAND_IMMEDIATE";
288
302
}
289
303
290
304
def simm8 : Operand<GRLenVT> {
291
305
let ParserMatchClass = SImmAsmOperand<8>;
292
306
let DecoderMethod = "decodeSImmOperand<8>";
307
+ let OperandType = "OPERAND_IMMEDIATE";
293
308
}
294
309
295
310
foreach I = [1, 2, 3] in {
296
311
def simm8_lsl # I : Operand<GRLenVT> {
297
312
let ParserMatchClass = SImmAsmOperand<8, "lsl" # I>;
298
313
let EncoderMethod = "getImmOpValueAsr<" # I # ">";
299
314
let DecoderMethod = "decodeSImmOperand<8," # I # ">";
315
+ let OperandType = "OPERAND_IMMEDIATE";
300
316
}
301
317
}
302
318
303
319
def simm9_lsl3 : Operand<GRLenVT> {
304
320
let ParserMatchClass = SImmAsmOperand<9, "lsl3">;
305
321
let EncoderMethod = "getImmOpValueAsr<3>";
306
322
let DecoderMethod = "decodeSImmOperand<9, 3>";
323
+ let OperandType = "OPERAND_IMMEDIATE";
307
324
}
308
325
309
326
def simm10 : Operand<GRLenVT> {
310
327
let ParserMatchClass = SImmAsmOperand<10>;
328
+ let OperandType = "OPERAND_IMMEDIATE";
311
329
}
312
330
313
331
def simm10_lsl2 : Operand<GRLenVT> {
314
332
let ParserMatchClass = SImmAsmOperand<10, "lsl2">;
315
333
let EncoderMethod = "getImmOpValueAsr<2>";
316
334
let DecoderMethod = "decodeSImmOperand<10, 2>";
335
+ let OperandType = "OPERAND_IMMEDIATE";
317
336
}
318
337
319
338
def simm11_lsl1 : Operand<GRLenVT> {
320
339
let ParserMatchClass = SImmAsmOperand<11, "lsl1">;
321
340
let EncoderMethod = "getImmOpValueAsr<1>";
322
341
let DecoderMethod = "decodeSImmOperand<11, 1>";
342
+ let OperandType = "OPERAND_IMMEDIATE";
323
343
}
324
344
325
345
class SImm12Operand : Operand<GRLenVT>,
326
346
ImmLeaf <GRLenVT, [{return isInt<12>(Imm);}]> {
327
347
let DecoderMethod = "decodeSImmOperand<12>";
348
+ let OperandType = "OPERAND_IMMEDIATE";
328
349
}
329
350
330
351
def simm12 : SImm12Operand {
@@ -342,35 +363,41 @@ def simm12_lu52id : SImm12Operand {
342
363
def simm13 : Operand<GRLenVT> {
343
364
let ParserMatchClass = SImmAsmOperand<13>;
344
365
let DecoderMethod = "decodeSImmOperand<13>";
366
+ let OperandType = "OPERAND_IMMEDIATE";
345
367
}
346
368
347
369
def simm14_lsl2 : Operand<GRLenVT>,
348
370
ImmLeaf<GRLenVT, [{return isShiftedInt<14,2>(Imm);}]> {
349
371
let ParserMatchClass = SImmAsmOperand<14, "lsl2">;
350
372
let EncoderMethod = "getImmOpValueAsr<2>";
351
373
let DecoderMethod = "decodeSImmOperand<14, 2>";
374
+ let OperandType = "OPERAND_IMMEDIATE";
352
375
}
353
376
354
377
def simm16 : Operand<GRLenVT> {
355
378
let ParserMatchClass = SImmAsmOperand<16>;
356
379
let DecoderMethod = "decodeSImmOperand<16>";
380
+ let OperandType = "OPERAND_IMMEDIATE";
357
381
}
358
382
359
383
def simm16_lsl2 : Operand<GRLenVT>,
360
384
ImmLeaf<GRLenVT, [{return isInt<16>(Imm>>2);}]> {
361
385
let ParserMatchClass = SImmAsmOperand<16, "lsl2">;
362
386
let EncoderMethod = "getImmOpValueAsr<2>";
363
387
let DecoderMethod = "decodeSImmOperand<16, 2>";
388
+ let OperandType = "OPERAND_IMMEDIATE";
364
389
}
365
390
366
391
def simm16_lsl2_br : Operand<OtherVT> {
367
392
let ParserMatchClass = SImmAsmOperand<16, "lsl2">;
368
393
let EncoderMethod = "getImmOpValueAsr<2>";
369
394
let DecoderMethod = "decodeSImmOperand<16, 2>";
395
+ let OperandType = "OPERAND_IMMEDIATE";
370
396
}
371
397
372
398
class SImm20Operand : Operand<GRLenVT> {
373
399
let DecoderMethod = "decodeSImmOperand<20>";
400
+ let OperandType = "OPERAND_IMMEDIATE";
374
401
}
375
402
376
403
def simm20 : SImm20Operand {
@@ -397,6 +424,7 @@ def simm21_lsl2 : Operand<OtherVT> {
397
424
let ParserMatchClass = SImmAsmOperand<21, "lsl2">;
398
425
let EncoderMethod = "getImmOpValueAsr<2>";
399
426
let DecoderMethod = "decodeSImmOperand<21, 2>";
427
+ let OperandType = "OPERAND_IMMEDIATE";
400
428
}
401
429
402
430
def SImm26OperandB: AsmOperandClass {
@@ -412,6 +440,7 @@ def simm26_b : Operand<OtherVT> {
412
440
let ParserMatchClass = SImm26OperandB;
413
441
let EncoderMethod = "getImmOpValueAsr<2>";
414
442
let DecoderMethod = "decodeSImmOperand<26, 2>";
443
+ let OperandType = "OPERAND_IMMEDIATE";
415
444
}
416
445
417
446
def SImm26OperandBL: AsmOperandClass {
@@ -427,6 +456,7 @@ def simm26_symbol : Operand<GRLenVT> {
427
456
let ParserMatchClass = SImm26OperandBL;
428
457
let EncoderMethod = "getImmOpValueAsr<2>";
429
458
let DecoderMethod = "decodeSImmOperand<26, 2>";
459
+ let OperandType = "OPERAND_IMMEDIATE";
430
460
}
431
461
432
462
// A 32-bit signed immediate with the lowest 16 bits zeroed, suitable for
0 commit comments