kit

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

fp_lib_undef.h (1862B)


      1 //===-- fp_lib_undef.h - Reset bare-name aliases set by fp_lib.h ---------===//
      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 // Use between two #include "fp_lib.h" calls in one TU when switching
      8 // precision (e.g. SINGLE → DOUBLE in a consolidated soft-float source).
      9 // Clears the bare-name #define aliases (rep_t, fp_t, signBit, ...) and
     10 // the SINGLE/DOUBLE/QUAD_PRECISION marker so the next fp_lib.h
     11 // inclusion can set up a fresh set. Leaves the suffix-renamed
     12 // definitions (rep_t_sf, etc.) intact for any code that still
     13 // references them post-undef.
     14 //===----------------------------------------------------------------------===//
     15 
     16 // Bare-name aliases for typedefs and static inlines.
     17 #undef half_rep_t
     18 #undef rep_t
     19 #undef srep_t
     20 #undef fp_t
     21 #undef twice_rep_t
     22 #undef rep_clz
     23 #undef wideMultiply
     24 #undef toRep
     25 #undef fromRep
     26 #undef normalize
     27 #undef wideLeftShift
     28 #undef wideRightShiftWithSticky
     29 #undef __compiler_rt_logbX
     30 #undef __compiler_rt_scalbnX
     31 #undef __compiler_rt_fmaxX
     32 
     33 // Per-precision value macros.
     34 #undef HALF_REP_C
     35 #undef REP_C
     36 #undef significandBits
     37 #undef TF_MANT_DIG
     38 
     39 // Width-derived value macros.
     40 #undef typeWidth
     41 #undef exponentBits
     42 #undef maxExponent
     43 #undef exponentBias
     44 #undef implicitBit
     45 #undef significandMask
     46 #undef signBit
     47 #undef absMask
     48 #undef exponentMask
     49 #undef oneRep
     50 #undef infRep
     51 #undef quietBit
     52 #undef qnanRep
     53 
     54 // QUAD-only long-double aliases.
     55 #undef __compiler_rt_logbl
     56 #undef __compiler_rt_scalbnl
     57 #undef __compiler_rt_fmaxl
     58 #undef crt_fabstf
     59 #undef crt_copysigntf
     60 
     61 // Precision selector and internal helpers.
     62 #undef SINGLE_PRECISION
     63 #undef DOUBLE_PRECISION
     64 #undef QUAD_PRECISION
     65 #undef FP_LIB_SUFFIX
     66 #undef _FP_PASTE_
     67 #undef _FP_PASTE
     68 #undef _FP_NAME