diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-04-06 21:46:51 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-04-06 21:46:51 +0000 |
commit | 8f3434647d3d39b49475239e3be1b8afb06415cf (patch) | |
tree | 06f2e73a1dacdbbe2a33b099bd5c1bfc91f67eba /test/CodeGen/ARM/2009-04-06-AsmModifier.ll | |
parent | 30910bf1c9842935c1c044578fe2d1d0ca9fa32a (diff) | |
download | external_llvm-8f3434647d3d39b49475239e3be1b8afb06415cf.zip external_llvm-8f3434647d3d39b49475239e3be1b8afb06415cf.tar.gz external_llvm-8f3434647d3d39b49475239e3be1b8afb06415cf.tar.bz2 |
Handle 'a' modifier in ARM inline assembly.
Patch by Richard Pennington.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/2009-04-06-AsmModifier.ll')
-rw-r--r-- | test/CodeGen/ARM/2009-04-06-AsmModifier.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2009-04-06-AsmModifier.ll b/test/CodeGen/ARM/2009-04-06-AsmModifier.ll new file mode 100644 index 0000000..ee6dc84 --- /dev/null +++ b/test/CodeGen/ARM/2009-04-06-AsmModifier.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=arm | grep {swi 107} + +define i32 @_swilseek(i32) nounwind { +entry: + %ptr = alloca i32 ; <i32*> [#uses=2] + store i32 %0, i32* %ptr + %retval = alloca i32 ; <i32*> [#uses=2] + store i32 0, i32* %retval + %res = alloca i32 ; <i32*> [#uses=0] + %fh = alloca i32 ; <i32*> [#uses=1] + %1 = load i32* %fh ; <i32> [#uses=1] + %2 = load i32* %ptr ; <i32> [#uses=1] + %3 = call i32* asm "mov r0, $2; mov r1, $3; swi ${1:a}; mov $0, r0", "=r,i,r,r,~{r0},~{r1}"(i32 107, i32 %1, i32 %2) nounwind ; <i32*> [#uses=0] + br label %return + +return: ; preds = %entry + %4 = load i32* %retval ; <i32> [#uses=1] + ret i32 %4 +} |