1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/CodeGen/X86/swift-error.ll
Saleem Abdulrasool 6256c01685 X86: remove R12 from CSR on Windows x64 SwiftCC
R12 is used for the SwiftError parameter.  It is no longer a CSR as it
is used for transfer the SwiftError, and the caller must preserve it if
they need to.

llvm-svn: 314165
2017-09-25 22:00:17 +00:00

19 lines
444 B
LLVM

; RUN: llc -mtriple x86_64-unknown-windows-msvc -filetype asm -o - %s | FileCheck %s
%swift.error = type opaque
declare swiftcc void @f(%swift.error** swifterror)
define swiftcc void @g(i8*, i8*, i8*, i8*, %swift.error** swifterror %error) {
entry:
call swiftcc void @f(%swift.error** nonnull nocapture swifterror %error)
ret void
}
; CHECK-LABEL: g
; CHECK-NOT: pushq %r12
; CHECK: callq f
; CHECK-NOT: popq %r12
; CHECK: retq