[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master ae3dc97 3/7: Test for x87
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master ae3dc97 3/7: Test for x87 |
Date: |
Thu, 5 Jan 2017 03:41:39 +0000 (UTC) |
branch: master
commit ae3dc97478748670f1b770929830776dd60771ae
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Test for x87
---
config.hpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/config.hpp b/config.hpp
index 72c9164..7f0557b 100644
--- a/config.hpp
+++ b/config.hpp
@@ -148,6 +148,22 @@ namespace fs = boost::filesystem;
# define LMI_MSVCRT
#endif // Compilers that use the msvc C runtime, without corrections such as
libmingwex.
+// Test for x87.
+//
+// For gcc, test the __SSE_MATH__ macro. It might seem logical to test
+// the __SSE__ macro instead; however, for x86_64, gcc defines __SSE__
+// even if SSE is explicitly disabled with '-mfpmath=387'.
+
+#if defined LMI_X86
+# if defined __GNUC__ && !defined __SSE_MATH__
+# define LMI_X87
+# elif defined LMI_MSC && defined _M_IX86_FP && _M_IX86_FP == 0
+# define LMI_X87
+# else // Unknown compiler.
+# error Unknown compiler--cannot detect SSE. Consider contributing
support.
+# endif // Unknown compiler.
+#endif // defined LMI_X86
+
#if defined HAVE_CONFIG_H // Using autoconf.
# include "config.h"
#else // Not using autoconf.
- [lmi-commits] [lmi] master updated (4cc9f66 -> 571924b), Greg Chicares, 2017/01/04
- [lmi-commits] [lmi] master ae3dc97 3/7: Test for x87,
Greg Chicares <=
- [lmi-commits] [lmi] master 73e6bec 1/7: Do not indent top-level preprocessor directives, Greg Chicares, 2017/01/04
- [lmi-commits] [lmi] master ea356b1 4/7: Improve documentation, Greg Chicares, 2017/01/04
- [lmi-commits] [lmi] master 13090e1 2/7: Update reserved-name exceptions in coding rules, Greg Chicares, 2017/01/04
- [lmi-commits] [lmi] master 2c16778 5/7: Refactor to make ensuing changes simpler, Greg Chicares, 2017/01/04
- [lmi-commits] [lmi] master 571924b 7/7: Drop support for an ancient non-free compiler, Greg Chicares, 2017/01/04
- [lmi-commits] [lmi] master c07baf8 6/7: Conditionalize x87 code; provide <cfenv> alternatives where possible, Greg Chicares, 2017/01/04