1 //===-- Platform specific macro definitions ---------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_PLATFORM_DEFS_H
10 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_PLATFORM_DEFS_H
11 
12 #include "src/__support/architectures.h"
13 
14 #if defined(LLVM_LIBC_ARCH_X86)
15 #define X87_FPU
16 #endif
17 
18 // https://developer.arm.com/documentation/dui0491/i/C-and-C---Implementation-Details/Basic-data-types
19 // https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
20 #if defined(_WIN32) || defined(__arm__) ||                                     \
21     (defined(__APPLE__) && defined(__aarch64__))
22 #define LONG_DOUBLE_IS_DOUBLE
23 #endif
24 
25 #if !defined(LONG_DOUBLE_IS_DOUBLE) && defined(X87_FPU)
26 #define SPECIAL_X86_LONG_DOUBLE
27 #endif
28 
29 #endif // LLVM_LIBC_SRC_SUPPORT_FPUTIL_PLATFORM_DEFS_H
30