aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thopre01@gcc.gnu.org>2018-08-02 11:16:05 +0000
committerThomas Preud'homme <thopre01@gcc.gnu.org>2018-08-02 11:16:05 +0000
commita8b2130aee62d3ac499938be26c9ae23c89d25c9 (patch)
treef414f7dc5d5b2e80a986c376001491121f278e28 /gcc/function.c
parent0016d8d91cb2880e69be74efb44367b282577977 (diff)
downloadgcc-a8b2130aee62d3ac499938be26c9ae23c89d25c9.zip
gcc-a8b2130aee62d3ac499938be26c9ae23c89d25c9.tar.gz
gcc-a8b2130aee62d3ac499938be26c9ae23c89d25c9.tar.bz2
Revert "[ARM] Fix PR85434: spilling of stack protector guard's address on ARM"
This reverts commit r263245. From-SVN: r263252
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/gcc/function.c b/gcc/function.c
index a95d2f8..dee303c 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4893,33 +4893,20 @@ stack_protect_epilogue (void)
rtx_code_label *label = gen_label_rtx ();
rtx x, y;
rtx_insn *seq;
- struct expand_operand ops[3];
x = expand_normal (crtl->stack_protect_guard);
- create_fixed_operand (&ops[0], x);
- create_fixed_operand (&ops[1], DECL_RTL (guard_decl));
- create_fixed_operand (&ops[2], label);
- /* Allow the target to compute address of Y and compare it with X without
- leaking Y into a register. This combined address + compare pattern allows
- the target to prevent spilling of any intermediate results by splitting
- it after register allocator. */
- if (!maybe_expand_jump_insn (targetm.code_for_stack_protect_combined_test,
- 3, ops))
- {
- if (guard_decl)
- y = expand_normal (guard_decl);
- else
- y = const0_rtx;
-
- /* Allow the target to compare Y with X without leaking either into
- a register. */
- if (targetm.have_stack_protect_test ()
- && ((seq = targetm.gen_stack_protect_test (x, y, label))
- != NULL_RTX))
- emit_insn (seq);
- else
- emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label);
- }
+ if (guard_decl)
+ y = expand_normal (guard_decl);
+ else
+ y = const0_rtx;
+
+ /* Allow the target to compare Y with X without leaking either into
+ a register. */
+ if (targetm.have_stack_protect_test ()
+ && ((seq = targetm.gen_stack_protect_test (x, y, label)) != NULL_RTX))
+ emit_insn (seq);
+ else
+ emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label);
/* The noreturn predictor has been moved to the tree level. The rtl-level
predictors estimate this branch about 20%, which isn't enough to get