Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/dist/gcc/config/i386 define a X86_32_ASAN_...



details:   https://anonhg.NetBSD.org/src/rev/34c679c25605
branches:  trunk
changeset: 1022312:34c679c25605
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jul 11 22:41:38 2021 +0000

description:
define a X86_32_ASAN_BIT_OFFSET macro that defaults differently on
netbsd/i386 than other x86-32 targets.

fixes PR#56280.

diffstat:

 external/gpl3/gcc/dist/gcc/config/i386/i386.c       |  2 +-
 external/gpl3/gcc/dist/gcc/config/i386/i386.h       |  3 +++
 external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h |  4 ++++
 external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h   |  4 ++++
 4 files changed, 12 insertions(+), 1 deletions(-)

diffs (47 lines):

diff -r 9c4d28b9af15 -r 34c679c25605 external/gpl3/gcc/dist/gcc/config/i386/i386.c
--- a/external/gpl3/gcc/dist/gcc/config/i386/i386.c     Sun Jul 11 22:41:36 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/i386/i386.c     Sun Jul 11 22:41:38 2021 +0000
@@ -1399,7 +1399,7 @@
 {
   return TARGET_LP64 ? (TARGET_MACHO ? (HOST_WIDE_INT_1 << 44)
                                     : HOST_WIDE_INT_C (0x7fff8000))
-                    : (HOST_WIDE_INT_1 << 29);
+                    : (HOST_WIDE_INT_1 << X86_32_ASAN_BIT_OFFSET);
 }
 
 /* Argument support functions.  */
diff -r 9c4d28b9af15 -r 34c679c25605 external/gpl3/gcc/dist/gcc/config/i386/i386.h
--- a/external/gpl3/gcc/dist/gcc/config/i386/i386.h     Sun Jul 11 22:41:36 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/i386/i386.h     Sun Jul 11 22:41:38 2021 +0000
@@ -2975,6 +2975,9 @@
 #define NUM_X86_64_MS_CLOBBERED_REGS 12
 #endif
 
+/* Standard location for 32-bit ASAN shadow map.  */
+#define X86_32_ASAN_BIT_OFFSET 29
+
 /*
 Local variables:
 version-control: t
diff -r 9c4d28b9af15 -r 34c679c25605 external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h
--- a/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h       Sun Jul 11 22:41:36 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/i386/netbsd-elf.h       Sun Jul 11 22:41:38 2021 +0000
@@ -129,3 +129,7 @@
 /* Preserve i386 psABI  */
 #undef PREFERRED_STACK_BOUNDARY_DEFAULT
 #define PREFERRED_STACK_BOUNDARY_DEFAULT MIN_STACK_BOUNDARY
+
+/* NetBSD/x86 on 32-bit places the ASAN shadow map at 0x40000000.  */
+#undef X86_32_ASAN_BIT_OFFSET
+#define X86_32_ASAN_BIT_OFFSET 30
diff -r 9c4d28b9af15 -r 34c679c25605 external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h
--- a/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h Sun Jul 11 22:41:36 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/i386/netbsd64.h Sun Jul 11 22:41:38 2021 +0000
@@ -73,3 +73,7 @@
   ((TARGET_64BIT || TARGET_SSE) ? 128 : 32)
 
 #define HAVE_ENABLE_EXECUTE_STACK
+
+/* NetBSD/x86 on 32-bit places the ASAN shadow map at 0x40000000.  */
+#undef X86_32_ASAN_BIT_OFFSET
+#define X86_32_ASAN_BIT_OFFSET 30



Home | Main Index | Thread Index | Old Index