configure.tgt: Enable build on powerpc*-linux.
authorPeter Bergner <bergner@vnet.ibm.com>
Thu, 6 Dec 2012 21:53:36 +0000 (15:53 -0600)
committerPeter Bergner <bergner@gcc.gnu.org>
Thu, 6 Dec 2012 21:53:36 +0000 (15:53 -0600)
libsanitizer/
* configure.tgt: Enable build on powerpc*-linux.

gcc/
* config/rs6000/sysv4.h (TARGET_ASAN_SHADOW_OFFSET): Define.
* config/rs6000/rs6000.c (rs6000_asan_shadow_offset): New function.
* config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Disable if using ASAN.

From-SVN: r194273

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/sysv4.h
libsanitizer/ChangeLog
libsanitizer/configure.tgt

index 0989c488e610cabb3e79a778476a84911bad8445..2ceada8b111da40d6c2ebe3be47bdd0ef889ea76 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-06  Peter Bergner  <bergner@vnet.ibm.com>
+
+       * config/rs6000/sysv4.h (TARGET_ASAN_SHADOW_OFFSET): Define.
+       * config/rs6000/rs6000.c (rs6000_asan_shadow_offset): New function.
+       * config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Disable if using ASAN.
+
 2012-12-06  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/55395
index 65ac42d71d10b86e9982625be424b64801c16d51..d25c63c43100d5edbf49b0b6c063d36fbd305140 100644 (file)
@@ -27529,6 +27529,15 @@ rs6000_final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
     }
 }
 
+/* Implement the TARGET_ASAN_SHADOW_OFFSET hook.  */
+
+#if TARGET_ELF
+static unsigned HOST_WIDE_INT
+rs6000_asan_shadow_offset (void)
+{
+  return (unsigned HOST_WIDE_INT) 1 << (TARGET_64BIT ? 41 : 29);
+}
+#endif
 \f
 /* Mask options that we want to support inside of attribute((target)) and
    #pragma GCC target operations.  Note, we do not include things like
index 2e23f6e523dae8b8ee2ba02a83d8cab213e54c4b..6edb09585257dc068955255660d97d61468b31b7 100644 (file)
@@ -1406,7 +1406,7 @@ extern enum reg_class rs6000_constraints[RS6000_CONSTRAINT_MAX];
 
    On the RS/6000, we grow upwards, from the area after the outgoing
    arguments.  */
-#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0)
+#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0 || flag_asan != 0)
 
 /* Size of the outgoing register save area */
 #define RS6000_REG_SAVE ((DEFAULT_ABI == ABI_AIX                       \
index 70a5908fbea8d43661d0747e4fd5a001d893ac8e..8459a8dd4a8493f865e21caf8069e4dca38d0172 100644 (file)
@@ -971,6 +971,9 @@ ncrtn.o%s"
 
 #define TARGET_ASM_FILE_END rs6000_elf_file_end
 
+#undef TARGET_ASAN_SHADOW_OFFSET
+#define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset
+
 /* This target uses the sysv4.opt file.  */
 #define TARGET_USES_SYSV4_OPT 1
 
index b2a4b2999a604d1f98c20c0f9dfd1772859db130..b35ec16d313ba87d5df5b47d5b3ac16ad2c39108 100644 (file)
@@ -1,3 +1,7 @@
+2012-12-06  Peter Bergner  <bergner@vnet.ibm.com>
+
+       * configure.tgt: Enable build on powerpc*-linux.
+
 2012-12-06  Jack Howarth <howarth@bromo.med.uc.edu>
 
        PR 55599/sanitizer
index 26335391c4a39b1b50c81a3de213e043d534a94a..b8ab311cb4ae969bfd0125393dc5fe68a6906ade 100644 (file)
@@ -25,6 +25,8 @@ case "${target}" in
                TSAN_SUPPORTED=yes
        fi
        ;;
+  powerpc*-*-linux*)
+       ;;
   sparc*-*-linux*)
        ;;
   x86_64-*-darwin* | i?86-*-darwin*)