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 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_LIBC_TYPES_FENV_T_H 10 #define LLVM_LIBC_TYPES_FENV_T_H 11 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 35 36 #endif // LLVM_LIBC_TYPES_FENV_T_H 37