kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

tf_supplement.h (853B)


      1 //===-- tf_supplement.h - binary128 long double support ------------------===//
      2 //
      3 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
      4 //
      5 // Include via -include when compiling lib/fp_tf/ on a target where
      6 // long double is IEEE binary128 (e.g. aarch64-linux with -mlong-double-128).
      7 //===----------------------------------------------------------------------===//
      8 #ifndef TF_SUPPLEMENT_H
      9 #define TF_SUPPLEMENT_H
     10 
     11 // Pre-included before the translation unit; bring int_lib.h in directly so
     12 // the per-target typedefs (uqwords, Lcomplex) it defines are available below.
     13 #include <stdint.h>
     14 
     15 #include "int_lib.h"
     16 
     17 typedef long double tf_float;
     18 #define CRT_LDBL_128BIT
     19 #define CRT_HAS_F128
     20 #define CRT_HAS_IEEE_TF
     21 #define CRT_LDBL_IEEE_F128
     22 #define TF_C(x) x##L
     23 #define CRT_HAS_TF_MODE
     24 
     25 typedef union {
     26   uqwords u;
     27   tf_float f;
     28 } tf_bits;
     29 
     30 #endif