aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-05-07 06:25:15 +0000
committerEric Christopher <echristo@apple.com>2012-05-07 06:25:15 +0000
commit4adbefebd2eeeab4d7007b697b4cc20e40ba06b8 (patch)
treea7b39d03b16fd42f35e4064cb72a4b0041c6034c /test
parent1d5a392e2cff41488e47e038231fb114ea0eb941 (diff)
downloadexternal_llvm-4adbefebd2eeeab4d7007b697b4cc20e40ba06b8.zip
external_llvm-4adbefebd2eeeab4d7007b697b4cc20e40ba06b8.tar.gz
external_llvm-4adbefebd2eeeab4d7007b697b4cc20e40ba06b8.tar.bz2
Add support for the 'l' constraint.
Patch by Jack Carter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll b/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll
index aa186ec..94ded30 100644
--- a/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll
+++ b/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll
@@ -29,5 +29,16 @@ entry:
; CHECK: #NO_APP
tail call i32 asm sideeffect "addi $0,$1,$2", "=c,c,I"(i32 4194304, i32 1024) nounwind
+; Now l with 1024: make sure register lo is picked. We do this by checking the instruction
+; after the inline expression for a mflo to pull the value out of lo.
+; CHECK: #APP
+; CHECK-NEXT: mtlo ${{[0-9]+}}
+; CHECK-NEXT: madd ${{[0-9]+}},${{[0-9]+}}
+; CHECK-NEXT: #NO_APP
+; CHECK-NEXT: mflo ${{[0-9]+}}
+ %bosco = alloca i32, align 4
+ call i32 asm sideeffect "\09mtlo $3 \0A\09\09madd $1,$2 ", "=l,r,r,r"(i32 7, i32 6, i32 44) nounwind
+ store volatile i32 %4, i32* %bosco, align 4
+
ret i32 0
}