diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-22 06:19:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-22 06:19:37 +0000 |
commit | f6a048c3a8f6ae660a8253145adf7b5119f61667 (patch) | |
tree | af78ace7c4576c45b2f9ebc12e8c1eaa30767ead /test | |
parent | ea21ad49261a6a9d1614c01e631c2cdc4d554b84 (diff) | |
download | external_llvm-f6a048c3a8f6ae660a8253145adf7b5119f61667.zip external_llvm-f6a048c3a8f6ae660a8253145adf7b5119f61667.tar.gz external_llvm-f6a048c3a8f6ae660a8253145adf7b5119f61667.tar.bz2 |
Add support for multiple-return values in inline asm. This should
get inline asm working as well as it did previously with the CBE
with the new MRV support for inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll b/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll new file mode 100644 index 0000000..16bf23e --- /dev/null +++ b/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=c + +declare {i32, i32} @foo() + +define i32 @test() { + %A = call {i32, i32} @foo() + %B = getresult {i32, i32} %A, 0 + %C = getresult {i32, i32} %A, 1 + %D = add i32 %B, %C + ret i32 %D +} + +define i32 @test2() { + %A = call {i32, i32} asm sideeffect "...", "={cx},={di},~{dirflag},~{fpsr},~{flags},~{memory}"() + %B = getresult {i32, i32} %A, 0 + %C = getresult {i32, i32} %A, 1 + %D = add i32 %B, %C + ret i32 %D +} |