aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-09-03 20:31:23 +0000
committerChad Rosier <mcrosier@apple.com>2012-09-03 20:31:23 +0000
commit2cc97def7434345e399e4f5f3f2001d6d7a93c6f (patch)
treef081444ccf89e0c10a90ab183533c23cd1e034a4 /lib
parentefeaae8578ce9173a47f9e3fa5c44b90ae60c5ab (diff)
downloadexternal_llvm-2cc97def7434345e399e4f5f3f2001d6d7a93c6f.zip
external_llvm-2cc97def7434345e399e4f5f3f2001d6d7a93c6f.tar.gz
external_llvm-2cc97def7434345e399e4f5f3f2001d6d7a93c6f.tar.bz2
[ms-inline asm] Asm operands can map to one or more MCOperands. Therefore, add
the NumMCOperands argument to the GetMCInstOperandNum() function that is set to the number of MCOperands this asm operand mapped to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp4
-rw-r--r--lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp5
-rw-r--r--lib/Target/Mips/AsmParser/MipsAsmParser.cpp5
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp5
4 files changed, 11 insertions, 8 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index bdb20e8..51ba3c3 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -265,8 +265,8 @@ public:
unsigned GetMCInstOperandNum(unsigned Kind, MCInst &Inst,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- unsigned OperandNum) {
- return GetMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum);
+ unsigned OperandNum, unsigned &NumMCOperands) {
+ return GetMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum, NumMCOperands);
}
};
} // end anonymous namespace
diff --git a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
index e81943c..6a63f17 100644
--- a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
+++ b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
@@ -58,8 +58,9 @@ class MBlazeAsmParser : public MCTargetAsmParser {
unsigned GetMCInstOperandNum(unsigned Kind, MCInst &Inst,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- unsigned OperandNum) {
- return GetMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum);
+ unsigned OperandNum, unsigned &NumMCOperands) {
+ return GetMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum,
+ NumMCOperands);
}
public:
diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index f463b77..c33c4d2 100644
--- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -40,7 +40,7 @@ class MipsAsmParser : public MCTargetAsmParser {
unsigned GetMCInstOperandNum(unsigned Kind, MCInst &Inst,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- unsigned OperandNum);
+ unsigned OperandNum, unsigned &NumMCOperands);
public:
MipsAsmParser(MCSubtargetInfo &sti, MCAsmParser &parser)
@@ -104,11 +104,12 @@ public:
unsigned MipsAsmParser::
GetMCInstOperandNum(unsigned Kind, MCInst &Inst,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- unsigned OperandNum) {
+ unsigned OperandNum, unsigned &NumMCOperands) {
assert (0 && "GetMCInstOperandNum() not supported by the Mips target.");
// The Mips backend doesn't currently include the matcher implementation, so
// the GetMCInstOperandNumImpl() is undefined. This is a temporary
// work around.
+ NumMCOperands = 0;
return 0;
}
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 6d6e7d1..baf4589 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -75,8 +75,9 @@ private:
unsigned GetMCInstOperandNum(unsigned Kind, MCInst &Inst,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- unsigned OperandNum) {
- return GetMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum);
+ unsigned OperandNum, unsigned &NumMCOperands) {
+ return GetMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum,
+ NumMCOperands);
}
/// isSrcOp - Returns true if operand is either (%rsi) or %ds:%(rsi)