diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-07-02 21:25:28 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-07-02 21:25:28 +0000 |
commit | 260c8ba389c4a31a7a4d7cfe0fc55492b2f1b74f (patch) | |
tree | 07029562f5d29447aaea45407baa8ff6842f7694 /gcc/explow.c | |
parent | 8c54dc55ef8e29da0f1cd3836dbbe705239c415e (diff) | |
download | gcc-260c8ba389c4a31a7a4d7cfe0fc55492b2f1b74f.zip gcc-260c8ba389c4a31a7a4d7cfe0fc55492b2f1b74f.tar.gz gcc-260c8ba389c4a31a7a4d7cfe0fc55492b2f1b74f.tar.bz2 |
expr.h (emit_stack_probe): Declare.
* expr.h (emit_stack_probe): Declare.
* explow.c (emit_stack_probe): Make global.
(anti_adjust_stack_and_probe): Fix comments.
* config/sparc/linux.h (STACK_CHECK_STATIC_BUILTIN): Define to 1.
* config/sparc/linux64.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
* config/sparc/sol2.h (STACK_CHECK_STATIC_BUILTIN): Likewise.
* config/sparc/sparc.c: Include except.h.
(sparc_emit_probe_stack_range): New function.
(output_probe_stack_range): Likewise.
(sparc_expand_prologue): Invoke sparc_emit_probe_stack_range if static
built-in stack checking is enabled.
* config/sparc/sparc-protos.h (output_probe_stack_range): Declare.
* config/sparc/sparc.md (UNSPECV_PROBE_STACK_RANGE): New constant.
(probe_stack_range): New insn.
From-SVN: r161749
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 40b3a6e..bd2ab79 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -43,7 +43,6 @@ along with GCC; see the file COPYING3. If not see #include "output.h" static rtx break_out_memory_refs (rtx); -static void emit_stack_probe (rtx); /* Truncate and perhaps sign-extend C as appropriate for MODE. */ @@ -1355,7 +1354,7 @@ set_stack_check_libfunc (const char *libfunc_name) /* Emit one stack probe at ADDRESS, an address within the stack. */ -static void +void emit_stack_probe (rtx address) { rtx memref = gen_rtx_MEM (word_mode, address); @@ -1567,7 +1566,7 @@ anti_adjust_stack_and_probe (rtx size, bool adjust_back) HOST_WIDE_INT isize = INTVAL (size), i; bool first_probe = true; - /* Adjust SP and probe to PROBE_INTERVAL + N * PROBE_INTERVAL for + /* Adjust SP and probe at PROBE_INTERVAL + N * PROBE_INTERVAL for values of N from 1 until it exceeds SIZE. If only one probe is needed, this will not generate any code. Then adjust and probe to PROBE_INTERVAL + SIZE. */ @@ -1623,13 +1622,13 @@ anti_adjust_stack_and_probe (rtx size, bool adjust_back) /* Step 3: the loop - while (SP != LAST_ADDR) - { - SP = SP + PROBE_INTERVAL - probe at SP - } + while (SP != LAST_ADDR) + { + SP = SP + PROBE_INTERVAL + probe at SP + } - adjusts SP and probes to PROBE_INTERVAL + N * PROBE_INTERVAL for + adjusts SP and probes at PROBE_INTERVAL + N * PROBE_INTERVAL for values of N from 1 until it is equal to ROUNDED_SIZE. */ emit_label (loop_lab); @@ -1647,7 +1646,7 @@ anti_adjust_stack_and_probe (rtx size, bool adjust_back) emit_label (end_lab); - /* Step 4: adjust SP and probe to PROBE_INTERVAL + SIZE if we cannot + /* Step 4: adjust SP and probe at PROBE_INTERVAL + SIZE if we cannot assert at compile-time that SIZE is equal to ROUNDED_SIZE. */ /* TEMP = SIZE - ROUNDED_SIZE. */ |