diff options
Diffstat (limited to 'lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 6f2e85e553..cf86a44d1b 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -295,6 +295,13 @@ private: // ".align{,32}", ".p2align{,w,l}" bool ParseDirectiveAlign(bool IsPow2, unsigned ValueSize); + // @LOCALMOD-BEGIN + bool ParseDirectiveBundleLock(); + bool ParseDirectiveBundleUnlock(); + bool ParseDirectiveBundleAlignStart(); + bool ParseDirectiveBundleAlignEnd(); + // @LOCALMOD-END + /// ParseDirectiveSymbolAttribute - Parse a directive like ".globl" which /// accepts a single symbol (which should be a label or an external). bool ParseDirectiveSymbolAttribute(MCSymbolAttr Attr); @@ -1283,6 +1290,17 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) { if (IDVal == ".p2alignl") return ParseDirectiveAlign(/*IsPow2=*/true, /*ExprSize=*/4); + // @LOCALMOD-BEGIN + if (IDVal == ".bundle_lock") + return ParseDirectiveBundleLock(); + if (IDVal == ".bundle_unlock") + return ParseDirectiveBundleUnlock(); + if (IDVal == ".bundle_align_start") + return ParseDirectiveBundleAlignStart(); + if (IDVal == ".bundle_align_end") + return ParseDirectiveBundleAlignEnd(); + // @LOCALMOD-END + if (IDVal == ".org") return ParseDirectiveOrg(); @@ -2404,6 +2422,50 @@ bool AsmParser::ParseDirectiveAlign(bool IsPow2, unsigned ValueSize) { return false; } +// @LOCALMOD-BEGIN +bool AsmParser::ParseDirectiveBundleLock() { + CheckForValidSection(); + + if (getLexer().isNot(AsmToken::EndOfStatement)) + return TokError("unexpected token in '.bundle_lock' directive"); + Lex(); + getStreamer().EmitBundleLock(); + return false; +} + +bool AsmParser::ParseDirectiveBundleUnlock() { + CheckForValidSection(); + + if (getLexer().isNot(AsmToken::EndOfStatement)) + return TokError("unexpected token in '.bundle_unlock' directive"); + Lex(); + getStreamer().EmitBundleUnlock(); + return false; +} + +bool AsmParser::ParseDirectiveBundleAlignStart() { + CheckForValidSection(); + + if (getLexer().isNot(AsmToken::EndOfStatement)) + return TokError("unexpected token in '.bundle_align_start' directive"); + Lex(); + getStreamer().EmitBundleAlignStart(); + return false; +} + +bool AsmParser::ParseDirectiveBundleAlignEnd() { + CheckForValidSection(); + + if (getLexer().isNot(AsmToken::EndOfStatement)) + return TokError("unexpected token in '.bundle_align_end' directive"); + Lex(); + getStreamer().EmitBundleAlignEnd(); + return false; +} + +// @LOCALMOD-END + + /// ParseDirectiveSymbolAttribute /// ::= { ".globl", ".weak", ... } [ identifier ( , identifier )* ] bool AsmParser::ParseDirectiveSymbolAttribute(MCSymbolAttr Attr) { |