summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-07-29 21:18:58 +0000
committerEric Christopher <echristo@apple.com>2011-07-29 21:18:58 +0000
commitaa5030066fb56c3ce918bd7cdd2ecf2d552fc2b2 (patch)
treeb2d3df862d62e9995df1d05defc47121950a3a7b
parent67d7136f260ff606da42fe6e8894370964df8569 (diff)
downloadbcm5719-llvm-aa5030066fb56c3ce918bd7cdd2ecf2d552fc2b2.tar.gz
bcm5719-llvm-aa5030066fb56c3ce918bd7cdd2ecf2d552fc2b2.zip
Add support for the 'Q' constraint.
Fixes rdar://9866494 llvm-svn: 136523
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp3
-rw-r--r--llvm/test/CodeGen/ARM/inlineasm3.ll12
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 903efd79989..46b42996834 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -7596,6 +7596,9 @@ ARMTargetLowering::getConstraintType(const std::string &Constraint) const {
case 'x': return C_RegisterClass;
case 't': return C_RegisterClass;
case 'j': return C_Other; // Constant for movw.
+ // An address with a single base register. Due to the way we
+ // currently handle addresses it is the same as an 'r' memory constraint.
+ case 'Q': return C_Memory;
}
} else if (Constraint.size() == 2) {
switch (Constraint[0]) {
diff --git a/llvm/test/CodeGen/ARM/inlineasm3.ll b/llvm/test/CodeGen/ARM/inlineasm3.ll
index 853585d9499..cb5243c9062 100644
--- a/llvm/test/CodeGen/ARM/inlineasm3.ll
+++ b/llvm/test/CodeGen/ARM/inlineasm3.ll
@@ -98,3 +98,15 @@ entry:
%0 = tail call i32 asm "movw $0, $1", "=r,j"(i32 27182) nounwind
ret i32 %0
}
+
+; Radar 9866494
+
+define void @t10(i8* %f, i32 %g) nounwind {
+entry:
+; CHECK: t10
+; CHECK: str r1, [r0]
+ %f.addr = alloca i8*, align 4
+ store i8* %f, i8** %f.addr, align 4
+ call void asm "str $1, $0", "=*Q,r"(i8** %f.addr, i32 %g) nounwind
+ ret void
+}
OpenPOWER on IntegriCloud