mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Add support for a fill value in the .zero directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1498,12 +1498,19 @@ bool AsmParser::ParseDirectiveZero() {
|
||||
if (ParseAbsoluteExpression(NumBytes))
|
||||
return true;
|
||||
|
||||
int64_t Val = 0;
|
||||
if (getLexer().is(AsmToken::Comma)) {
|
||||
Lex();
|
||||
if (ParseAbsoluteExpression(Val))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement))
|
||||
return TokError("unexpected token in '.zero' directive");
|
||||
|
||||
Lex();
|
||||
|
||||
getStreamer().EmitFill(NumBytes, 0, DEFAULT_ADDRSPACE);
|
||||
getStreamer().EmitFill(NumBytes, Val, DEFAULT_ADDRSPACE);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user