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 | 79be90c3c72a11f0d86ab13f66acdc7319634009 (patch) | |
tree | 626305c85b8cc7a85796c392b055a42e738ca43f /llvm/test | |
parent | ee00d04da0220d1595287af666252ced0385357e (diff) | |
download | bcm5719-llvm-79be90c3c72a11f0d86ab13f66acdc7319634009.tar.gz bcm5719-llvm-79be90c3c72a11f0d86ab13f66acdc7319634009.zip |
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.
llvm-svn: 51420
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll b/llvm/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll new file mode 100644 index 00000000000..16bf23e4d88 --- /dev/null +++ b/llvm/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 +} |