Commit aaeaa9a9 by Radovan Obradovic Committed by Tom de Vries

Add call_fusage_contains_non_callee_clobbers hook

2014-05-05  Radovan Obradovic  <robradovic@mips.com>
            Tom de Vries  <tom@codesourcery.com>

	* target.def (call_fusage_contains_non_callee_clobbers): New DEFHOOKPOD.
	* doc/tm.texi.in (@node Stack and Calling): Add Miscellaneous Register
	Hooks to @menu.
	(@node Miscellaneous Register Hooks): New node.
	(@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS): New hook.
	* doc/tm.texi: Regenerate.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r210085
parent a29aa02e
2014-05-05 Radovan Obradovic <robradovic@mips.com>
Tom de Vries <tom@codesourcery.com>
* target.def (call_fusage_contains_non_callee_clobbers): New DEFHOOKPOD.
* doc/tm.texi.in (@node Stack and Calling): Add Miscellaneous Register
Hooks to @menu.
(@node Miscellaneous Register Hooks): New node.
(@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS): New hook.
* doc/tm.texi: Regenerate.
2014-05-05 Marek Polacek <polacek@redhat.com> 2014-05-05 Marek Polacek <polacek@redhat.com>
PR driver/61065 PR driver/61065
......
...@@ -3091,6 +3091,7 @@ This describes the stack layout and calling conventions. ...@@ -3091,6 +3091,7 @@ This describes the stack layout and calling conventions.
* Profiling:: * Profiling::
* Tail Calls:: * Tail Calls::
* Stack Smashing Protection:: * Stack Smashing Protection::
* Miscellaneous Register Hooks::
@end menu @end menu
@node Frame Layout @node Frame Layout
...@@ -5020,6 +5021,21 @@ normally defined in @file{libgcc2.c}. ...@@ -5020,6 +5021,21 @@ normally defined in @file{libgcc2.c}.
Whether this target supports splitting the stack when the options described in @var{opts} have been passed. This is called after options have been parsed, so the target may reject splitting the stack in some configurations. The default version of this hook returns false. If @var{report} is true, this function may issue a warning or error; if @var{report} is false, it must simply return a value Whether this target supports splitting the stack when the options described in @var{opts} have been passed. This is called after options have been parsed, so the target may reject splitting the stack in some configurations. The default version of this hook returns false. If @var{report} is true, this function may issue a warning or error; if @var{report} is false, it must simply return a value
@end deftypefn @end deftypefn
@node Miscellaneous Register Hooks
@subsection Miscellaneous register hooks
@cindex miscellaneous register hooks
@deftypevr {Target Hook} bool TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
set to true if all the calls in the current function contain clobbers in
CALL_INSN_FUNCTION_USAGE for the registers that are clobbered by the call
rather than by the callee, and are not already set or clobbered in the call
pattern. Examples of such registers are registers used in PLTs and stubs,
and temporary registers used in the call instruction but not present in the
rtl pattern. Another way to formulate it is the registers not present in the
rtl pattern that are clobbered by the call assuming the callee does not
clobber any register. The default version of this hook is set to false.
@end deftypevr
@node Varargs @node Varargs
@section Implementing the Varargs Macros @section Implementing the Varargs Macros
@cindex varargs implementation @cindex varargs implementation
......
...@@ -2720,6 +2720,7 @@ This describes the stack layout and calling conventions. ...@@ -2720,6 +2720,7 @@ This describes the stack layout and calling conventions.
* Profiling:: * Profiling::
* Tail Calls:: * Tail Calls::
* Stack Smashing Protection:: * Stack Smashing Protection::
* Miscellaneous Register Hooks::
@end menu @end menu
@node Frame Layout @node Frame Layout
...@@ -3987,6 +3988,12 @@ the function prologue. Normally, the profiling code comes after. ...@@ -3987,6 +3988,12 @@ the function prologue. Normally, the profiling code comes after.
@hook TARGET_SUPPORTS_SPLIT_STACK @hook TARGET_SUPPORTS_SPLIT_STACK
@node Miscellaneous Register Hooks
@subsection Miscellaneous register hooks
@cindex miscellaneous register hooks
@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
@node Varargs @node Varargs
@section Implementing the Varargs Macros @section Implementing the Varargs Macros
@cindex varargs implementation @cindex varargs implementation
......
...@@ -5142,6 +5142,22 @@ FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, and the PIC_OFFSET_TABLE_REGNUM.", ...@@ -5142,6 +5142,22 @@ FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, and the PIC_OFFSET_TABLE_REGNUM.",
void, (bitmap regs), void, (bitmap regs),
hook_void_bitmap) hook_void_bitmap)
/* Targets should define this target hook to mark that non-callee clobbers are
present in CALL_INSN_FUNCTION_USAGE for all the calls in the current
function. */
DEFHOOKPOD
(call_fusage_contains_non_callee_clobbers,
"set to true if all the calls in the current function contain clobbers in\n\
CALL_INSN_FUNCTION_USAGE for the registers that are clobbered by the call\n\
rather than by the callee, and are not already set or clobbered in the call\n\
pattern. Examples of such registers are registers used in PLTs and stubs,\n\
and temporary registers used in the call instruction but not present in the\n\
rtl pattern. Another way to formulate it is the registers not present in the\n\
rtl pattern that are clobbered by the call assuming the callee does not\n\
clobber any register. The default version of this hook is set to false.",
bool,
false)
/* Fill in additional registers set up by prologue into a regset. */ /* Fill in additional registers set up by prologue into a regset. */
DEFHOOK DEFHOOK
(set_up_by_prologue, (set_up_by_prologue,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment