@@ -232,13 +232,13 @@ struct LanaiOperand : public MCParsedAsmOperand {
232
232
233
233
// Symbolic reference expression
234
234
if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value ))
235
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_HI;
235
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_HI;
236
236
237
237
// Binary expression
238
238
if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value ))
239
239
if (const LanaiMCExpr *SymbolRefExpr =
240
240
dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS ()))
241
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_HI;
241
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_HI;
242
242
243
243
return false ;
244
244
}
@@ -269,13 +269,13 @@ struct LanaiOperand : public MCParsedAsmOperand {
269
269
270
270
// Symbolic reference expression
271
271
if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value ))
272
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_LO;
272
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_LO;
273
273
274
274
// Binary expression
275
275
if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value ))
276
276
if (const LanaiMCExpr *SymbolRefExpr =
277
277
dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS ()))
278
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_LO;
278
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_LO;
279
279
280
280
return false ;
281
281
}
@@ -293,13 +293,13 @@ struct LanaiOperand : public MCParsedAsmOperand {
293
293
294
294
// Symbolic reference expression
295
295
if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value ))
296
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_LO;
296
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_LO;
297
297
298
298
// Binary expression
299
299
if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value ))
300
300
if (const LanaiMCExpr *SymbolRefExpr =
301
301
dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS ()))
302
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_LO;
302
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_LO;
303
303
304
304
return false ;
305
305
}
@@ -340,7 +340,7 @@ struct LanaiOperand : public MCParsedAsmOperand {
340
340
341
341
// Symbolic reference expression
342
342
if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Imm.Value ))
343
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_None;
343
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_None;
344
344
if (const MCSymbolRefExpr *SymbolRefExpr =
345
345
dyn_cast<MCSymbolRefExpr>(Imm.Value )) {
346
346
return SymbolRefExpr->getKind () == MCSymbolRefExpr::VK_None;
@@ -350,7 +350,7 @@ struct LanaiOperand : public MCParsedAsmOperand {
350
350
if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Imm.Value )) {
351
351
if (const LanaiMCExpr *SymbolRefExpr =
352
352
dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS ()))
353
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_None;
353
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_None;
354
354
if (const MCSymbolRefExpr *SymbolRefExpr =
355
355
dyn_cast<MCSymbolRefExpr>(BinaryExpr->getLHS ()))
356
356
return SymbolRefExpr->getKind () == MCSymbolRefExpr::VK_None;
@@ -468,14 +468,14 @@ struct LanaiOperand : public MCParsedAsmOperand {
468
468
#ifndef NDEBUG
469
469
const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(getImm ());
470
470
assert (SymbolRefExpr &&
471
- SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_LO);
471
+ SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_LO);
472
472
#endif
473
473
Inst.addOperand (MCOperand::createExpr (getImm ()));
474
474
} else if (isa<MCBinaryExpr>(getImm ())) {
475
475
#ifndef NDEBUG
476
476
const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(getImm ());
477
477
assert (BinaryExpr && isa<LanaiMCExpr>(BinaryExpr->getLHS ()) &&
478
- cast<LanaiMCExpr>(BinaryExpr->getLHS ())->getKind () ==
478
+ cast<LanaiMCExpr>(BinaryExpr->getLHS ())->getSpecifier () ==
479
479
LanaiMCExpr::VK_Lanai_ABS_LO);
480
480
#endif
481
481
Inst.addOperand (MCOperand::createExpr (getImm ()));
@@ -499,14 +499,14 @@ struct LanaiOperand : public MCParsedAsmOperand {
499
499
#ifndef NDEBUG
500
500
const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(getImm ());
501
501
assert (SymbolRefExpr &&
502
- SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_ABS_HI);
502
+ SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_ABS_HI);
503
503
#endif
504
504
Inst.addOperand (MCOperand::createExpr (getImm ()));
505
505
} else if (isa<MCBinaryExpr>(getImm ())) {
506
506
#ifndef NDEBUG
507
507
const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(getImm ());
508
508
assert (BinaryExpr && isa<LanaiMCExpr>(BinaryExpr->getLHS ()) &&
509
- cast<LanaiMCExpr>(BinaryExpr->getLHS ())->getKind () ==
509
+ cast<LanaiMCExpr>(BinaryExpr->getLHS ())->getSpecifier () ==
510
510
LanaiMCExpr::VK_Lanai_ABS_HI);
511
511
#endif
512
512
Inst.addOperand (MCOperand::createExpr (getImm ()));
@@ -530,7 +530,7 @@ struct LanaiOperand : public MCParsedAsmOperand {
530
530
#ifndef NDEBUG
531
531
const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(getImm ());
532
532
assert (SymbolRefExpr &&
533
- SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_None);
533
+ SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_None);
534
534
#endif
535
535
Inst.addOperand (MCOperand::createExpr (getImm ()));
536
536
} else if (isa<MCSymbolRefExpr>(getImm ())) {
@@ -545,7 +545,7 @@ struct LanaiOperand : public MCParsedAsmOperand {
545
545
#ifndef NDEBUG
546
546
const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(getImm ());
547
547
assert (BinaryExpr && isa<LanaiMCExpr>(BinaryExpr->getLHS ()) &&
548
- cast<LanaiMCExpr>(BinaryExpr->getLHS ())->getKind () ==
548
+ cast<LanaiMCExpr>(BinaryExpr->getLHS ())->getSpecifier () ==
549
549
LanaiMCExpr::VK_Lanai_None);
550
550
#endif
551
551
Inst.addOperand (MCOperand::createExpr (getImm ()));
@@ -737,7 +737,7 @@ std::unique_ptr<LanaiOperand> LanaiAsmParser::parseIdentifier() {
737
737
SMLoc Start = Parser.getTok ().getLoc ();
738
738
SMLoc End = SMLoc::getFromPointer (Parser.getTok ().getLoc ().getPointer () - 1 );
739
739
const MCExpr *Res, *RHS = nullptr ;
740
- LanaiMCExpr::VariantKind Kind = LanaiMCExpr::VK_Lanai_None;
740
+ LanaiMCExpr::Spec Kind = LanaiMCExpr::VK_Lanai_None;
741
741
742
742
if (Lexer.getKind () != AsmToken::Identifier)
743
743
return nullptr ;
@@ -866,15 +866,15 @@ bool shouldBeSls(const LanaiOperand &Op) {
866
866
// The instruction should be encoded as an SLS if the operand is a symbolic
867
867
// reference with no variant.
868
868
if (const LanaiMCExpr *SymbolRefExpr = dyn_cast<LanaiMCExpr>(Op.getImm ()))
869
- return SymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_None;
869
+ return SymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_None;
870
870
// The instruction should be encoded as an SLS if the operand is a binary
871
871
// expression with the left-hand side being a symbolic reference with no
872
872
// variant.
873
873
if (const MCBinaryExpr *BinaryExpr = dyn_cast<MCBinaryExpr>(Op.getImm ())) {
874
874
const LanaiMCExpr *LHSSymbolRefExpr =
875
875
dyn_cast<LanaiMCExpr>(BinaryExpr->getLHS ());
876
876
return (LHSSymbolRefExpr &&
877
- LHSSymbolRefExpr->getKind () == LanaiMCExpr::VK_Lanai_None);
877
+ LHSSymbolRefExpr->getSpecifier () == LanaiMCExpr::VK_Lanai_None);
878
878
}
879
879
return false ;
880
880
}
0 commit comments