#define STACK_CHECK_STATIC_BUILTIN 0
#endif
-/* The default interval is one page. */
-#ifndef STACK_CHECK_PROBE_INTERVAL
-#define STACK_CHECK_PROBE_INTERVAL 4096
+/* The default interval is one page (4096 bytes). */
+#ifndef STACK_CHECK_PROBE_INTERVAL_EXP
+#define STACK_CHECK_PROBE_INTERVAL_EXP 12
#endif
/* The default is to do a store into the stack. */
#define STACK_CHECK_PROBE_LOAD 0
#endif
+/* The default is not to move the stack pointer. */
+#ifndef STACK_CHECK_MOVING_SP
+#define STACK_CHECK_MOVING_SP 0
+#endif
+
/* This is a kludge to try to capture the discrepancy between the old
mechanism (generic stack checking) and the new mechanism (static
builtin stack checking). STACK_CHECK_PROTECT needs to be bumped
one probe per function. */
#ifndef STACK_CHECK_MAX_FRAME_SIZE
#define STACK_CHECK_MAX_FRAME_SIZE \
- (STACK_CHECK_PROBE_INTERVAL - UNITS_PER_WORD)
+ ((1 << STACK_CHECK_PROBE_INTERVAL_EXP) - UNITS_PER_WORD)
#endif
/* This is arbitrary, but should be large enough everywhere. */
/* Add some bytes to the stack. An rtx says how many. */
extern void anti_adjust_stack (rtx);
+/* Add some bytes to the stack while probing it. An rtx says how many. */
+extern void anti_adjust_stack_and_probe (rtx, bool);
+
/* This enum is used for the following two functions. */
enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL};
extern rtx allocate_dynamic_stack_space (rtx, rtx, int);
/* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive.
- FIRST is a constant and size is a Pmode RTX. These are offsets from the
- current stack pointer. STACK_GROWS_DOWNWARD says whether to add or
- subtract from the stack. If SIZE is constant, this is done
- with a fixed number of probes. Otherwise, we must make a loop. */
+ FIRST is a constant and size is a Pmode RTX. These are offsets from
+ the current stack pointer. STACK_GROWS_DOWNWARD says whether to add
+ or subtract them from the stack pointer. */
extern void probe_stack_range (HOST_WIDE_INT, rtx);
/* Return an rtx that refers to the value returned by a library call