* config/mips/mips.c (mips_asan_shadow_offset): New function.
(TARGET_ASAN_SHADOW_OFFSET): Define.
* config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
true for -fsanitize=address.
Co-Authored-By: Jean Lee <xiaoyur347@gmail.com>
From-SVN: r259666
+2018-03-22 Hans-Peter Nilsson <hp@axis.com>
+ Jean Lee <xiaoyur347@gmail.com>
+
+ * config/mips/mips.c (mips_asan_shadow_offset): New function.
+ (TARGET_ASAN_SHADOW_OFFSET): Define.
+ * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
+ true for -fsanitize=address.
+
2018-04-25 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
return align;
}
+/* Implement the TARGET_ASAN_SHADOW_OFFSET hook. */
+
+static unsigned HOST_WIDE_INT
+mips_asan_shadow_offset (void)
+{
+ return 0x0aaa0000;
+}
+
/* Implement TARGET_STARTING_FRAME_OFFSET. See mips_compute_frame_info
for details about the frame layout. */
#undef TARGET_CONSTANT_ALIGNMENT
#define TARGET_CONSTANT_ALIGNMENT mips_constant_alignment
+#undef TARGET_ASAN_SHADOW_OFFSET
+#define TARGET_ASAN_SHADOW_OFFSET mips_asan_shadow_offset
+
#undef TARGET_STARTING_FRAME_OFFSET
#define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset
#define STACK_GROWS_DOWNWARD 1
-#define FRAME_GROWS_DOWNWARD flag_stack_protect
+#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0 \
+ || (flag_sanitize & SANITIZE_ADDRESS) != 0)
/* Size of the area allocated in the frame to save the GP. */