mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-23 15:29:51 +00:00
f6a048c3a8
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
20 lines
446 B
LLVM
20 lines
446 B
LLVM
; 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
|
|
}
|