Skip to content

Commit

Permalink
Add support for the 'Q' constraint.
Browse files Browse the repository at this point in the history
Fixes rdar://9866494


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136523 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Jul 29, 2011
1 parent b4f4cbd commit ef7f1e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Target/ARM/ARMISelLowering.cpp
Expand Up @@ -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]) {
Expand Down
12 changes: 12 additions & 0 deletions test/CodeGen/ARM/inlineasm3.ll
Expand Up @@ -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
}

0 comments on commit ef7f1e7

Please sign in to comment.