diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/doc/tm.texi | 2 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 2 | ||||
-rw-r--r-- | gcc/function.c | 3 | ||||
-rw-r--r-- | gcc/stmt.c | 36 | ||||
-rw-r--r-- | gcc/tree.h | 1 |
5 files changed, 4 insertions, 40 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 0208b02..fc3345a 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4993,7 +4993,7 @@ The default version of this hook creates a variable called @end deftypefn @deftypefn {Target Hook} tree TARGET_STACK_PROTECT_FAIL (void) -This hook returns a tree expression that alerts the runtime that the +This hook returns a @code{CALL_EXPR} that alerts the runtime that the stack protect guard variable has been modified. This expression should involve a call to a @code{noreturn} function. diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 044b416..33ccf82 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -4934,7 +4934,7 @@ The default version of this hook creates a variable called @end deftypefn @hook TARGET_STACK_PROTECT_FAIL -This hook returns a tree expression that alerts the runtime that the +This hook returns a @code{CALL_EXPR} that alerts the runtime that the stack protect guard variable has been modified. This expression should involve a call to a @code{noreturn} function. diff --git a/gcc/function.c b/gcc/function.c index bc9a99f..c567588 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4660,7 +4660,8 @@ stack_protect_epilogue (void) if (JUMP_P (tmp)) predict_insn_def (tmp, PRED_NORETURN, TAKEN); - expand_expr_stmt (targetm.stack_protect_fail ()); + expand_call (targetm.stack_protect_fail (), NULL_RTX, /*ignore=*/true); + free_temp_slots (); emit_label (label); } @@ -1400,42 +1400,6 @@ resolve_operand_name_1 (char *p, tree outputs, tree inputs, tree labels) return p; } -/* Generate RTL to evaluate the expression EXP. */ - -void -expand_expr_stmt (tree exp) -{ - rtx value; - tree type; - - value = expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL); - type = TREE_TYPE (exp); - - /* If all we do is reference a volatile value in memory, - copy it to a register to be sure it is actually touched. */ - if (value && MEM_P (value) && TREE_THIS_VOLATILE (exp)) - { - if (TYPE_MODE (type) == VOIDmode) - ; - else if (TYPE_MODE (type) != BLKmode) - copy_to_reg (value); - else - { - rtx lab = gen_label_rtx (); - - /* Compare the value with itself to reference it. */ - emit_cmp_and_jump_insns (value, value, EQ, - expand_normal (TYPE_SIZE (type)), - BLKmode, 0, lab); - emit_label (lab); - } - } - - /* Free any temporaries used to evaluate this expression. */ - free_temp_slots (); -} - - /* Generate RTL to return from the current function, with no value. (That is, we do not do anything about returning any value.) */ @@ -5229,7 +5229,6 @@ extern tree unshare_expr (tree); /* In stmt.c */ -extern void expand_expr_stmt (tree); extern void expand_label (tree); extern void expand_goto (tree); |