diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-07-05 07:56:45 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-07-05 07:56:45 +0000 |
commit | c65aa0429d688103b446a7cb2985c351b52071f3 (patch) | |
tree | 8259493253aa32f29e39453efeeca64cecadb24b /gcc/function.c | |
parent | 9c58793af54226c898ae27c913a8f9d85bbf948c (diff) | |
download | gcc-c65aa0429d688103b446a7cb2985c351b52071f3.zip gcc-c65aa0429d688103b446a7cb2985c351b52071f3.tar.gz gcc-c65aa0429d688103b446a7cb2985c351b52071f3.tar.bz2 |
target-insns.def (stack_protect_set, [...]): New targetm instruction patterns.
gcc/
* target-insns.def (stack_protect_set, stack_protect_test): New
targetm instruction patterns.
* cfgexpand.c (stack_protect_prologue): Use them instead of
HAVE_*/gen_* interface.
* function.c (stack_protect_epilogue): Likewise.
From-SVN: r225428
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/function.c b/gcc/function.c index 8134c4e..2c9deac 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4874,11 +4874,6 @@ init_function_start (tree subr) /* Expand code to verify the stack_protect_guard. This is invoked at the end of a function to be protected. */ -#ifndef HAVE_stack_protect_test -# define HAVE_stack_protect_test 0 -# define gen_stack_protect_test(x, y, z) (gcc_unreachable (), NULL_RTX) -#endif - void stack_protect_epilogue (void) { @@ -4891,13 +4886,12 @@ stack_protect_epilogue (void) /* Allow the target to compare Y with X without leaking either into a register. */ - switch (HAVE_stack_protect_test != 0) + switch (targetm.have_stack_protect_test ()) { case 1: - tmp = gen_stack_protect_test (x, y, label); - if (tmp) + if (rtx_insn *seq = targetm.gen_stack_protect_test (x, y, label)) { - emit_insn (tmp); + emit_insn (seq); break; } /* FALLTHRU */ |