/* Export function prototypes from explow.c.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2020 Free Software Foundation, Inc.
This file is part of GCC.
/* Return mode and signedness to use when object is promoted. */
machine_mode promote_decl_mode (const_tree, int *);
+/* Return mode and signedness to use when object is promoted. */
+machine_mode promote_ssa_mode (const_tree, int *);
+
/* Remove some bytes from the stack. An rtx says how many. */
extern void 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);
+/* Add some bytes to the stack while probing it. An rtx says how
+ many. Add additional probes to prevent stack clashing attacks. */
+extern void anti_adjust_stack_and_probe_stack_clash (rtx);
+
+/* Support for building allocation/probing loops for stack-clash
+ protection of dyamically allocated stack space. */
+extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,
+ HOST_WIDE_INT *, rtx);
+extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *,
+ rtx, bool);
+extern void emit_stack_clash_protection_probe_loop_end (rtx, rtx,
+ rtx, bool);
+
/* This enum is used for the following two functions. */
enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL};
extern void record_new_stack_level (void);
/* Allocate some space on the stack dynamically and return its address. */
-extern rtx allocate_dynamic_stack_space (rtx, unsigned, unsigned, bool);
+extern rtx allocate_dynamic_stack_space (rtx, unsigned, unsigned,
+ HOST_WIDE_INT, bool);
+
+/* Calculate the necessary size of a constant dynamic stack allocation from the
+ size of the variable area. */
+extern void get_dynamic_stack_size (rtx *, unsigned, unsigned, HOST_WIDE_INT *);
+
+/* Returns the address of the dynamic stack space without allocating it. */
+extern rtx get_dynamic_stack_base (poly_int64, unsigned);
+
+/* Return an rtx doing runtime alignment to REQUIRED_ALIGN on TARGET. */
+extern rtx align_dynamic_address (rtx, unsigned);
/* Emit one stack probe at ADDRESS, an address within the stack. */
extern void emit_stack_probe (rtx);