1 /* 2 * License for Berkeley SoftFloat Release 3e 3 * 4 * John R. Hauser 5 * 2018 January 20 6 * 7 * The following applies to the whole of SoftFloat Release 3e as well as to 8 * each source file individually. 9 * 10 * Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the 11 * University of California. All rights reserved. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions are met: 15 * 16 * 1. Redistributions of source code must retain the above copyright notice, 17 * this list of conditions, and the following disclaimer. 18 * 19 * 2. Redistributions in binary form must reproduce the above copyright 20 * notice, this list of conditions, and the following disclaimer in the 21 * documentation and/or other materials provided with the distribution. 22 * 23 * 3. Neither the name of the University nor the names of its contributors 24 * may be used to endorse or promote products derived from this software 25 * without specific prior written permission. 26 * 27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY 28 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE 30 * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY 31 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 32 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 33 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 34 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 * 38 * 39 * The functions listed in this file are modified versions of the ones 40 * from the Berkeley SoftFloat 3e Library. 41 */ 42 43 #ifndef _SOFTFLOAT_H_ 44 #define _SOFTFLOAT_H_ 45 46 #include <stdbool.h> 47 #include <stdint.h> 48 49 #ifdef __cplusplus 50 extern "C" { 51 #endif 52 53 double _mesa_double_add_rtz(double a, double b); 54 double _mesa_double_sub_rtz(double a, double b); 55 double _mesa_double_mul_rtz(double a, double b); 56 double _mesa_double_fma_rtz(double a, double b, double c); 57 float _mesa_float_fma_rtz(float a, float b, float c); 58 float _mesa_double_to_f32(double x, bool rtz); 59 uint16_t _mesa_float_to_half_rtz_slow(float x); 60 61 #ifdef __cplusplus 62 } /* extern C */ 63 #endif 64 65 #endif /* _SOFTFLOAT_H */ 66