[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT/BOOST PATCH 4/6] Add fenv.h header



Hi Vlad, this patch looks good.  

Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

On 11.12.19, 01:32, "Vlad-Andrei BĂDOIU (78692)" 
<vlad_andrei.badoiu@xxxxxxxxxxxxxxx> wrote:

    Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
    ---
     include/fenv.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
     1 file changed, 60 insertions(+)
     create mode 100644 include/fenv.h
    
    diff --git a/include/fenv.h b/include/fenv.h
    new file mode 100644
    index 0000000..207bf84
    --- /dev/null
    +++ b/include/fenv.h
    @@ -0,0 +1,60 @@
    +/* SPDX-License-Identifier: MIT */                                         
                                                                                
                                                        
    +/* ----------------------------------------------------------------------
    + * Copyright <C2><A9> 2005-2014 Rich Felker, et al.
    + *
    + * Permission is hereby granted, free of charge, to any person obtaining
    + * a copy of this software and associated documentation files (the
    + * "Software"), to deal in the Software without restriction, including
    + * without limitation the rights to use, copy, modify, merge, publish,
    + * distribute, sublicense, and/or sell copies of the Software, and to
    + * permit persons to whom the Software is furnished to do so, subject to
    + * the following conditions:
    + *
    + * The above copyright notice and this permission notice shall be
    + * included in all copies or substantial portions of the Software.
    + *
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    + * ----------------------------------------------------------------------
    + */
    +/* Taken from musl-1.1.19 */
    +
    +#define FE_INVALID    1
    +#define __FE_DENORM   2
    +#define FE_DIVBYZERO  4
    +#define FE_OVERFLOW   8
    +#define FE_UNDERFLOW  16
    +#define FE_INEXACT    32
    +
    +//#define FE_ALL_EXCEPT 63
    +
    +#define FE_TONEAREST  0
    +#define FE_DOWNWARD   0x400
    +#define FE_UPWARD     0x800
    +#define FE_TOWARDZERO 0xc00
    +
    +typedef unsigned short fexcept_t;
    +
    +typedef struct {
    +   unsigned short __control_word;
    +   unsigned short __unused1;
    +   unsigned short __status_word;
    +   unsigned short __unused2;
    +   unsigned short __tags;
    +   unsigned short __unused3;
    +   unsigned int __eip;
    +   unsigned short __cs_selector;
    +   unsigned int __opcode:11;
    +   unsigned int __unused4:5;
    +   unsigned int __data_offset;
    +   unsigned short __data_selector;
    +   unsigned short __unused5;
    +   unsigned int __mxcsr;
    +} fenv_t;
    +
    +#define FE_DFL_ENV      ((const fenv_t *) -1)
    -- 
    2.20.1
    
    

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.