summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorEric Astor <epastor@google.com>2020-01-09 14:01:55 -0500
committerEric Astor <epastor@google.com>2020-01-09 14:55:03 -0500
commit1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb (patch)
tree10b597f4379943fee8e5d36e64ac774e0ce81504 /llvm/lib/MC/MCParser/AsmParser.cpp
parent3408940f736955402b7676e3b8bab6906cc82637 (diff)
downloadbcm5719-llvm-1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb.tar.gz
bcm5719-llvm-1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb.zip
[ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.
Summary: Extend D71677 to apply to all branch-target operands, rather than special-casing call instructions. Also add a regression test for llvm.org/PR44272, since this finishes fixing it. Reviewers: thakis, rnk Reviewed By: thakis Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D72417
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index dc8132b627a..94a44c1f93b 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -5845,7 +5845,7 @@ bool AsmParser::parseMSInlineAsm(
InputDecls.push_back(OpDecl);
InputDeclsAddressOf.push_back(Operand.needAddressOf());
InputConstraints.push_back(Constraint.str());
- if (Operand.isCallOperand())
+ if (Desc.OpInfo[i - 1].isBranchTarget())
AsmStrRewrites.emplace_back(AOK_CallInput, Start, SymName.size());
else
AsmStrRewrites.emplace_back(AOK_Input, Start, SymName.size());
OpenPOWER on IntegriCloud