blob: 968b1a255109835bccd054f086aa0e8b773d3c72 [file] [log] [blame]
// Make sure Rust generates the correct calling convention for extern
// functions.
#[inline(never)]
#[cfg(target_arch = "x86_64")]
pub extern "win64" fn foo(a: isize, b: isize, c: isize, d: isize) {
assert_eq!(a, 1);
assert_eq!(b, 2);
assert_eq!(c, 3);
assert_eq!(d, 4);
println!("a: {}, b: {}, c: {}, d: {}",
a, b, c, d)
}
#[inline(never)]
#[cfg(not(target_arch = "x86_64"))]
pub extern fn foo(a: isize, b: isize, c: isize, d: isize) {
assert_eq!(a, 1);
assert_eq!(b, 2);
assert_eq!(c, 3);
assert_eq!(d, 4);
println!("a: {}, b: {}, c: {}, d: {}",
a, b, c, d)
}