Don't call targetm.calls.static_chain in non-static function
authorTom de Vries <tom@codesourcery.com>
Wed, 20 Dec 2017 00:46:38 +0000 (00:46 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 20 Dec 2017 00:46:38 +0000 (00:46 +0000)
commit4b522b8f339f4e7844843d30f38ea9459d908e3c
treecd32dc6ce38614687f2e8641be27ecb2f2300692
parentf00b0bad2afa3912e91910eaa1f6c7e74fe86683
Don't call targetm.calls.static_chain in non-static function

2017-12-20  Tom de Vries  <tom@codesourcery.com>

PR middle-end/83423
* config/i386/i386.c (ix86_static_chain): Move DECL_STATIC_CHAIN test ...
* calls.c (rtx_for_static_chain): ... here.  New function.
* calls.h (rtx_for_static_chain): Declare.
* builtins.c (expand_builtin_setjmp_receiver): Use rtx_for_static_chain
instead of targetm.calls.static_chain.
* df-scan.c (df_get_entry_block_def_set): Same.

From-SVN: r255849
gcc/ChangeLog
gcc/builtins.c
gcc/calls.c
gcc/calls.h
gcc/config/i386/i386.c
gcc/df-scan.c