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

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


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Wed, 18 Dec 2019 16:11:41 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XiJ9Sh4EWd7aGaqPEXtNZxfn2F9u1bgCmirqtYe9Q8g=; b=UulBuj3KeMJSljF4azjh/P4kJFAO0kKSWVqIe4gBePR1cU8wRf5HQnmq2v8g/4JDDdqdtBzPtV54r7Pc42r6XD2jiK3dnKu++mjI0Mx2sMdQcRW9DHtXeGnlH/eXQAmxraiJltrOacQ5hJTpfaF49NnwFAq5rklj5TcYg60TxgAz1d/araqG+2NBw5XW8tq8S2aH+mvH4RW/Px0ylCf7VtvPy3hoa+47+35KW5xfGzgH7U8//zaTPjxpG4uU1+ssAAhLhe7sViMuwgxmdmHzrRtkBjm7ww4WRqxyqXpABvj+A0ldZR4bTIyXZzGxlQfObW5CbdNpRYJEpwkrHuzKqw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YGTTIqGUnPrzbHFacgVjSHAAdHmSJaF6YEMNhSFRZ7raV4Fa0+Otze8s/eIXn8hCXyHqk8OF9WFgKu+pfh6dLaPCNbk/KD4T3b0asjjcSUluQex+fhr4ErBS5fgxtWA4kfmoZiry0QUy5O4MejZfs+QXkvdN7ROR1Qo2CrJaoEb7GnPE/STTWaF+qyv0SJ+I+HYwaxnLZYtzuh5T9zRaToH5dbms71tNci7KEOGvea/92b5eeV3tCnpVW4OuSjRDx6UNmPbrE6GcD8IYUNNiLJMNHvAI+UxWXm+Y5taVVT6FP5VUbS8btXf0lOlpXSOuvqI2tTk+MWQ16049RNuSWA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>, Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 18 Dec 2019 16:12:03 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVtb3VtkOp9lMc20iLa8nonMbKeg==
  • Thread-topic: [UNIKRAFT/BOOST v2 PATCH 4/6] Add fenv.h header

From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>
---
 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®.