[llvm] [windows] Always pass libcall fp128 arguments indirectly (PR #128848)
Trevor Gross via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 19:38:50 PST 2025
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/128848
>From a804c4438a7e26a794206e679c26b4db32d30083 Mon Sep 17 00:00:00 2001
From: Trevor Gross <tmgross at umich.edu>
Date: Wed, 26 Feb 2025 08:37:07 +0000
Subject: [PATCH 1/2] [windows] Add fp128 libcall ABI tests for x86 Windows
(NFC)
Add Windows invocations to existing fp128 libcall tests.
---
.../test/CodeGen/X86/fp128-libcalls-strict.ll | 1654 +++++++++++++++++
llvm/test/CodeGen/X86/fp128-libcalls.ll | 1074 +++++++++++
2 files changed, 2728 insertions(+)
diff --git a/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll b/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
index 5263e0d4f6f39..c9b1ac1e9bff6 100644
--- a/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
+++ b/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
@@ -8,6 +8,12 @@
; RUN: llc < %s -O2 -mtriple=i686-linux-gnu -mattr=+sse2 \
; RUN: -enable-legalize-types-checking \
; RUN: | FileCheck %s --check-prefix=X86
+; RUN: llc < %s -O2 -mtriple=x86_64-pc-windows-msvc \
+; RUN: -enable-legalize-types-checking \
+; RUN: | FileCheck %s --check-prefix=WIN
+; RUN: llc < %s -O2 -mtriple=i686-pc-windows-msvc \
+; RUN: -enable-legalize-types-checking \
+; RUN: | FileCheck %s --check-prefix=WIN-X86
; Check all soft floating point library function calls.
@@ -57,6 +63,49 @@ define fp128 @add(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: add:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __addtf3
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: add:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___addtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%add = call fp128 @llvm.experimental.constrained.fadd.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %add
@@ -108,6 +157,49 @@ define fp128 @sub(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: sub:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __subtf3
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: sub:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___subtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sub = call fp128 @llvm.experimental.constrained.fsub.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %sub
@@ -159,6 +251,49 @@ define fp128 @mul(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: mul:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __multf3
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: mul:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___multf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%mul = call fp128 @llvm.experimental.constrained.fmul.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %mul
@@ -210,6 +345,49 @@ define fp128 @div(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: div:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __divtf3
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: div:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___divtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%div = call fp128 @llvm.experimental.constrained.fdiv.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %div
@@ -258,6 +436,53 @@ define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: fma:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq fmal
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: fma:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 56(%ebp)
+; WIN-X86-NEXT: pushl 52(%ebp)
+; WIN-X86-NEXT: pushl 48(%ebp)
+; WIN-X86-NEXT: pushl 44(%ebp)
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fmal
+; WIN-X86-NEXT: addl $52, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%fma = call fp128 @llvm.experimental.constrained.fma.f128(fp128 %x, fp128 %y, fp128 %z, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %fma
@@ -302,6 +527,49 @@ define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: frem:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq fmodl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: frem:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fmodl
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%div = call fp128 @llvm.experimental.constrained.frem.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %div
@@ -342,6 +610,45 @@ define fp128 @ceil(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: ceil:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq ceill
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: ceil:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _ceill
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%ceil = call fp128 @llvm.experimental.constrained.ceil.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret fp128 %ceil
@@ -382,6 +689,45 @@ define fp128 @acos(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: acos:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq acosl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: acos:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _acosl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%acos = call fp128 @llvm.experimental.constrained.acos.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %acos
@@ -422,6 +768,45 @@ define fp128 @cos(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: cos:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq cosl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: cos:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _cosl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%cos = call fp128 @llvm.experimental.constrained.cos.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %cos
@@ -462,6 +847,45 @@ define fp128 @cosh(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: cosh:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq coshl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: cosh:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _coshl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%cosh = call fp128 @llvm.experimental.constrained.cosh.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %cosh
@@ -502,6 +926,45 @@ define fp128 @exp(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: exp:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq expl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: exp:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _expl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%exp = call fp128 @llvm.experimental.constrained.exp.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %exp
@@ -542,6 +1005,45 @@ define fp128 @exp2(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: exp2:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq exp2l
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: exp2:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _exp2l
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%exp2 = call fp128 @llvm.experimental.constrained.exp2.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %exp2
@@ -582,6 +1084,45 @@ define fp128 @floor(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: floor:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq floorl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: floor:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _floorl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%floor = call fp128 @llvm.experimental.constrained.floor.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret fp128 %floor
@@ -622,6 +1163,45 @@ define fp128 @log(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: log:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq logl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: log:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _logl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%log = call fp128 @llvm.experimental.constrained.log.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %log
@@ -662,6 +1242,45 @@ define fp128 @log10(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: log10:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq log10l
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: log10:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _log10l
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%log10 = call fp128 @llvm.experimental.constrained.log10.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %log10
@@ -702,6 +1321,45 @@ define fp128 @log2(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: log2:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq log2l
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: log2:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _log2l
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%log2 = call fp128 @llvm.experimental.constrained.log2.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %log2
@@ -746,6 +1404,49 @@ define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: maxnum:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq fmaxl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: maxnum:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fmaxl
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%maxnum = call fp128 @llvm.experimental.constrained.maxnum.f128(fp128 %x, fp128 %y, metadata !"fpexcept.strict") #0
ret fp128 %maxnum
@@ -790,6 +1491,49 @@ define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: minnum:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq fminl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: minnum:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fminl
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%minnum = call fp128 @llvm.experimental.constrained.minnum.f128(fp128 %x, fp128 %y, metadata !"fpexcept.strict") #0
ret fp128 %minnum
@@ -830,6 +1574,45 @@ define fp128 @nearbyint(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: nearbyint:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq nearbyintl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: nearbyint:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _nearbyintl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%nearbyint = call fp128 @llvm.experimental.constrained.nearbyint.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %nearbyint
@@ -874,6 +1657,49 @@ define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: pow:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq powl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: pow:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _powl
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%pow = call fp128 @llvm.experimental.constrained.pow.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %pow
@@ -922,6 +1748,46 @@ define fp128 @powi(fp128 %x, i32 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: powi:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __powitf2
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: powi:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___powitf2
+; WIN-X86-NEXT: addl $24, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%powi = call fp128 @llvm.experimental.constrained.powi.f128(fp128 %x, i32 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %powi
@@ -962,6 +1828,45 @@ define fp128 @rint(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: rint:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq rintl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: rint:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _rintl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%rint = call fp128 @llvm.experimental.constrained.rint.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %rint
@@ -1002,6 +1907,45 @@ define fp128 @round(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: round:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq roundl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: round:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _roundl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%round = call fp128 @llvm.experimental.constrained.round.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret fp128 %round
@@ -1042,6 +1986,45 @@ define fp128 @roundeven(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: roundeven:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq roundevenl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: roundeven:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _roundevenl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%roundeven = call fp128 @llvm.experimental.constrained.roundeven.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret fp128 %roundeven
@@ -1082,6 +2065,45 @@ define fp128 @asin(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: asin:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq asinl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: asin:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _asinl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%asin = call fp128 @llvm.experimental.constrained.asin.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %asin
@@ -1122,6 +2144,45 @@ define fp128 @sin(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: sin:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq sinl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: sin:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _sinl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sin = call fp128 @llvm.experimental.constrained.sin.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %sin
@@ -1162,6 +2223,45 @@ define fp128 @sinh(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: sinh:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq sinhl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: sinh:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _sinhl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sinh = call fp128 @llvm.experimental.constrained.sinh.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %sinh
@@ -1202,6 +2302,45 @@ define fp128 @sqrt(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: sqrt:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq sqrtl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: sqrt:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _sqrtl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.experimental.constrained.sqrt.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %sqrt
@@ -1242,6 +2381,45 @@ define fp128 @atan(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: atan:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq atanl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: atan:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _atanl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%atan = call fp128 @llvm.experimental.constrained.atan.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %atan
@@ -1286,6 +2464,49 @@ define fp128 @atan2(fp128 %x, fp128 %y) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: atan2:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq atan2l
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: atan2:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _atan2l
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%atan2 = call fp128 @llvm.experimental.constrained.atan2.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %atan2
@@ -1326,6 +2547,45 @@ define fp128 @tan(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: tan:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq tanl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: tan:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _tanl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%tan = call fp128 @llvm.experimental.constrained.tan.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %tan
@@ -1366,6 +2626,45 @@ define fp128 @tanh(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: tanh:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq tanhl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: tanh:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _tanhl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%tanh = call fp128 @llvm.experimental.constrained.tanh.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret fp128 %tanh
@@ -1406,6 +2705,45 @@ define fp128 @trunc(fp128 %x) nounwind strictfp {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: trunc:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq truncl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: trunc:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _truncl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 8(%esi)
+; WIN-X86-NEXT: movl %edx, 12(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%trunc = call fp128 @llvm.experimental.constrained.trunc.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret fp128 %trunc
@@ -1436,6 +2774,23 @@ define i32 @lrint(fp128 %x) nounwind strictfp {
; X86-NEXT: calll lrintl
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: lrint:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq lrintl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: lrint:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll _lrintl
+; WIN-X86-NEXT: addl $16, %esp
+; WIN-X86-NEXT: retl
entry:
%rint = call i32 @llvm.experimental.constrained.lrint.i32.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret i32 %rint
@@ -1466,6 +2821,23 @@ define i64 @llrint(fp128 %x) nounwind strictfp {
; X86-NEXT: calll llrintl
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: llrint:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq llrintl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: llrint:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll _llrintl
+; WIN-X86-NEXT: addl $16, %esp
+; WIN-X86-NEXT: retl
entry:
%rint = call i64 @llvm.experimental.constrained.llrint.i64.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
ret i64 %rint
@@ -1496,6 +2868,23 @@ define i32 @lround(fp128 %x) nounwind strictfp {
; X86-NEXT: calll lroundl
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: lround:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq lroundl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: lround:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll _lroundl
+; WIN-X86-NEXT: addl $16, %esp
+; WIN-X86-NEXT: retl
entry:
%round = call i32 @llvm.experimental.constrained.lround.i32.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret i32 %round
@@ -1526,6 +2915,23 @@ define i64 @llround(fp128 %x) nounwind strictfp {
; X86-NEXT: calll llroundl
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: llround:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq llroundl
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: llround:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll _llroundl
+; WIN-X86-NEXT: addl $16, %esp
+; WIN-X86-NEXT: retl
entry:
%round = call i64 @llvm.experimental.constrained.llround.i64.f128(fp128 %x, metadata !"fpexcept.strict") #0
ret i64 %round
@@ -1601,6 +3007,48 @@ define i64 @cmp(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; X86-NEXT: movl 4(%ecx), %edx
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: cmp:
+; WIN: # %bb.0:
+; WIN-NEXT: pushq %rsi
+; WIN-NEXT: pushq %rdi
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm3, %xmm1
+; WIN-NEXT: movaps %xmm2, %xmm0
+; WIN-NEXT: movq %rdx, %rsi
+; WIN-NEXT: movq %rcx, %rdi
+; WIN-NEXT: callq __eqtf2
+; WIN-NEXT: testl %eax, %eax
+; WIN-NEXT: cmovneq %rsi, %rdi
+; WIN-NEXT: movq %rdi, %rax
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: popq %rdi
+; WIN-NEXT: popq %rsi
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: cmp:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll ___eqtf2
+; WIN-X86-NEXT: addl $32, %esp
+; WIN-X86-NEXT: testl %eax, %eax
+; WIN-X86-NEXT: je LBB37_1
+; WIN-X86-NEXT: # %bb.2:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: jmp LBB37_3
+; WIN-X86-NEXT: LBB37_1:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: LBB37_3:
+; WIN-X86-NEXT: movl (%ecx), %eax
+; WIN-X86-NEXT: movl 4(%ecx), %edx
+; WIN-X86-NEXT: retl
%cond = call i1 @llvm.experimental.constrained.fcmp.f128(
fp128 %x, fp128 %y,
metadata !"oeq",
@@ -1679,6 +3127,48 @@ define i64 @cmps(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; X86-NEXT: movl 4(%ecx), %edx
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: cmps:
+; WIN: # %bb.0:
+; WIN-NEXT: pushq %rsi
+; WIN-NEXT: pushq %rdi
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm3, %xmm1
+; WIN-NEXT: movaps %xmm2, %xmm0
+; WIN-NEXT: movq %rdx, %rsi
+; WIN-NEXT: movq %rcx, %rdi
+; WIN-NEXT: callq __eqtf2
+; WIN-NEXT: testl %eax, %eax
+; WIN-NEXT: cmovneq %rsi, %rdi
+; WIN-NEXT: movq %rdi, %rax
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: popq %rdi
+; WIN-NEXT: popq %rsi
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: cmps:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll ___eqtf2
+; WIN-X86-NEXT: addl $32, %esp
+; WIN-X86-NEXT: testl %eax, %eax
+; WIN-X86-NEXT: je LBB38_1
+; WIN-X86-NEXT: # %bb.2:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: jmp LBB38_3
+; WIN-X86-NEXT: LBB38_1:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: LBB38_3:
+; WIN-X86-NEXT: movl (%ecx), %eax
+; WIN-X86-NEXT: movl 4(%ecx), %edx
+; WIN-X86-NEXT: retl
%cond = call i1 @llvm.experimental.constrained.fcmps.f128(
fp128 %x, fp128 %y,
metadata !"oeq",
@@ -1815,6 +3305,88 @@ define i64 @cmp_ueq_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; X86-NEXT: popl %ebx
; X86-NEXT: popl %ebp
; X86-NEXT: retl
+;
+; WIN-LABEL: cmp_ueq_q:
+; WIN: # %bb.0:
+; WIN-NEXT: pushq %rsi
+; WIN-NEXT: pushq %rdi
+; WIN-NEXT: pushq %rbx
+; WIN-NEXT: subq $64, %rsp
+; WIN-NEXT: movaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; WIN-NEXT: movaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; WIN-NEXT: movaps %xmm3, %xmm6
+; WIN-NEXT: movaps %xmm2, %xmm7
+; WIN-NEXT: movq %rdx, %rsi
+; WIN-NEXT: movq %rcx, %rdi
+; WIN-NEXT: movaps %xmm2, %xmm0
+; WIN-NEXT: movaps %xmm3, %xmm1
+; WIN-NEXT: callq __eqtf2
+; WIN-NEXT: testl %eax, %eax
+; WIN-NEXT: sete %bl
+; WIN-NEXT: movaps %xmm7, %xmm0
+; WIN-NEXT: movaps %xmm6, %xmm1
+; WIN-NEXT: callq __unordtf2
+; WIN-NEXT: testl %eax, %eax
+; WIN-NEXT: setne %al
+; WIN-NEXT: orb %bl, %al
+; WIN-NEXT: cmoveq %rsi, %rdi
+; WIN-NEXT: movq %rdi, %rax
+; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
+; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
+; WIN-NEXT: addq $64, %rsp
+; WIN-NEXT: popq %rbx
+; WIN-NEXT: popq %rdi
+; WIN-NEXT: popq %rsi
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: cmp_ueq_q:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: pushl %ebx
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll ___eqtf2
+; WIN-X86-NEXT: addl $32, %esp
+; WIN-X86-NEXT: testl %eax, %eax
+; WIN-X86-NEXT: sete %bl
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll ___unordtf2
+; WIN-X86-NEXT: addl $32, %esp
+; WIN-X86-NEXT: testl %eax, %eax
+; WIN-X86-NEXT: setne %al
+; WIN-X86-NEXT: orb %bl, %al
+; WIN-X86-NEXT: jne LBB39_1
+; WIN-X86-NEXT: # %bb.2:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: jmp LBB39_3
+; WIN-X86-NEXT: LBB39_1:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: LBB39_3:
+; WIN-X86-NEXT: movl (%ecx), %eax
+; WIN-X86-NEXT: movl 4(%ecx), %edx
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebx
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%cond = call i1 @llvm.experimental.constrained.fcmp.f128(
fp128 %x, fp128 %y,
metadata !"ueq",
@@ -1951,6 +3523,88 @@ define i64 @cmp_one_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; X86-NEXT: popl %ebx
; X86-NEXT: popl %ebp
; X86-NEXT: retl
+;
+; WIN-LABEL: cmp_one_q:
+; WIN: # %bb.0:
+; WIN-NEXT: pushq %rsi
+; WIN-NEXT: pushq %rdi
+; WIN-NEXT: pushq %rbx
+; WIN-NEXT: subq $64, %rsp
+; WIN-NEXT: movaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; WIN-NEXT: movaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
+; WIN-NEXT: movaps %xmm3, %xmm6
+; WIN-NEXT: movaps %xmm2, %xmm7
+; WIN-NEXT: movq %rdx, %rsi
+; WIN-NEXT: movq %rcx, %rdi
+; WIN-NEXT: movaps %xmm2, %xmm0
+; WIN-NEXT: movaps %xmm3, %xmm1
+; WIN-NEXT: callq __eqtf2
+; WIN-NEXT: testl %eax, %eax
+; WIN-NEXT: setne %bl
+; WIN-NEXT: movaps %xmm7, %xmm0
+; WIN-NEXT: movaps %xmm6, %xmm1
+; WIN-NEXT: callq __unordtf2
+; WIN-NEXT: testl %eax, %eax
+; WIN-NEXT: sete %al
+; WIN-NEXT: testb %bl, %al
+; WIN-NEXT: cmoveq %rsi, %rdi
+; WIN-NEXT: movq %rdi, %rax
+; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
+; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
+; WIN-NEXT: addq $64, %rsp
+; WIN-NEXT: popq %rbx
+; WIN-NEXT: popq %rdi
+; WIN-NEXT: popq %rsi
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: cmp_one_q:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: pushl %ebx
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll ___eqtf2
+; WIN-X86-NEXT: addl $32, %esp
+; WIN-X86-NEXT: testl %eax, %eax
+; WIN-X86-NEXT: setne %bl
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: pushl {{[0-9]+}}(%esp)
+; WIN-X86-NEXT: calll ___unordtf2
+; WIN-X86-NEXT: addl $32, %esp
+; WIN-X86-NEXT: testl %eax, %eax
+; WIN-X86-NEXT: sete %al
+; WIN-X86-NEXT: testb %bl, %al
+; WIN-X86-NEXT: jne LBB40_1
+; WIN-X86-NEXT: # %bb.2:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: jmp LBB40_3
+; WIN-X86-NEXT: LBB40_1:
+; WIN-X86-NEXT: leal {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: LBB40_3:
+; WIN-X86-NEXT: movl (%ecx), %eax
+; WIN-X86-NEXT: movl 4(%ecx), %edx
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebx
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%cond = call i1 @llvm.experimental.constrained.fcmp.f128(
fp128 %x, fp128 %y,
metadata !"one",
diff --git a/llvm/test/CodeGen/X86/fp128-libcalls.ll b/llvm/test/CodeGen/X86/fp128-libcalls.ll
index 0831675095d74..230515927e1c4 100644
--- a/llvm/test/CodeGen/X86/fp128-libcalls.ll
+++ b/llvm/test/CodeGen/X86/fp128-libcalls.ll
@@ -5,6 +5,10 @@
; RUN: -enable-legalize-types-checking | FileCheck %s --check-prefix=GNU
; RUN: llc < %s -O2 -mtriple=i686-linux-gnu -mattr=sse2 \
; RUN: -enable-legalize-types-checking | FileCheck %s --check-prefix=X86
+; RUN: llc < %s -O2 -mtriple=x86_64-pc-windows-msvc \
+; RUN: -enable-legalize-types-checking | FileCheck %s --check-prefix=WIN
+; RUN: llc < %s -O2 -mtriple=i686-pc-windows-msvc \
+; RUN: -enable-legalize-types-checking | FileCheck %s --check-prefix=WIN-X86
; Check all soft floating point library function calls.
@@ -55,6 +59,46 @@ define dso_local void @Test128Add(fp128 %d1, fp128 %d2) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Add:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __addtf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Add:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___addtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%add = fadd fp128 %d1, %d2
store fp128 %add, ptr @vf128, align 16
@@ -111,6 +155,48 @@ define dso_local void @Test128_1Add(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128_1Add:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm0, %xmm1
+; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: callq __addtf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128_1Add:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl _vf128+12
+; WIN-X86-NEXT: pushl _vf128+8
+; WIN-X86-NEXT: pushl _vf128+4
+; WIN-X86-NEXT: pushl _vf128
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___addtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+8
+; WIN-X86-NEXT: movl %edx, _vf128+12
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%0 = load fp128, ptr @vf128, align 16
%add = fadd fp128 %0, %d1
@@ -162,6 +248,46 @@ define dso_local void @Test128Sub(fp128 %d1, fp128 %d2) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Sub:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __subtf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Sub:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___subtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sub = fsub fp128 %d1, %d2
store fp128 %sub, ptr @vf128, align 16
@@ -218,6 +344,48 @@ define dso_local void @Test128_1Sub(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128_1Sub:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm0, %xmm1
+; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: callq __subtf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128_1Sub:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl _vf128+12
+; WIN-X86-NEXT: pushl _vf128+8
+; WIN-X86-NEXT: pushl _vf128+4
+; WIN-X86-NEXT: pushl _vf128
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___subtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+8
+; WIN-X86-NEXT: movl %edx, _vf128+12
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%0 = load fp128, ptr @vf128, align 16
%sub = fsub fp128 %0, %d1
@@ -269,6 +437,46 @@ define dso_local void @Test128Mul(fp128 %d1, fp128 %d2) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Mul:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __multf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Mul:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___multf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%mul = fmul fp128 %d1, %d2
store fp128 %mul, ptr @vf128, align 16
@@ -325,6 +533,48 @@ define dso_local void @Test128_1Mul(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128_1Mul:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm0, %xmm1
+; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: callq __multf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128_1Mul:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl _vf128+12
+; WIN-X86-NEXT: pushl _vf128+8
+; WIN-X86-NEXT: pushl _vf128+4
+; WIN-X86-NEXT: pushl _vf128
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___multf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+8
+; WIN-X86-NEXT: movl %edx, _vf128+12
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%0 = load fp128, ptr @vf128, align 16
%mul = fmul fp128 %0, %d1
@@ -376,6 +626,46 @@ define dso_local void @Test128Div(fp128 %d1, fp128 %d2) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Div:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq __divtf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Div:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___divtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%div = fdiv fp128 %d1, %d2
store fp128 %div, ptr @vf128, align 16
@@ -432,6 +722,48 @@ define dso_local void @Test128_1Div(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128_1Div:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm0, %xmm1
+; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: callq __divtf3
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128_1Div:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl _vf128+12
+; WIN-X86-NEXT: pushl _vf128+8
+; WIN-X86-NEXT: pushl _vf128+4
+; WIN-X86-NEXT: pushl _vf128
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll ___divtf3
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+8
+; WIN-X86-NEXT: movl %edx, _vf128+12
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%0 = load fp128, ptr @vf128, align 16
%div = fdiv fp128 %0, %d1
@@ -475,6 +807,46 @@ define dso_local void @Test128Rem(fp128 %d1, fp128 %d2) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Rem:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq fmodl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Rem:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fmodl
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%div = frem fp128 %d1, %d2
store fp128 %div, ptr @vf128, align 16
@@ -521,6 +893,48 @@ define dso_local void @Test128_1Rem(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128_1Rem:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: movaps %xmm0, %xmm1
+; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: callq fmodl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128_1Rem:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl _vf128+12
+; WIN-X86-NEXT: pushl _vf128+8
+; WIN-X86-NEXT: pushl _vf128+4
+; WIN-X86-NEXT: pushl _vf128
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fmodl
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+8
+; WIN-X86-NEXT: movl %edx, _vf128+12
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%0 = load fp128, ptr @vf128, align 16
%div = frem fp128 %0, %d1
@@ -560,6 +974,42 @@ define dso_local void @Test128Sqrt(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Sqrt:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq sqrtl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Sqrt:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _sqrtl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.sqrt.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -599,6 +1049,42 @@ define dso_local void @Test128Sin(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Sin:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq sinl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Sin:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _sinl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.sin.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -638,6 +1124,42 @@ define dso_local void @Test128Cos(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Cos:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq cosl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Cos:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _cosl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.cos.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -677,6 +1199,42 @@ define dso_local void @Test128Ceil(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Ceil:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq ceill
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Ceil:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _ceill
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.ceil.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -716,6 +1274,42 @@ define dso_local void @Test128Floor(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Floor:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq floorl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Floor:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _floorl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.floor.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -755,6 +1349,42 @@ define dso_local void @Test128Trunc(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Trunc:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq truncl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Trunc:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _truncl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.trunc.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -794,6 +1424,42 @@ define dso_local void @Test128Nearbyint(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Nearbyint:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq nearbyintl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Nearbyint:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _nearbyintl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.nearbyint.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -833,6 +1499,42 @@ define dso_local void @Test128Rint(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Rint:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq rintl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Rint:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _rintl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.rint.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -872,6 +1574,42 @@ define dso_local void @Test128Round(fp128 %d1) nounwind {
; X86-NEXT: movaps %xmm0, vf128
; X86-NEXT: addl $28, %esp
; X86-NEXT: retl
+;
+; WIN-LABEL: Test128Round:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: callq roundl
+; WIN-NEXT: movaps %xmm0, vf128(%rip)
+; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: retq
+;
+; WIN-X86-LABEL: Test128Round:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $32, %esp
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl 8(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _roundl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
+; WIN-X86-NEXT: movl %esi, _vf128+12
+; WIN-X86-NEXT: movl %edx, _vf128+8
+; WIN-X86-NEXT: movl %ecx, _vf128+4
+; WIN-X86-NEXT: movl %eax, _vf128
+; WIN-X86-NEXT: leal -4(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%sqrt = call fp128 @llvm.round.f128(fp128 %d1)
store fp128 %sqrt, ptr @vf128, align 16
@@ -916,6 +1654,50 @@ define fp128 @Test128FMA(fp128 %a, fp128 %b, fp128 %c) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128FMA:
+; WIN: # %bb.0: # %entry
+; WIN-NEXT: jmp fmal # TAILCALL
+;
+; WIN-X86-LABEL: Test128FMA:
+; WIN-X86: # %bb.0: # %entry
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 56(%ebp)
+; WIN-X86-NEXT: pushl 52(%ebp)
+; WIN-X86-NEXT: pushl 48(%ebp)
+; WIN-X86-NEXT: pushl 44(%ebp)
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _fmal
+; WIN-X86-NEXT: addl $52, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
entry:
%call = call fp128 @llvm.fma.f128(fp128 %a, fp128 %b, fp128 %c)
ret fp128 %call
@@ -951,6 +1733,42 @@ define fp128 @Test128Acos(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Acos:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp acosl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Acos:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _acosl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.acos.f128(fp128 %a)
ret fp128 %x
}
@@ -984,6 +1802,42 @@ define fp128 @Test128Asin(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Asin:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp asinl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Asin:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _asinl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.asin.f128(fp128 %a)
ret fp128 %x
}
@@ -1017,6 +1871,42 @@ define fp128 @Test128Atan(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Atan:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp atanl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Atan:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _atanl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.atan.f128(fp128 %a)
ret fp128 %x
}
@@ -1054,6 +1944,46 @@ define fp128 @Test128Atan2(fp128 %a, fp128 %b) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Atan2:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp atan2l # TAILCALL
+;
+; WIN-X86-LABEL: Test128Atan2:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 40(%ebp)
+; WIN-X86-NEXT: pushl 36(%ebp)
+; WIN-X86-NEXT: pushl 32(%ebp)
+; WIN-X86-NEXT: pushl 28(%ebp)
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _atan2l
+; WIN-X86-NEXT: addl $36, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.atan2.f128(fp128 %a, fp128 %b)
ret fp128 %x
}
@@ -1087,6 +2017,42 @@ define fp128 @Test128Cosh(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Cosh:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp coshl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Cosh:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _coshl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.cosh.f128(fp128 %a)
ret fp128 %x
}
@@ -1120,6 +2086,42 @@ define fp128 @Test128Sinh(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Sinh:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp sinhl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Sinh:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _sinhl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.sinh.f128(fp128 %a)
ret fp128 %x
}
@@ -1153,6 +2155,42 @@ define fp128 @Test128Tan(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Tan:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp tanl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Tan:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _tanl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.tan.f128(fp128 %a)
ret fp128 %x
}
@@ -1186,6 +2224,42 @@ define fp128 @Test128Tanh(fp128 %a) nounwind {
; X86-NEXT: addl $24, %esp
; X86-NEXT: popl %esi
; X86-NEXT: retl $4
+;
+; WIN-LABEL: Test128Tanh:
+; WIN: # %bb.0:
+; WIN-NEXT: jmp tanhl # TAILCALL
+;
+; WIN-X86-LABEL: Test128Tanh:
+; WIN-X86: # %bb.0:
+; WIN-X86-NEXT: pushl %ebp
+; WIN-X86-NEXT: movl %esp, %ebp
+; WIN-X86-NEXT: pushl %edi
+; WIN-X86-NEXT: pushl %esi
+; WIN-X86-NEXT: andl $-16, %esp
+; WIN-X86-NEXT: subl $16, %esp
+; WIN-X86-NEXT: movl 8(%ebp), %esi
+; WIN-X86-NEXT: movl %esp, %eax
+; WIN-X86-NEXT: pushl 24(%ebp)
+; WIN-X86-NEXT: pushl 20(%ebp)
+; WIN-X86-NEXT: pushl 16(%ebp)
+; WIN-X86-NEXT: pushl 12(%ebp)
+; WIN-X86-NEXT: pushl %eax
+; WIN-X86-NEXT: calll _tanhl
+; WIN-X86-NEXT: addl $20, %esp
+; WIN-X86-NEXT: movl (%esp), %eax
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
+; WIN-X86-NEXT: movl {{[0-9]+}}(%esp), %edi
+; WIN-X86-NEXT: movl %edi, 12(%esi)
+; WIN-X86-NEXT: movl %edx, 8(%esi)
+; WIN-X86-NEXT: movl %ecx, 4(%esi)
+; WIN-X86-NEXT: movl %eax, (%esi)
+; WIN-X86-NEXT: movl %esi, %eax
+; WIN-X86-NEXT: leal -8(%ebp), %esp
+; WIN-X86-NEXT: popl %esi
+; WIN-X86-NEXT: popl %edi
+; WIN-X86-NEXT: popl %ebp
+; WIN-X86-NEXT: retl
%x = call fp128 @llvm.tanh.f128(fp128 %a)
ret fp128 %x
}
>From f57b8a2c68a70c62c82e85f248cd3c69432c88a4 Mon Sep 17 00:00:00 2001
From: Trevor Gross <tmgross at umich.edu>
Date: Wed, 26 Feb 2025 09:26:22 +0000
Subject: [PATCH 2/2] [windows] Always pass libcall `fp128` arguments
indirectly
LLVM currently expects `__float128` to be both passed and returned in
xmm registers on Windows. However, this disagrees with the Windows
x86-64 calling convention [1], which indicates values larger than 64
bits should be passed indirectly.
Update LLVM's libcall calling convention to pass `fp128` directly.
Returning in xmm0 is unchanged since this seems like a reasonable
extrapolation of the ABI. With this patch, the calling convention for
`i128` and `f128` is the same.
GCC passes `__float128` indirectly, which this also matches. However, it
also returns indirectly, which is not done here. I intend to attempt a
GCC change to also return in `xmm0`, given the consistency with `i128`.
This corresponds to the frontend change in [2], see more details there.
[1]: https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170
[2]: https://github.com/llvm/llvm-project/pull/115052
---
llvm/lib/Target/X86/X86CallingConv.td | 3 +-
.../test/CodeGen/X86/fp128-libcalls-strict.ll | 356 +++++++++++++-----
llvm/test/CodeGen/X86/fp128-libcalls.ll | 254 ++++++++++---
llvm/test/CodeGen/X86/scalar-fp-to-i32.ll | 28 +-
llvm/test/CodeGen/X86/scalar-fp-to-i64.ll | 28 +-
5 files changed, 497 insertions(+), 172 deletions(-)
diff --git a/llvm/lib/Target/X86/X86CallingConv.td b/llvm/lib/Target/X86/X86CallingConv.td
index cf164acba9ec0..0d087e057a2bd 100644
--- a/llvm/lib/Target/X86/X86CallingConv.td
+++ b/llvm/lib/Target/X86/X86CallingConv.td
@@ -639,8 +639,9 @@ def CC_X86_Win64_C : CallingConv<[
// 512 bit vectors are passed by pointer
CCIfType<[v64i8, v32i16, v16i32, v32f16, v32bf16, v16f32, v8f64, v8i64], CCPassIndirect<i64>>,
- // Long doubles are passed by pointer
+ // Float types larger than 64-bits (long double and fp128) are passed by pointer
CCIfType<[f80], CCPassIndirect<i64>>,
+ CCIfType<[f128], CCPassIndirect<i64>>,
// If SSE was disabled, pass FP values smaller than 64-bits as integers in
// GPRs or on the stack.
diff --git a/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll b/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
index c9b1ac1e9bff6..a85b53ea62ac7 100644
--- a/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
+++ b/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
@@ -66,9 +66,15 @@ define fp128 @add(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: add:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __addtf3
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: add:
@@ -160,9 +166,15 @@ define fp128 @sub(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: sub:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __subtf3
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: sub:
@@ -254,9 +266,15 @@ define fp128 @mul(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: mul:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __multf3
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: mul:
@@ -348,9 +366,15 @@ define fp128 @div(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: div:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __divtf3
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: div:
@@ -439,9 +463,18 @@ define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
;
; WIN-LABEL: fma:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $88, %rsp
+; WIN-NEXT: movaps (%r8), %xmm0
+; WIN-NEXT: movaps (%rcx), %xmm1
+; WIN-NEXT: movaps (%rdx), %xmm2
+; WIN-NEXT: movaps %xmm2, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %r8
; WIN-NEXT: callq fmal
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $88, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: fma:
@@ -530,9 +563,15 @@ define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: frem:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq fmodl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: frem:
@@ -613,9 +652,12 @@ define fp128 @ceil(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: ceil:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq ceill
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: ceil:
@@ -692,9 +734,12 @@ define fp128 @acos(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: acos:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq acosl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: acos:
@@ -771,9 +816,12 @@ define fp128 @cos(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: cos:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq cosl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: cos:
@@ -850,9 +898,12 @@ define fp128 @cosh(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: cosh:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq coshl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: cosh:
@@ -929,9 +980,12 @@ define fp128 @exp(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: exp:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq expl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: exp:
@@ -1008,9 +1062,12 @@ define fp128 @exp2(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: exp2:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq exp2l
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: exp2:
@@ -1087,9 +1144,12 @@ define fp128 @floor(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: floor:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq floorl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: floor:
@@ -1166,9 +1226,12 @@ define fp128 @log(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: log:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq logl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: log:
@@ -1245,9 +1308,12 @@ define fp128 @log10(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: log10:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq log10l
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: log10:
@@ -1324,9 +1390,12 @@ define fp128 @log2(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: log2:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq log2l
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: log2:
@@ -1407,9 +1476,15 @@ define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: maxnum:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq fmaxl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: maxnum:
@@ -1494,9 +1569,15 @@ define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: minnum:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq fminl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: minnum:
@@ -1577,9 +1658,12 @@ define fp128 @nearbyint(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: nearbyint:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq nearbyintl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: nearbyint:
@@ -1660,9 +1744,15 @@ define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: pow:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq powl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: pow:
@@ -1751,9 +1841,12 @@ define fp128 @powi(fp128 %x, i32 %y) nounwind strictfp {
;
; WIN-LABEL: powi:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq __powitf2
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: powi:
@@ -1831,9 +1924,12 @@ define fp128 @rint(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: rint:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq rintl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: rint:
@@ -1910,9 +2006,12 @@ define fp128 @round(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: round:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq roundl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: round:
@@ -1989,9 +2088,12 @@ define fp128 @roundeven(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: roundeven:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq roundevenl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: roundeven:
@@ -2068,9 +2170,12 @@ define fp128 @asin(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: asin:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq asinl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: asin:
@@ -2147,9 +2252,12 @@ define fp128 @sin(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: sin:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq sinl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: sin:
@@ -2226,9 +2334,12 @@ define fp128 @sinh(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: sinh:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq sinhl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: sinh:
@@ -2305,9 +2416,12 @@ define fp128 @sqrt(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: sqrt:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq sqrtl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: sqrt:
@@ -2384,9 +2498,12 @@ define fp128 @atan(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: atan:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq atanl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: atan:
@@ -2467,9 +2584,15 @@ define fp128 @atan2(fp128 %x, fp128 %y) nounwind strictfp {
;
; WIN-LABEL: atan2:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq atan2l
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: atan2:
@@ -2550,9 +2673,12 @@ define fp128 @tan(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: tan:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq tanl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: tan:
@@ -2629,9 +2755,12 @@ define fp128 @tanh(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: tanh:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq tanhl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: tanh:
@@ -2708,9 +2837,12 @@ define fp128 @trunc(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: trunc:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq truncl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: trunc:
@@ -2777,9 +2909,12 @@ define i32 @lrint(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: lrint:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq lrintl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: lrint:
@@ -2824,9 +2959,12 @@ define i64 @llrint(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: llrint:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq llrintl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: llrint:
@@ -2871,9 +3009,12 @@ define i32 @lround(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: lround:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq lroundl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: lround:
@@ -2918,9 +3059,12 @@ define i64 @llround(fp128 %x) nounwind strictfp {
;
; WIN-LABEL: llround:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq llroundl
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: llround:
@@ -3012,16 +3156,20 @@ define i64 @cmp(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; WIN: # %bb.0:
; WIN-NEXT: pushq %rsi
; WIN-NEXT: pushq %rdi
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm3, %xmm1
-; WIN-NEXT: movaps %xmm2, %xmm0
+; WIN-NEXT: subq $72, %rsp
; WIN-NEXT: movq %rdx, %rsi
; WIN-NEXT: movq %rcx, %rdi
+; WIN-NEXT: movaps (%r8), %xmm0
+; WIN-NEXT: movaps (%r9), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __eqtf2
; WIN-NEXT: testl %eax, %eax
; WIN-NEXT: cmovneq %rsi, %rdi
; WIN-NEXT: movq %rdi, %rax
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: popq %rdi
; WIN-NEXT: popq %rsi
; WIN-NEXT: retq
@@ -3132,16 +3280,20 @@ define i64 @cmps(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; WIN: # %bb.0:
; WIN-NEXT: pushq %rsi
; WIN-NEXT: pushq %rdi
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm3, %xmm1
-; WIN-NEXT: movaps %xmm2, %xmm0
+; WIN-NEXT: subq $72, %rsp
; WIN-NEXT: movq %rdx, %rsi
; WIN-NEXT: movq %rcx, %rdi
+; WIN-NEXT: movaps (%r8), %xmm0
+; WIN-NEXT: movaps (%r9), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __eqtf2
; WIN-NEXT: testl %eax, %eax
; WIN-NEXT: cmovneq %rsi, %rdi
; WIN-NEXT: movq %rdi, %rax
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: popq %rdi
; WIN-NEXT: popq %rsi
; WIN-NEXT: retq
@@ -3311,20 +3463,24 @@ define i64 @cmp_ueq_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; WIN-NEXT: pushq %rsi
; WIN-NEXT: pushq %rdi
; WIN-NEXT: pushq %rbx
-; WIN-NEXT: subq $64, %rsp
+; WIN-NEXT: subq $128, %rsp
; WIN-NEXT: movaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; WIN-NEXT: movaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; WIN-NEXT: movaps %xmm3, %xmm6
-; WIN-NEXT: movaps %xmm2, %xmm7
; WIN-NEXT: movq %rdx, %rsi
; WIN-NEXT: movq %rcx, %rdi
-; WIN-NEXT: movaps %xmm2, %xmm0
-; WIN-NEXT: movaps %xmm3, %xmm1
+; WIN-NEXT: movaps (%r8), %xmm6
+; WIN-NEXT: movaps (%r9), %xmm7
+; WIN-NEXT: movaps %xmm7, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm6, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __eqtf2
+; WIN-NEXT: movaps %xmm7, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm6, {{[0-9]+}}(%rsp)
; WIN-NEXT: testl %eax, %eax
; WIN-NEXT: sete %bl
-; WIN-NEXT: movaps %xmm7, %xmm0
-; WIN-NEXT: movaps %xmm6, %xmm1
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __unordtf2
; WIN-NEXT: testl %eax, %eax
; WIN-NEXT: setne %al
@@ -3333,7 +3489,7 @@ define i64 @cmp_ueq_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; WIN-NEXT: movq %rdi, %rax
; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
-; WIN-NEXT: addq $64, %rsp
+; WIN-NEXT: addq $128, %rsp
; WIN-NEXT: popq %rbx
; WIN-NEXT: popq %rdi
; WIN-NEXT: popq %rsi
@@ -3529,20 +3685,24 @@ define i64 @cmp_one_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; WIN-NEXT: pushq %rsi
; WIN-NEXT: pushq %rdi
; WIN-NEXT: pushq %rbx
-; WIN-NEXT: subq $64, %rsp
+; WIN-NEXT: subq $128, %rsp
; WIN-NEXT: movaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
; WIN-NEXT: movaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
-; WIN-NEXT: movaps %xmm3, %xmm6
-; WIN-NEXT: movaps %xmm2, %xmm7
; WIN-NEXT: movq %rdx, %rsi
; WIN-NEXT: movq %rcx, %rdi
-; WIN-NEXT: movaps %xmm2, %xmm0
-; WIN-NEXT: movaps %xmm3, %xmm1
+; WIN-NEXT: movaps (%r8), %xmm6
+; WIN-NEXT: movaps (%r9), %xmm7
+; WIN-NEXT: movaps %xmm7, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm6, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __eqtf2
+; WIN-NEXT: movaps %xmm7, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm6, {{[0-9]+}}(%rsp)
; WIN-NEXT: testl %eax, %eax
; WIN-NEXT: setne %bl
-; WIN-NEXT: movaps %xmm7, %xmm0
-; WIN-NEXT: movaps %xmm6, %xmm1
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __unordtf2
; WIN-NEXT: testl %eax, %eax
; WIN-NEXT: sete %al
@@ -3551,7 +3711,7 @@ define i64 @cmp_one_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
; WIN-NEXT: movq %rdi, %rax
; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm6 # 16-byte Reload
; WIN-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm7 # 16-byte Reload
-; WIN-NEXT: addq $64, %rsp
+; WIN-NEXT: addq $128, %rsp
; WIN-NEXT: popq %rbx
; WIN-NEXT: popq %rdi
; WIN-NEXT: popq %rsi
diff --git a/llvm/test/CodeGen/X86/fp128-libcalls.ll b/llvm/test/CodeGen/X86/fp128-libcalls.ll
index 230515927e1c4..05c02a2139b5a 100644
--- a/llvm/test/CodeGen/X86/fp128-libcalls.ll
+++ b/llvm/test/CodeGen/X86/fp128-libcalls.ll
@@ -62,10 +62,16 @@ define dso_local void @Test128Add(fp128 %d1, fp128 %d2) nounwind {
;
; WIN-LABEL: Test128Add:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __addtf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Add:
@@ -158,12 +164,16 @@ define dso_local void @Test128_1Add(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128_1Add:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm0, %xmm1
-; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps vf128(%rip), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __addtf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128_1Add:
@@ -251,10 +261,16 @@ define dso_local void @Test128Sub(fp128 %d1, fp128 %d2) nounwind {
;
; WIN-LABEL: Test128Sub:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __subtf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Sub:
@@ -347,12 +363,16 @@ define dso_local void @Test128_1Sub(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128_1Sub:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm0, %xmm1
-; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps vf128(%rip), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __subtf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128_1Sub:
@@ -440,10 +460,16 @@ define dso_local void @Test128Mul(fp128 %d1, fp128 %d2) nounwind {
;
; WIN-LABEL: Test128Mul:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __multf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Mul:
@@ -536,12 +562,16 @@ define dso_local void @Test128_1Mul(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128_1Mul:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm0, %xmm1
-; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps vf128(%rip), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __multf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128_1Mul:
@@ -629,10 +659,16 @@ define dso_local void @Test128Div(fp128 %d1, fp128 %d2) nounwind {
;
; WIN-LABEL: Test128Div:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __divtf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Div:
@@ -725,12 +761,16 @@ define dso_local void @Test128_1Div(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128_1Div:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm0, %xmm1
-; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps vf128(%rip), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq __divtf3
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128_1Div:
@@ -810,10 +850,16 @@ define dso_local void @Test128Rem(fp128 %d1, fp128 %d2) nounwind {
;
; WIN-LABEL: Test128Rem:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq fmodl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Rem:
@@ -896,12 +942,16 @@ define dso_local void @Test128_1Rem(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128_1Rem:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
-; WIN-NEXT: movaps %xmm0, %xmm1
-; WIN-NEXT: movaps vf128(%rip), %xmm0
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps vf128(%rip), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
; WIN-NEXT: callq fmodl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $72, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128_1Rem:
@@ -977,10 +1027,13 @@ define dso_local void @Test128Sqrt(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Sqrt:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq sqrtl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Sqrt:
@@ -1052,10 +1105,13 @@ define dso_local void @Test128Sin(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Sin:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq sinl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Sin:
@@ -1127,10 +1183,13 @@ define dso_local void @Test128Cos(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Cos:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq cosl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Cos:
@@ -1202,10 +1261,13 @@ define dso_local void @Test128Ceil(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Ceil:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq ceill
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Ceil:
@@ -1277,10 +1339,13 @@ define dso_local void @Test128Floor(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Floor:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq floorl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Floor:
@@ -1352,10 +1417,13 @@ define dso_local void @Test128Trunc(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Trunc:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq truncl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Trunc:
@@ -1427,10 +1495,13 @@ define dso_local void @Test128Nearbyint(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Nearbyint:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq nearbyintl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Nearbyint:
@@ -1502,10 +1573,13 @@ define dso_local void @Test128Rint(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Rint:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq rintl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Rint:
@@ -1577,10 +1651,13 @@ define dso_local void @Test128Round(fp128 %d1) nounwind {
;
; WIN-LABEL: Test128Round:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: subq $40, %rsp
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; WIN-NEXT: callq roundl
; WIN-NEXT: movaps %xmm0, vf128(%rip)
-; WIN-NEXT: addq $40, %rsp
+; WIN-NEXT: addq $56, %rsp
; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Round:
@@ -1657,7 +1734,19 @@ define fp128 @Test128FMA(fp128 %a, fp128 %b, fp128 %c) nounwind {
;
; WIN-LABEL: Test128FMA:
; WIN: # %bb.0: # %entry
-; WIN-NEXT: jmp fmal # TAILCALL
+; WIN-NEXT: subq $88, %rsp
+; WIN-NEXT: movaps (%r8), %xmm0
+; WIN-NEXT: movaps (%rcx), %xmm1
+; WIN-NEXT: movaps (%rdx), %xmm2
+; WIN-NEXT: movaps %xmm2, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %r8
+; WIN-NEXT: callq fmal
+; WIN-NEXT: addq $88, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128FMA:
; WIN-X86: # %bb.0: # %entry
@@ -1736,7 +1825,13 @@ define fp128 @Test128Acos(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Acos:
; WIN: # %bb.0:
-; WIN-NEXT: jmp acosl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq acosl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Acos:
; WIN-X86: # %bb.0:
@@ -1805,7 +1900,13 @@ define fp128 @Test128Asin(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Asin:
; WIN: # %bb.0:
-; WIN-NEXT: jmp asinl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq asinl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Asin:
; WIN-X86: # %bb.0:
@@ -1874,7 +1975,13 @@ define fp128 @Test128Atan(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Atan:
; WIN: # %bb.0:
-; WIN-NEXT: jmp atanl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq atanl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Atan:
; WIN-X86: # %bb.0:
@@ -1947,7 +2054,16 @@ define fp128 @Test128Atan2(fp128 %a, fp128 %b) nounwind {
;
; WIN-LABEL: Test128Atan2:
; WIN: # %bb.0:
-; WIN-NEXT: jmp atan2l # TAILCALL
+; WIN-NEXT: subq $72, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps (%rdx), %xmm1
+; WIN-NEXT: movaps %xmm1, {{[0-9]+}}(%rsp)
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rdx
+; WIN-NEXT: callq atan2l
+; WIN-NEXT: addq $72, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Atan2:
; WIN-X86: # %bb.0:
@@ -2020,7 +2136,13 @@ define fp128 @Test128Cosh(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Cosh:
; WIN: # %bb.0:
-; WIN-NEXT: jmp coshl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq coshl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Cosh:
; WIN-X86: # %bb.0:
@@ -2089,7 +2211,13 @@ define fp128 @Test128Sinh(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Sinh:
; WIN: # %bb.0:
-; WIN-NEXT: jmp sinhl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq sinhl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Sinh:
; WIN-X86: # %bb.0:
@@ -2158,7 +2286,13 @@ define fp128 @Test128Tan(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Tan:
; WIN: # %bb.0:
-; WIN-NEXT: jmp tanl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq tanl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Tan:
; WIN-X86: # %bb.0:
@@ -2227,7 +2361,13 @@ define fp128 @Test128Tanh(fp128 %a) nounwind {
;
; WIN-LABEL: Test128Tanh:
; WIN: # %bb.0:
-; WIN-NEXT: jmp tanhl # TAILCALL
+; WIN-NEXT: subq $56, %rsp
+; WIN-NEXT: movaps (%rcx), %xmm0
+; WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
+; WIN-NEXT: callq tanhl
+; WIN-NEXT: addq $56, %rsp
+; WIN-NEXT: retq
;
; WIN-X86-LABEL: Test128Tanh:
; WIN-X86: # %bb.0:
diff --git a/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll b/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
index b22533a8c8ee2..50a967e1c2a1a 100644
--- a/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
+++ b/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
@@ -780,9 +780,12 @@ define i32 @t_to_u32(fp128 %a) nounwind {
;
; X64-AVX512-WIN-LABEL: t_to_u32:
; X64-AVX512-WIN: # %bb.0:
-; X64-AVX512-WIN-NEXT: subq $40, %rsp
+; X64-AVX512-WIN-NEXT: subq $56, %rsp
+; X64-AVX512-WIN-NEXT: vmovaps (%rcx), %xmm0
+; X64-AVX512-WIN-NEXT: vmovaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-AVX512-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-AVX512-WIN-NEXT: callq __fixunstfsi
-; X64-AVX512-WIN-NEXT: addq $40, %rsp
+; X64-AVX512-WIN-NEXT: addq $56, %rsp
; X64-AVX512-WIN-NEXT: retq
;
; X64-AVX512-LIN-LABEL: t_to_u32:
@@ -815,9 +818,12 @@ define i32 @t_to_u32(fp128 %a) nounwind {
;
; X64-SSE-WIN-LABEL: t_to_u32:
; X64-SSE-WIN: # %bb.0:
-; X64-SSE-WIN-NEXT: subq $40, %rsp
+; X64-SSE-WIN-NEXT: subq $56, %rsp
+; X64-SSE-WIN-NEXT: movaps (%rcx), %xmm0
+; X64-SSE-WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-SSE-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-SSE-WIN-NEXT: callq __fixunstfsi
-; X64-SSE-WIN-NEXT: addq $40, %rsp
+; X64-SSE-WIN-NEXT: addq $56, %rsp
; X64-SSE-WIN-NEXT: retq
;
; X64-SSE-LIN-LABEL: t_to_u32:
@@ -872,9 +878,12 @@ define i32 @t_to_s32(fp128 %a) nounwind {
;
; X64-AVX512-WIN-LABEL: t_to_s32:
; X64-AVX512-WIN: # %bb.0:
-; X64-AVX512-WIN-NEXT: subq $40, %rsp
+; X64-AVX512-WIN-NEXT: subq $56, %rsp
+; X64-AVX512-WIN-NEXT: vmovaps (%rcx), %xmm0
+; X64-AVX512-WIN-NEXT: vmovaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-AVX512-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-AVX512-WIN-NEXT: callq __fixtfsi
-; X64-AVX512-WIN-NEXT: addq $40, %rsp
+; X64-AVX512-WIN-NEXT: addq $56, %rsp
; X64-AVX512-WIN-NEXT: retq
;
; X64-AVX512-LIN-LABEL: t_to_s32:
@@ -907,9 +916,12 @@ define i32 @t_to_s32(fp128 %a) nounwind {
;
; X64-SSE-WIN-LABEL: t_to_s32:
; X64-SSE-WIN: # %bb.0:
-; X64-SSE-WIN-NEXT: subq $40, %rsp
+; X64-SSE-WIN-NEXT: subq $56, %rsp
+; X64-SSE-WIN-NEXT: movaps (%rcx), %xmm0
+; X64-SSE-WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-SSE-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-SSE-WIN-NEXT: callq __fixtfsi
-; X64-SSE-WIN-NEXT: addq $40, %rsp
+; X64-SSE-WIN-NEXT: addq $56, %rsp
; X64-SSE-WIN-NEXT: retq
;
; X64-SSE-LIN-LABEL: t_to_s32:
diff --git a/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll b/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll
index 86d4be9cb7af6..f516db8b30ffe 100644
--- a/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll
+++ b/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll
@@ -1435,9 +1435,12 @@ define i64 @t_to_u64(fp128 %a) nounwind {
;
; X64-AVX512-WIN-LABEL: t_to_u64:
; X64-AVX512-WIN: # %bb.0:
-; X64-AVX512-WIN-NEXT: subq $40, %rsp
+; X64-AVX512-WIN-NEXT: subq $56, %rsp
+; X64-AVX512-WIN-NEXT: vmovaps (%rcx), %xmm0
+; X64-AVX512-WIN-NEXT: vmovaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-AVX512-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-AVX512-WIN-NEXT: callq __fixunstfdi
-; X64-AVX512-WIN-NEXT: addq $40, %rsp
+; X64-AVX512-WIN-NEXT: addq $56, %rsp
; X64-AVX512-WIN-NEXT: retq
;
; X64-AVX512-LIN-LABEL: t_to_u64:
@@ -1470,9 +1473,12 @@ define i64 @t_to_u64(fp128 %a) nounwind {
;
; X64-SSE-WIN-LABEL: t_to_u64:
; X64-SSE-WIN: # %bb.0:
-; X64-SSE-WIN-NEXT: subq $40, %rsp
+; X64-SSE-WIN-NEXT: subq $56, %rsp
+; X64-SSE-WIN-NEXT: movaps (%rcx), %xmm0
+; X64-SSE-WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-SSE-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-SSE-WIN-NEXT: callq __fixunstfdi
-; X64-SSE-WIN-NEXT: addq $40, %rsp
+; X64-SSE-WIN-NEXT: addq $56, %rsp
; X64-SSE-WIN-NEXT: retq
;
; X64-SSE-LIN-LABEL: t_to_u64:
@@ -1527,9 +1533,12 @@ define i64 @t_to_s64(fp128 %a) nounwind {
;
; X64-AVX512-WIN-LABEL: t_to_s64:
; X64-AVX512-WIN: # %bb.0:
-; X64-AVX512-WIN-NEXT: subq $40, %rsp
+; X64-AVX512-WIN-NEXT: subq $56, %rsp
+; X64-AVX512-WIN-NEXT: vmovaps (%rcx), %xmm0
+; X64-AVX512-WIN-NEXT: vmovaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-AVX512-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-AVX512-WIN-NEXT: callq __fixtfdi
-; X64-AVX512-WIN-NEXT: addq $40, %rsp
+; X64-AVX512-WIN-NEXT: addq $56, %rsp
; X64-AVX512-WIN-NEXT: retq
;
; X64-AVX512-LIN-LABEL: t_to_s64:
@@ -1562,9 +1571,12 @@ define i64 @t_to_s64(fp128 %a) nounwind {
;
; X64-SSE-WIN-LABEL: t_to_s64:
; X64-SSE-WIN: # %bb.0:
-; X64-SSE-WIN-NEXT: subq $40, %rsp
+; X64-SSE-WIN-NEXT: subq $56, %rsp
+; X64-SSE-WIN-NEXT: movaps (%rcx), %xmm0
+; X64-SSE-WIN-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
+; X64-SSE-WIN-NEXT: leaq {{[0-9]+}}(%rsp), %rcx
; X64-SSE-WIN-NEXT: callq __fixtfdi
-; X64-SSE-WIN-NEXT: addq $40, %rsp
+; X64-SSE-WIN-NEXT: addq $56, %rsp
; X64-SSE-WIN-NEXT: retq
;
; X64-SSE-LIN-LABEL: t_to_s64:
More information about the llvm-commits
mailing list