1; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X86-64 2; RUN: llc < %s -mtriple=x86_64-cygwin | FileCheck %s -check-prefix=WIN64 3; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=WIN64 4; RUN: llc < %s -mtriple=x86_64-mingw32 | FileCheck %s -check-prefix=WIN64 5 6define i64 @mod128(i128 %x) { 7 ; X86-64: movl $3, %edx 8 ; X86-64: xorl %ecx, %ecx 9 ; X86-64: callq __modti3 10 ; X86-64-NOT: movd %xmm0, %rax 11 12 ; WIN64-NOT: movl $3, %r8d 13 ; WIN64-NOT: xorl %r9d, %r9d 14 ; WIN64-DAG: movq %rdx, 56(%rsp) 15 ; WIN64-DAG: movq %rcx, 48(%rsp) 16 ; WIN64-DAG: leaq 48(%rsp), %rcx 17 ; WIN64-DAG: leaq 32(%rsp), %rdx 18 ; WIN64-DAG: movq $0, 40(%rsp) 19 ; WIN64-DAG: movq $3, 32(%rsp) 20 ; WIN64: callq __modti3 21 ; WIN64: movd %xmm0, %rax 22 23 %1 = srem i128 %x, 3 24 %2 = trunc i128 %1 to i64 25 ret i64 %2 26} 27