Add dg-add-options feature stack_size
2017-06-21 Tom de Vries <tom@codesourcery.com> * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add stack_size feature. (Effective-Target Keywords, Other attributes): Suggest using dg-add-options stack_size feature to get stack limit in stack_size effective target documentation. * lib/target-supports.exp (add_options_for_stack_size): New proc. * gcc.c-torture/execute/920501-7.c: Use dg-add-options stack_size. * gcc.c-torture/compile/20080806-1.c: Same. * gcc.c-torture/compile/920723-1.c: Same. * gcc.c-torture/compile/930621-1.c: Same. * gcc.c-torture/compile/991214-2.c: Same. * gcc.c-torture/compile/bcopy.c: Same. * gcc.c-torture/compile/memtst.c: Same. * gcc.c-torture/compile/msp.c: Same. * gcc.c-torture/compile/stuct.c: Same. * gcc.c-torture/execute/20011008-3.c: Same. * gcc.c-torture/execute/20030209-1.c: Same. * gcc.c-torture/execute/20031012-1.c: Same. * gcc.c-torture/execute/20040805-1.c: Same. * gcc.c-torture/execute/920410-1.c: Same. * gcc.c-torture/execute/921113-1.c: Same. * gcc.c-torture/execute/921202-1.c: Same. * gcc.c-torture/execute/921208-2.c: Same. * gcc.c-torture/execute/930106-1.c: Same. * gcc.c-torture/execute/930406-1.c: Same. * gcc.c-torture/execute/950221-1.c: Same. * gcc.c-torture/execute/960521-1.c: Same. * gcc.c-torture/execute/980605-1.c: Same. * gcc.c-torture/execute/comp-goto-1.c: Same. * gcc.c-torture/execute/comp-goto-2.c: Same. * gcc.c-torture/execute/memcpy-1.c: Same. * gcc.c-torture/execute/multi-ix.c: Same. * gcc.c-torture/execute/nestfunc-4.c: Same. * gcc.c-torture/execute/pr20621-1.c: Same. * gcc.c-torture/execute/pr23135.c: Same. * gcc.c-torture/execute/pr28982b.c: Same. * gcc.dg/loop-3.c: Same. * gcc.dg/struct-ret-3.c: Same. * gcc.dg/torture/stackalign/comp-goto-1.c: Same. * gcc.dg/torture/stackalign/non-local-goto-4.c: Same. * gcc.dg/tree-prof/comp-goto-1.c: Same. * gcc.dg/tree-prof/pr44777.c: Same. From-SVN: r249440
This commit is contained in:
parent
ed39d22d1b
commit
6b92ab17be
40 changed files with 105 additions and 41 deletions
|
@ -1,3 +1,11 @@
|
|||
2017-06-21 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
|
||||
stack_size feature.
|
||||
(Effective-Target Keywords, Other attributes): Suggest using
|
||||
dg-add-options stack_size feature to get stack limit in stack_size
|
||||
effective target documentation.
|
||||
|
||||
2017-06-21 Julian Brown <julian@codesourcery.com>
|
||||
Naveen H.S <Naveen.Hurugalawadi@cavium.com>
|
||||
|
||||
|
|
|
@ -2097,11 +2097,10 @@ Target supports section anchors.
|
|||
Target defaults to short enums.
|
||||
|
||||
@item stack_size
|
||||
Target has limited stack size. The stack size limit can be obtained using
|
||||
@code{[dg-effective-target-value stack_size]}. For example:
|
||||
@smallexample
|
||||
/* @{ dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" @{ target @{ stack_size @} @} @} */
|
||||
@end smallexample
|
||||
@anchor{stack_size_et}
|
||||
Target has limited stack size. The stack size limit can be obtained using the
|
||||
STACK_SIZE macro defined by @ref{stack_size_ao,,@code{dg-add-options} feature
|
||||
@code{stack_size}}.
|
||||
|
||||
@item static
|
||||
Target supports @option{-static}.
|
||||
|
@ -2282,6 +2281,12 @@ compliance mode.
|
|||
@code{mips16} function attributes.
|
||||
Only MIPS targets support this feature, and only then in certain modes.
|
||||
|
||||
@item stack_size
|
||||
@anchor{stack_size_ao}
|
||||
Add the flags needed to define macro STACK_SIZE and set it to the stack size
|
||||
limit associated with the @ref{stack_size_et,,@code{stack_size} effective
|
||||
target}.
|
||||
|
||||
@item tls
|
||||
Add the target-specific flags needed to use thread-local storage.
|
||||
@end table
|
||||
|
|
|
@ -1,3 +1,43 @@
|
|||
2017-06-21 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* lib/target-supports.exp (add_options_for_stack_size): New proc.
|
||||
* gcc.c-torture/execute/920501-7.c: Use dg-add-options stack_size.
|
||||
* gcc.c-torture/compile/20080806-1.c: Same.
|
||||
* gcc.c-torture/compile/920723-1.c: Same.
|
||||
* gcc.c-torture/compile/930621-1.c: Same.
|
||||
* gcc.c-torture/compile/991214-2.c: Same.
|
||||
* gcc.c-torture/compile/bcopy.c: Same.
|
||||
* gcc.c-torture/compile/memtst.c: Same.
|
||||
* gcc.c-torture/compile/msp.c: Same.
|
||||
* gcc.c-torture/compile/stuct.c: Same.
|
||||
* gcc.c-torture/execute/20011008-3.c: Same.
|
||||
* gcc.c-torture/execute/20030209-1.c: Same.
|
||||
* gcc.c-torture/execute/20031012-1.c: Same.
|
||||
* gcc.c-torture/execute/20040805-1.c: Same.
|
||||
* gcc.c-torture/execute/920410-1.c: Same.
|
||||
* gcc.c-torture/execute/921113-1.c: Same.
|
||||
* gcc.c-torture/execute/921202-1.c: Same.
|
||||
* gcc.c-torture/execute/921208-2.c: Same.
|
||||
* gcc.c-torture/execute/930106-1.c: Same.
|
||||
* gcc.c-torture/execute/930406-1.c: Same.
|
||||
* gcc.c-torture/execute/950221-1.c: Same.
|
||||
* gcc.c-torture/execute/960521-1.c: Same.
|
||||
* gcc.c-torture/execute/980605-1.c: Same.
|
||||
* gcc.c-torture/execute/comp-goto-1.c: Same.
|
||||
* gcc.c-torture/execute/comp-goto-2.c: Same.
|
||||
* gcc.c-torture/execute/memcpy-1.c: Same.
|
||||
* gcc.c-torture/execute/multi-ix.c: Same.
|
||||
* gcc.c-torture/execute/nestfunc-4.c: Same.
|
||||
* gcc.c-torture/execute/pr20621-1.c: Same.
|
||||
* gcc.c-torture/execute/pr23135.c: Same.
|
||||
* gcc.c-torture/execute/pr28982b.c: Same.
|
||||
* gcc.dg/loop-3.c: Same.
|
||||
* gcc.dg/struct-ret-3.c: Same.
|
||||
* gcc.dg/torture/stackalign/comp-goto-1.c: Same.
|
||||
* gcc.dg/torture/stackalign/non-local-goto-4.c: Same.
|
||||
* gcc.dg/tree-prof/comp-goto-1.c: Same.
|
||||
* gcc.dg/tree-prof/pr44777.c: Same.
|
||||
|
||||
2017-06-20 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
PR jit/81144
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* This used to ICE on s390x due to a reload bug. */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#if defined(STACK_SIZE) && STACK_SIZE < 65536
|
||||
# define GITT_SIZE 75
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#if defined(STACK_SIZE) && (STACK_SIZE < 65536)
|
||||
# define BYTEMEM_SIZE 10000L
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#if defined(STACK_SIZE) && (STACK_SIZE < 65536)
|
||||
# define HISTO_SIZE 9
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
void
|
||||
bcopy1 (s, d, c)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#define SIZE STACK_SIZE / 8
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
# define A_SIZE (STACK_SIZE/sizeof(int))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#define SIZE STACK_SIZE / 8
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
extern void exit (int);
|
||||
extern void abort (void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE < 8*100*100
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* PR optimization/8750
|
||||
Used to fail under Cygwin with
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#if __INT_MAX__ < 32768 || (defined(STACK_SIZE) && STACK_SIZE < 0x12000)
|
||||
int main () { exit (0); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#define STACK_REQUIREMENT (40000 * 4 + 256)
|
||||
#if defined (STACK_SIZE) && STACK_SIZE < STACK_REQUIREMENT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-require-effective-target trampolines } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#define DEPTH ((STACK_SIZE) / 512 + 1)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#define STACK_REQUIREMENT (128 * 128 * 4 + 1024)
|
||||
#if defined (STACK_SIZE) && STACK_SIZE < STACK_REQUIREMENT
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-require-effective-target untyped_assembly } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifndef STACK_SIZE
|
||||
#define VLEN 2055
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-require-effective-target untyped_assembly } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#define STACK_REQUIREMENT (100000 * 4 + 1024)
|
||||
#if defined (STACK_SIZE) && STACK_SIZE < STACK_REQUIREMENT
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#if defined (STACK_SIZE)
|
||||
#define DUMMY_SIZE 9
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
f()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
struct parsefile
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-require-effective-target trampolines } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* A slight variation of 920501-7.c. */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* Test for a reload bug:
|
||||
if you have a memory reference using the indexed addressing
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* Origin: hp@bitrange.com
|
||||
Test that return values come out right from a 1000-level call chain to
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* When generating o32 MIPS PIC, main's $gp save slot was out of range
|
||||
of a single load instruction. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* Based on execute/simd-1.c, modified by joern.rennecke@st.com to
|
||||
trigger a reload bug. Verified for gcc mainline from 20050722 13:00 UTC
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* Like pr28982a.c, but with the spill slots outside the range of
|
||||
a single sp-based load on ARM. This test tests for cases where
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3" } */
|
||||
/* { dg-options "-O3 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#if defined(STACK_SIZE) && (STACK_SIZE < 65536)
|
||||
# define BYTEMEM_SIZE 10000L
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* Origin: Peeter Joot <peeterj@ca.ibm.com> */
|
||||
|
||||
/* { dg-do run { target *-*-linux* *-*-gnu* } } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-require-effective-target trampolines } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#define DEPTH ((STACK_SIZE) / 512 + 1)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* { dg-require-effective-target nonlocal_goto } */
|
||||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-require-effective-target trampolines } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* { dg-require-effective-target freorder } */
|
||||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-require-effective-target trampolines } */
|
||||
/* { dg-options "-O0" } */
|
||||
/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value stack_size]" { target { stack_size } } } */
|
||||
/* { dg-add-options stack_size } */
|
||||
|
||||
/* A variant of gcc.c-torture/execute/comp-goto-2.c. */
|
||||
|
||||
|
|
|
@ -7249,6 +7249,17 @@ proc add_options_for_double_vectors { flags } {
|
|||
return $flags
|
||||
}
|
||||
|
||||
# Add to FLAGS the flags needed to define the STACK_SIZE macro.
|
||||
|
||||
proc add_options_for_stack_size { flags } {
|
||||
if [is-effective-target stack_size] {
|
||||
set stack_size [dg-effective-target-value stack_size]
|
||||
return "$flags -DSTACK_SIZE=$stack_size"
|
||||
}
|
||||
|
||||
return $flags
|
||||
}
|
||||
|
||||
# Return 1 if the target provides a full C99 runtime.
|
||||
|
||||
proc check_effective_target_c99_runtime { } {
|
||||
|
|
Loading…
Add table
Reference in a new issue