summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-09-25 16:30:16 +0000
committerBob Wilson <bob.wilson@apple.com>2012-09-25 16:30:16 +0000
commit24719e32365f1e6b5cdd327d229c4e15a1f4f35b (patch)
tree0db625c96ebab8ed383e47729ae66b8723e3cccd /clang/lib
parente6a82d9018a9911cf1957d18de7624b9d2d5b28f (diff)
downloadbcm5719-llvm-24719e32365f1e6b5cdd327d229c4e15a1f4f35b.tar.gz
bcm5719-llvm-24719e32365f1e6b5cdd327d229c4e15a1f4f35b.zip
Examine the last, not the first, instruction from the MC matcher.
If an MS-style inline asm is matched to multiple instructions, e.g., with a a WAIT-prefix, then we need to examine the operands of the last instruction instruction, not the prefix instruction. llvm-svn: 164608
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaStmtAsm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp
index 922777e07de..792a91332ee 100644
--- a/clang/lib/Sema/SemaStmtAsm.cpp
+++ b/clang/lib/Sema/SemaStmtAsm.cpp
@@ -567,7 +567,7 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc,
if (HadError) { DEF_SIMPLE_MSASM(EmptyAsmStr); return Owned(NS); }
// Get the instruction descriptor.
- llvm::MCInst Inst = Instrs[0];
+ llvm::MCInst Inst = Instrs.back();
const llvm::MCInstrInfo *MII = TheTarget->createMCInstrInfo();
const llvm::MCInstrDesc &Desc = MII->get(Inst.getOpcode());
llvm::MCInstPrinter *IP =
OpenPOWER on IntegriCloud