summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9e2aff8b6da1feac3c4b4bee2b933cd860b847c0 (patch)
tree4475fe1077563db5e8c4036745bc0ef680630049 /llvm/lib
parent0f13c3ccf8d4f50a85f5c8f3d5af26528dcc5309 (diff)
downloadbcm5719-llvm-9e2aff8b6da1feac3c4b4bee2b933cd860b847c0.tar.gz
bcm5719-llvm-9e2aff8b6da1feac3c4b4bee2b933cd860b847c0.zip
[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. llvm-svn: 163124
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp4
-rw-r--r--llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp5
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp5
-rw-r--r--llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp5
4 files changed, 11 insertions, 8 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index bdb20e85347..51ba3c3b37c 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/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/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
index e81943c7751..6a63f17c6ae 100644
--- a/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
+++ b/llvm/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/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index f463b7703c7..c33c4d2ccd7 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/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/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 6d6e7d1eea9..baf45893f1c 100644
--- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud