[clang-tidy][NFC]remove deps of clang in clang tidy test (#116588)
[llvm-project.git] / libc / include / llvm-libc-types / fenv_t.h
blobc83f23894c0c8146b1e5bcbf1015c6c5d7dd35bd
1 //===-- Definition of type fenv_t -----------------------------------------===//
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_TYPES_FENV_T_H
10 #define LLVM_LIBC_TYPES_FENV_T_H
12 #ifdef __aarch64__
13 typedef struct {
14 unsigned char __control_word[4];
15 unsigned char __status_word[4];
16 } fenv_t;
17 #elif defined(__x86_64__)
18 typedef struct {
19 unsigned char __x86_status[28];
20 unsigned char __mxcsr[4];
21 } fenv_t;
22 #elif defined(__arm__) || defined(_M_ARM)
23 typedef struct {
24 unsigned int __fpscr;
25 } fenv_t;
26 #elif defined(__riscv)
27 typedef unsigned int fenv_t;
28 #elif defined(__AMDGPU__) || defined(__NVPTX__)
29 typedef struct {
30 unsigned int __fpc;
31 } fenv_t;
32 #else
33 #error "fenv_t not defined for your platform"
34 #endif
36 #endif // LLVM_LIBC_TYPES_FENV_T_H