1; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck %s 2; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s 3 4; Check that, if a Win64 ABI function calls a SysV ABI function, all the 5; Win64 nonvolatile registers get saved. 6 7; CHECK-LABEL: bar: 8define x86_64_win64cc void @bar(i32 %a, i32 %b) { 9; CHECK-DAG: pushq %rdi 10; CHECK-DAG: pushq %rsi 11; CHECK-DAG: movaps %xmm6, 12; CHECK-DAG: movaps %xmm7, 13; CHECK-DAG: movaps %xmm8, 14; CHECK-DAG: movaps %xmm9, 15; CHECK-DAG: movaps %xmm10, 16; CHECK-DAG: movaps %xmm11, 17; CHECK-DAG: movaps %xmm12, 18; CHECK-DAG: movaps %xmm13, 19; CHECK-DAG: movaps %xmm14, 20; CHECK-DAG: movaps %xmm15, 21; CHECK: callq foo 22; CHECK: ret 23 call x86_64_sysvcc void @foo(i32 %a, i32 %b) 24 ret void 25} 26 27declare x86_64_sysvcc void @foo(i32 %a, i32 %b) 28 29