+2018-10-01 Tamar Christina <tamar.christina@arm.com>
+
+ PR target/86486
+ * gcc.dg/pr82788.c: Skip for AArch64.
+ * gcc.dg/guality/vla-1.c: Turn off stack-clash.
+ * gcc.target/aarch64/subsp.c: Likewise.
+ * gcc.dg/params/blocksort-part.c: Skip stack-clash checks
+ on AArch64.
+ * gcc.dg/stack-check-10.c: Add AArch64 specific checks.
+ * gcc.dg/stack-check-12.c: ILP32 fixup.
+ * gcc.dg/stack-check-5.c: Add AArch64 specific checks.
+ * gcc.dg/stack-check-6a.c: Skip on AArch64, we don't support this.
+ * testsuite/lib/target-supports.exp
+ (check_effective_target_frame_pointer_for_non_leaf): AArch64 does not
+ require frame pointer for non-leaf functions.
+
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
/* { dg-do run } */
-/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable" } */
+/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable -fno-stack-clash-protection" } */
typedef long int V;
int x = -1;
+/* { dg-skip-if "AArch64 does not support these bounds." { aarch64*-*-* } { "--param stack-clash-protection-*" } } */
/*-------------------------------------------------------------*/
/*--- Block sorting machinery ---*/
/* { dg-do run } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-probe-interval=10 --param stack-clash-protection-guard-size=12" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-skip-if "AArch64 does not support this interval." { aarch64*-*-* } } */
int main() { int a[1442]; return 0;}
need a frame pointer. Otherwise neither should. */
/* { dg-final { scan-rtl-dump-times "Stack clash no frame pointer needed" 2 "pro_and_epilogue" { target { ! frame_pointer_for_non_leaf } } } } */
/* { dg-final { scan-rtl-dump-times "Stack clash frame pointer needed" 2 "pro_and_epilogue" { target { frame_pointer_for_non_leaf } } } } */
+/* { dg-final { scan-rtl-dump-times "Stack clash no probe small stack adjustment in prologue" 2 "pro_and_epilogue" { target { aarch64*-*-* } } } } */
/* { dg-final { scan-rtl-dump-times "Stack clash no frame pointer needed" 4 "pro_and_epilogue" { target { ! frame_pointer_for_non_leaf } } } } */
/* { dg-final { scan-rtl-dump-times "Stack clash no frame pointer needed" 2 "pro_and_epilogue" { target { frame_pointer_for_non_leaf } } } } */
/* { dg-final { scan-rtl-dump-times "Stack clash frame pointer needed" 2 "pro_and_epilogue" { target { frame_pointer_for_non_leaf } } } } */
-
+/* AArch64 won't require a probe here due to the allocation amount being less than 1KB. */
+/* { dg-final { scan-rtl-dump-times "Stack clash no probe small stack adjustment in prologue" 3 "pro_and_epilogue" { target { aarch64*-*-* } } } } */
+/* { dg-final { scan-rtl-dump-times "Stack clash no probe no stack adjustment in prologue" 1 "pro_and_epilogue" { target { aarch64*-*-* } } } } */
/* We have selected the size of the array in f2/f3 to be large enough
to not live in the red zone on targets that support it.
/* { dg-options "-O2 -fstack-clash-protection -fdump-rtl-pro_and_epilogue -fno-optimize-sibling-calls --param stack-clash-protection-probe-interval=12 --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
/* { dg-skip-if "" { *-*-* } { "-fstack-protector*" } { "" } } */
+/* { dg-skip-if "" { aarch64*-*-* } } */
#include "stack-check-6.c"
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-asynchronous-unwind-tables -fno-unwind-tables" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
-extern void arf (unsigned long int *, unsigned long int *);
+typedef unsigned __attribute__((mode(DI))) uint64_t;
+
+extern void arf (uint64_t *, uint64_t *);
void
frob ()
{
- unsigned long int num[10000];
- unsigned long int den[10000];
+ uint64_t num[10000];
+ uint64_t den[10000];
arf (den, num);
}
-/* { dg-options "-O" } */
+/* { dg-options "-O -fno-stack-clash-protection" } */
int foo (void *);
# Return 1 if the target creates a frame pointer for non-leaf functions
# Note we ignore cases where we apply tail call optimization here.
proc check_effective_target_frame_pointer_for_non_leaf { } {
- if { [istarget aarch*-*-*] } {
- return 1
- }
-
# Solaris/x86 defaults to -fno-omit-frame-pointer.
if { [istarget i?86-*-solaris*] || [istarget x86_64-*-solaris*] } {
return 1