summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorYunzhong Gao <Yunzhong.Gao@sony.com>2016-09-02 23:15:29 +0000
committerYunzhong Gao <Yunzhong.Gao@sony.com>2016-09-02 23:15:29 +0000
commit27ea29b3b74900be58b77eb148b61fe7f6d8d97f (patch)
tree0afe390aa690dcd3a1979db0db63912dd943335e /llvm/lib/MC/MCParser/AsmParser.cpp
parentb1000c39a0cbeee76cae796e53a1eb16854e633d (diff)
downloadbcm5719-llvm-27ea29b3b74900be58b77eb148b61fe7f6d8d97f.tar.gz
bcm5719-llvm-27ea29b3b74900be58b77eb148b61fe7f6d8d97f.zip
(LLVM part) Implement MASM-flavor intel syntax behavior for inline MS asm block:
1. 0xNN and NNh are accepted as valid hexadecimal numbers, but 0xNNh is not. 0xNN and NNh may come with optional U or L suffix. 2. NNb is accepted as a valid binary (base-2) number, but 0bNN is not. NNb may come with optional U or L suffix. Differential Revision: https://reviews.llvm.org/D22112 llvm-svn: 280555
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 03157671da1..43c88c96860 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -256,7 +256,10 @@ public:
const AsmToken &Lex() override;
- void setParsingInlineAsm(bool V) override { ParsingInlineAsm = V; }
+ void setParsingInlineAsm(bool V) override {
+ ParsingInlineAsm = V;
+ Lexer.setParsingMSInlineAsm(V);
+ }
bool isParsingInlineAsm() override { return ParsingInlineAsm; }
bool parseMSInlineAsm(void *AsmLoc, std::string &AsmString,
OpenPOWER on IntegriCloud