diff options
author | Eric Astor <epastor@google.com> | 2020-01-09 14:01:55 -0500 |
---|---|---|
committer | Eric Astor <epastor@google.com> | 2020-01-09 14:55:03 -0500 |
commit | 1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb (patch) | |
tree | 10b597f4379943fee8e5d36e64ac774e0ce81504 /llvm/utils/TableGen/InstrInfoEmitter.cpp | |
parent | 3408940f736955402b7676e3b8bab6906cc82637 (diff) | |
download | bcm5719-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/utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/InstrInfoEmitter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp index 300ba36a700..3983252b0e0 100644 --- a/llvm/utils/TableGen/InstrInfoEmitter.cpp +++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp @@ -164,6 +164,11 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) { if (Op.Rec->isSubClassOf("OptionalDefOperand")) Res += "|(1<<MCOI::OptionalDef)"; + // Branch target operands. Check to see if the original unexpanded + // operand was of type BranchTargetOperand. + if (Op.Rec->isSubClassOf("BranchTargetOperand")) + Res += "|(1<<MCOI::BranchTarget)"; + // Fill in operand type. Res += ", "; assert(!Op.OperandType.empty() && "Invalid operand type."); |