aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/debug/win64-abi.rs
blob: 4e02906a1958235dcdd94f085d121c6759cbb081 (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do compile { target { x86_64-*-* } } }
// { dg-options "-gdwarf-5 -dA -w -O1 -m64" }
pub extern "win64" fn id(num: i32) -> i32 {
    num
}

fn main() {
    // MS ABI dictates that the first argument is ecx instead of edi from the sysv world
    // { dg-final { scan-assembler "%ecx, %eax" } }
    id(1);
}