c-attribs.c (c_common_attribute_table): Add entry for "patchable_function_entry".
authorTorsten Duwe <duwe@suse.de>
Tue, 25 Jul 2017 14:16:10 +0000 (14:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 25 Jul 2017 14:16:10 +0000 (14:16 +0000)
commit417ca0117a1a9a8aaf5bc5ca530adfd68cb00399
treec8993d80cd0cc0675b2677e7902c261e0625dd63
parent774cccdc1a36493ae6925148c08dfbdcb2789e0c
c-attribs.c (c_common_attribute_table): Add entry for "patchable_function_entry".

2017-07-07  Torsten Duwe  <duwe@suse.de>

        c-family/
* c-attribs.c (c_common_attribute_table): Add entry for
"patchable_function_entry".

        lto/
* lto-lang.c (lto_attribute_table): Add entry for
"patchable_function_entry".

* common.opt: Introduce -fpatchable-function-entry
command line option, and its variables function_entry_patch_area_size
and function_entry_patch_area_start.
* opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
including a two-value parser.
* target.def (print_patchable_function_entry): New target hook.
* targhooks.h (default_print_patchable_function_entry): New function.
* targhooks.c (default_print_patchable_function_entry): Likewise.
* toplev.c (process_options): Switch off IPA-RA if
patchable function entries are being generated.
* varasm.c (assemble_start_function): Look at the
patchable-function-entry command line switch and current
function attributes and maybe generate NOP instructions by
calling the print_patchable_function_entry hook.
* doc/extend.texi: Document patchable_function_entry attribute.
* doc/invoke.texi: Document -fpatchable_function_entry
command line option.
* doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
New target hook.
* doc/tm.texi: Re-generate.

* c-c++-common/patchable_function_entry-default.c: New test.
* c-c++-common/patchable_function_entry-decl.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.

From-SVN: r250521
20 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/common.opt
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/lto/ChangeLog
gcc/lto/lto-lang.c
gcc/opts.c
gcc/target.def
gcc/targhooks.c
gcc/targhooks.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/patchable_function_entry-default.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/patchable_function_entry-definition.c [new file with mode: 0644]
gcc/toplev.c
gcc/varasm.c