-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86][MS] Add 80bit long double support for Windows
MSVC currently doesn't support 80 bits long double. But ICC does support it on Windows. Besides, there're also some users asked for this feature. We can find the discussions from stackoverflow, msdn etc. Given Clang has already support `-mlong-double-80`, extending it to support for Windows seems worthwhile. Reviewed By: rnk, erichkeane Differential Revision: https://reviews.llvm.org/D115441
- Loading branch information
1 parent
15dfe03
commit 3e19ba3
Showing
3 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -mlong-double-64 -o - | FileCheck %s --check-prefix=SIZE64 | ||
// RUN: %clang_cc1 -triple i386-windows-msvc %s -emit-llvm -mlong-double-80 -o - | FileCheck %s --check-prefix=SIZE80 | ||
// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -mlong-double-80 -o - | FileCheck %s --check-prefix=SIZE80 | ||
// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -mlong-double-128 -o - | FileCheck %s --check-prefix=SIZE128 | ||
// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -o - | FileCheck %s --check-prefix=SIZE64 | ||
|
||
long double global; | ||
// SIZE64: @global = dso_local global double 0 | ||
// SIZE80: @global = dso_local global x86_fp80 0xK{{0+}}, align 16 | ||
// SIZE128: @global = dso_local global fp128 0 | ||
|
||
long double func(long double param) { | ||
// SIZE64: define dso_local double @func(double noundef %param) | ||
// SIZE80: define dso_local x86_fp80 @func(x86_fp80 noundef %param) | ||
// SIZE128: define dso_local fp128 @func(fp128 noundef %param) | ||
long double local = param; | ||
// SIZE64: alloca double | ||
// SIZE80: alloca x86_fp80, align 16 | ||
// SIZE128: alloca fp128 | ||
local = param; | ||
return local + param; | ||
} |