This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 4/4] Check __x86_64__ for FPU state
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, konstantin dot s dot serebryany at gmail dot com
- Date: Tue, 5 Nov 2013 06:01:24 -0800
- Subject: [PATCH 4/4] Check __x86_64__ for FPU state
- Authentication-results: sourceware.org; auth=none
X32 uses the same FPU state as x86-64. Please install it. Thanks.
H.J.
---
libsanitizer/ChangeLog.x32 | 6 ++++++
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libsanitizer/ChangeLog.x32 b/libsanitizer/ChangeLog.x32
index 51d0fd4..23b7fc9 100644
--- a/libsanitizer/ChangeLog.x32
+++ b/libsanitizer/ChangeLog.x32
@@ -1,5 +1,11 @@
2013-11-05 H.J. Lu <hongjiu.lu@intel.com>
+ * sanitizer_common/sanitizer_platform_limits_posix.cc
+ (struct_user_fpxregs_struct_sz): Initialize to 0 if __x86_64__ is
+ defined.
+
+2013-11-05 H.J. Lu <hongjiu.lu@intel.com>
+
* sanitizer_common/sanitizer_platform_limits_linux.cc
(struct_kernel_stat64_sz): Initialize to 0 if __x86_64__ is
defined.
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 971a193..b771583 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -191,7 +191,7 @@ namespace __sanitizer {
(defined(__i386) || defined (__x86_64)) // NOLINT
unsigned struct_user_regs_struct_sz = sizeof(struct user_regs_struct);
unsigned struct_user_fpregs_struct_sz = sizeof(struct user_fpregs_struct);
-#if __WORDSIZE == 64
+#ifdef __x86_64
unsigned struct_user_fpxregs_struct_sz = 0;
#else
unsigned struct_user_fpxregs_struct_sz = sizeof(struct user_fpxregs_struct);
--
1.8.3.1