aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2018-04-26 01:21:32 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2018-04-26 01:21:32 +0000
commite92306590ef0c4e51a0fc0053469a28ed60b1c1c (patch)
tree3cb454fc989809387d794448cfc811acbac5b736 /gcc/config/mips/mips.c
parent752361c980da04bd5a386d09af4388dac993c9b7 (diff)
downloadgcc-e92306590ef0c4e51a0fc0053469a28ed60b1c1c.zip
gcc-e92306590ef0c4e51a0fc0053469a28ed60b1c1c.tar.gz
gcc-e92306590ef0c4e51a0fc0053469a28ed60b1c1c.tar.bz2
mips.c (mips_asan_shadow_offset): New function.
* 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
Diffstat (limited to 'gcc/config/mips/mips.c')
-rw-r--r--gcc/config/mips/mips.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index aabd4b1..bfe64bb 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -22307,6 +22307,14 @@ mips_constant_alignment (const_tree exp, HOST_WIDE_INT align)
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. */
@@ -22618,6 +22626,9 @@ mips_starting_frame_offset (void)
#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