This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] RFC asan support for i?86/x86_64-*freebsd*


Hi!

On 01.12.15 13:22, Uros Bizjak wrote:

2015-11-29  Andreas Tobler  <andreast@gcc.gnu.org>

* config/i386/i386.h: Define two new macros:
SUBTARGET_SHADOW_OFFSET_64 and SUBTARGET_SHADOW_OFFSET_32.
* config/i386/i386.c (ix86_asan_shadow_offset): Use these macros.
* config/i386/darwin.h: Override the SUBTARGET_SHADOW_OFFSET_64
macro.
* config/i386/freebsd.h: Override the SUBTARGET_SHADOW_OFFSET_64
and the SUBTARGET_SHADOW_OFFSET_32 macro.
* config/freebsd.h (LIBASAN_EARLY_SPEC): Define.
(LIBTSAN_EARLY_SPEC): Likewise.
(LIBLSAN_EARLY_SPEC): Likewise.

IMO, there is no compelling reason for _64 and _32 subtargets split,
especially since it depends on TARGET_LP64, not on the usual
TARGET_64BIT. Due to this, I'd rather introduce only
TARGET_SHADOW_OFFSET, like:

#define TARGET_SHADOW_OFFSET \
   (TARGET_LP64 ? HOST_WIDE_INT_C (0x7fff8000) : HOST_WIDE_INT_1 << 29)

(and similar for other targets).

Thank you for the feedback. I put your suggestion into my local tree and the results are equal. Thanks, diff reduced :)

Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]