File tree 3 files changed +5
-4
lines changed
lib/Target/RISCV/AsmParser
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2079,9 +2079,6 @@ ParseStatus RISCVAsmParser::parseBareSymbol(OperandVector &Operands) {
2079
2079
2080
2080
SMLoc E = SMLoc::getFromPointer (S.getPointer () + Identifier.size ());
2081
2081
2082
- if (Identifier.consume_back (" @plt" ))
2083
- return Error (getLoc (), " '@plt' operand not valid for instruction" );
2084
-
2085
2082
MCSymbol *Sym = getContext ().getOrCreateSymbol (Identifier);
2086
2083
2087
2084
if (Sym->isVariable ()) {
@@ -2129,8 +2126,9 @@ ParseStatus RISCVAsmParser::parseCallSymbol(OperandVector &Operands) {
2129
2126
Lex ();
2130
2127
Lex ();
2131
2128
StringRef PLT;
2129
+ SMLoc Loc = getLoc ();
2132
2130
if (getParser ().parseIdentifier (PLT) || PLT != " plt" )
2133
- return ParseStatus::Failure ;
2131
+ return Error (Loc, " @ (except the deprecated/ignored @plt) is disallowed " ) ;
2134
2132
} else if (!getLexer ().peekTok ().is (AsmToken::EndOfStatement)) {
2135
2133
// Avoid parsing the register in `call rd, foo` as a call symbol.
2136
2134
return ParseStatus::NoMatch;
Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ call %lo(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
10
10
call %hi(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
11
11
call %lo(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
12
12
call foo , bar # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
13
+ call foo@pls # CHECK: : [[ @LINE ]] : 10 : error: @ (except the deprecated/ignored @plt) is disallowed
14
+ call foo@ 3 # CHECK: : [[ @LINE ]] : 10 : error: @ (except the deprecated/ignored @plt) is disallowed
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ tail %hi(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
10
10
tail %lo( 1234 ) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
11
11
tail %hi(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
12
12
tail %lo(foo) # CHECK: : [[ @LINE ]] : 6 : error: operand must be a bare symbol name
13
+ tail foo@pls # CHECK: : [[ @LINE ]] : 10 : error: @ (except the deprecated/ignored @plt) is disallowed
You can’t perform that action at this time.
0 commit comments