bool ParseDirectiveEndr(SMLoc DirectiveLoc); // ".endr"
// "_emit"
- bool ParseDirectiveEmit(SMLoc DirectiveLoc, ParseStatementInfo &Info);
+ bool ParseDirectiveEmit(SMLoc DirectiveLoc, ParseStatementInfo &Info,
+ size_t len);
void initializeDirectiveKindMap();
};
// _emit or __emit
if (ParsingInlineAsm && (IDVal == "_emit" || IDVal == "__emit"))
- return ParseDirectiveEmit(IDLoc, Info);
+ return ParseDirectiveEmit(IDLoc, Info, IDVal.size());
CheckForValidSection();
return false;
}
-bool AsmParser::ParseDirectiveEmit(SMLoc IDLoc, ParseStatementInfo &Info) {
+bool AsmParser::ParseDirectiveEmit(SMLoc IDLoc, ParseStatementInfo &Info, size_t len) {
const MCExpr *Value;
SMLoc ExprLoc = getLexer().getLoc();
if (ParseExpression(Value))
if (!isUIntN(8, IntValue) && !isIntN(8, IntValue))
return Error(ExprLoc, "literal value out of range for directive");
- Info.AsmRewrites->push_back(AsmRewrite(AOK_Emit, IDLoc, 5));
+ Info.AsmRewrites->push_back(AsmRewrite(AOK_Emit, IDLoc, len));
return false;
}