mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-06 21:05:51 +00:00
418eb3df74
Patch by Richard Mitton. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187476 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
681 B
LLVM
30 lines
681 B
LLVM
; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | FileCheck %s
|
|
; check that fastcc is passing stuff in regs.
|
|
|
|
declare x86_fastcallcc i64 @callee(i64 inreg)
|
|
|
|
define i64 @caller() {
|
|
%X = call x86_fastcallcc i64 @callee( i64 4294967299 ) ; <i64> [#uses=1]
|
|
; CHECK: mov{{.*}}edx, 1
|
|
ret i64 %X
|
|
}
|
|
|
|
define x86_fastcallcc i64 @caller2(i64 inreg %X) {
|
|
ret i64 %X
|
|
; CHECK: mov{{.*}}eax, ecx
|
|
}
|
|
|
|
declare x86_thiscallcc i64 @callee2(i32)
|
|
|
|
define i64 @caller3() {
|
|
%X = call x86_thiscallcc i64 @callee2( i32 3 )
|
|
; CHECK: mov{{.*}}ecx, 3
|
|
ret i64 %X
|
|
}
|
|
|
|
define x86_thiscallcc i32 @caller4(i32 %X) {
|
|
ret i32 %X
|
|
; CHECK: mov{{.*}}eax, ecx
|
|
}
|
|
|