diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2013-11-06 21:51:41 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2013-11-06 13:51:41 -0800 |
commit | f5c36cfc4b20a82994c2682c9457120c99b42911 (patch) | |
tree | 98d0382ba035de295335efe7490726b857c40956 /libsanitizer | |
parent | e45de14ec7cfe457637bfea7ad214ab6158eefe5 (diff) | |
download | gcc-f5c36cfc4b20a82994c2682c9457120c99b42911.zip gcc-f5c36cfc4b20a82994c2682c9457120c99b42911.tar.gz gcc-f5c36cfc4b20a82994c2682c9457120c99b42911.tar.bz2 |
Use 64-bit system types for x86-64
PR sanitizer/59018
* sanitizer_common/sanitizer_platform_limits_linux.cc
(struct_kernel_stat64_sz): Initialize to 0 if __x86_64__ is
defined.
* sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer_dirent): Use 64-bit d_ino/d_off if __x86_64__ is
defined.
(__sanitizer___kernel_uid_t): Typedef as unsigned if __x86_64__
is defined.
(__sanitizer___kernel_gid_t): Likewise.
(__sanitizer___kernel_off_t): Typedef as long long if __x86_64__
is defined.
From-SVN: r204482
Diffstat (limited to 'libsanitizer')
-rw-r--r-- | libsanitizer/ChangeLog | 15 | ||||
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc | 2 | ||||
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h | 7 |
3 files changed, 20 insertions, 4 deletions
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 6103d62..03b45e8 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,6 +1,21 @@ 2013-11-05 H.J. Lu <hongjiu.lu@intel.com> PR sanitizer/59018 + * sanitizer_common/sanitizer_platform_limits_linux.cc + (struct_kernel_stat64_sz): Initialize to 0 if __x86_64__ is + defined. + * sanitizer_common/sanitizer_platform_limits_posix.h + (__sanitizer_dirent): Use 64-bit d_ino/d_off if __x86_64__ is + defined. + (__sanitizer___kernel_uid_t): Typedef as unsigned if __x86_64__ + is defined. + (__sanitizer___kernel_gid_t): Likewise. + (__sanitizer___kernel_off_t): Typedef as long long if __x86_64__ + is defined. + +2013-11-05 H.J. Lu <hongjiu.lu@intel.com> + + PR sanitizer/59018 * sanitizer_common/sanitizer_linux.cc (internal_clone): Allocate 2 64-bit integers to save and restore fn and arg. Properly load newtls/child_tidptr into r8/r10. diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc index fbea596..9870243 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc @@ -31,7 +31,7 @@ namespace __sanitizer { unsigned struct_io_event_sz = sizeof(struct io_event); unsigned struct_iocb_sz = sizeof(struct iocb); -#ifndef _LP64 +#if !defined(_LP64) && !defined(__x86_64__) unsigned struct_kernel_stat64_sz = sizeof(struct stat64); #else unsigned struct_kernel_stat64_sz = 0; diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h index 007b4ec..67c459c 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h @@ -133,7 +133,7 @@ namespace __sanitizer { unsigned short d_reclen; // more fields that we don't care about }; -#elif SANITIZER_ANDROID +#elif SANITIZER_ANDROID || defined(__x86_64__) struct __sanitizer_dirent { unsigned long long d_ino; unsigned long long d_off; @@ -159,16 +159,17 @@ namespace __sanitizer { #endif #if SANITIZER_LINUX -#ifdef _LP64 +#if defined(_LP64) || defined(__x86_64__) typedef unsigned __sanitizer___kernel_uid_t; typedef unsigned __sanitizer___kernel_gid_t; + typedef long long __sanitizer___kernel_off_t; #else typedef unsigned short __sanitizer___kernel_uid_t; typedef unsigned short __sanitizer___kernel_gid_t; + typedef long __sanitizer___kernel_off_t; #endif typedef unsigned short __sanitizer___kernel_old_uid_t; typedef unsigned short __sanitizer___kernel_old_gid_t; - typedef long __sanitizer___kernel_off_t; typedef long long __sanitizer___kernel_loff_t; typedef struct { unsigned long fds_bits[1024 / (8 * sizeof(long))]; |