aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2013-07-05 10:19:40 +0000
committerJoey Gouly <joey.gouly@arm.com>2013-07-05 10:19:40 +0000
commit00d9fe2de7f0b8f9d1ea19ae30cc78b1a1e1fb92 (patch)
treefe46d475695f7fcf44374bb1058732ad5795ab91 /lib
parent24663f69cc98545b32d2eeeed1da887e7910e2f7 (diff)
downloadexternal_llvm-00d9fe2de7f0b8f9d1ea19ae30cc78b1a1e1fb92.zip
external_llvm-00d9fe2de7f0b8f9d1ea19ae30cc78b1a1e1fb92.tar.gz
external_llvm-00d9fe2de7f0b8f9d1ea19ae30cc78b1a1e1fb92.tar.bz2
PR16490: fix a crash in ARMDAGToDAGISel::SelectInlineAsm.
In the SelectionDAG immediate operands to inline asm are constructed as two separate operands. The first is a constant of value InlineAsm::Kind_Imm and the second is a constant with the value of the immediate. In ARMDAGToDAGISel::SelectInlineAsm, if we reach an operand of Kind_Imm we should skip over the next operand too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMISelDAGToDAG.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp
index c85dcb4..da0fe2c 100644
--- a/lib/Target/ARM/ARMISelDAGToDAG.cpp
+++ b/lib/Target/ARM/ARMISelDAGToDAG.cpp
@@ -3491,6 +3491,12 @@ SDNode *ARMDAGToDAGISel::SelectInlineAsm(SDNode *N){
else
continue;
+ if (Kind == InlineAsm::Kind_Imm) {
+ SDValue op = N->getOperand(++i);
+ AsmNodeOperands.push_back(op);
+ continue;
+ }
+
unsigned NumRegs = InlineAsm::getNumOperandRegisters(Flag);
if (NumRegs)
OpChanged.push_back(false);