aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/doc/tm.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/doc/tm.texi')
-rw-r--r--gcc-4.8/gcc/doc/tm.texi37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/doc/tm.texi b/gcc-4.8/gcc/doc/tm.texi
index cbbc82dfe..48df7ce24 100644
--- a/gcc-4.8/gcc/doc/tm.texi
+++ b/gcc-4.8/gcc/doc/tm.texi
@@ -9914,6 +9914,43 @@ default, inlining is not allowed if the callee function has function
specific target options and the caller does not use the same options.
@end deftypefn
+@deftypefn {Target Hook} rtx TARGET_GET_PIC_REG (void)
+Return the pic_reg pseudo register which holds the base address of GOT.
+ It is only required by the simplify-got optimization.
+@end deftypefn
+
+@deftypefn {Target Hook} void TARGET_CLEAR_PIC_REG (void)
+After successful simplify-got optimization, the pic_reg is useless. So a
+ target can use this hook to clear pic_reg.
+@end deftypefn
+
+@deftypefn {Target Hook} rtx TARGET_LOADED_GLOBAL_VAR (rtx @var{insn}, rtx *@var{offset_reg}, rtx *@var{offset_insn})
+This hook is used to detect if the given @var{insn} loads a global
+ variable's address from GOT with the form of
+ @smallexample
+ (set @var{address_reg} (mem (plus pic_reg @var{offset_reg})))
+ @end smallexample
+ If so return the global variable whose address will be loaded and fill in
+ @var{offset_insn} and @var{offset_reg}. @var{offset_reg} is set at
+ @var{offset_insn} to hold the offset from GOT base to the GOT entry of the
+ global variable. Otherwise return @code{NULL_RTX}.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_CAN_SIMPLIFY_GOT_ACCESS (int @var{n_symbol}, int @var{n_access})
+This hook determines if it satisfy the target dependent conditions to do
+ simplify-got when given the number of global variable accessing and the
+ number of accessed symbols. If the returned value is false the GOT access
+ insns will not be rewritten. Otherwise we will rewrite these insns.
+@end deftypefn
+
+@deftypefn {Target Hook} void TARGET_LOAD_GLOBAL_ADDRESS (rtx @var{symbol}, rtx @var{offset_reg}, rtx @var{address_reg}, rtx @var{load_insn}, rtx @var{offset_insn})
+This hook does the actual rewriting of GOT access insn @var{load_insn}.
+ The global variable is @var{symbol}. The global address should be loaded
+ into @var{address_reg}. The register @var{offset_reg} was previously set
+ in insn @var{offset_insn} to hold the offset from GOT base to the GOT
+ entry of the global variable. Now it can be used as a scratch register.
+@end deftypefn
+
@node Emulated TLS
@section Emulating TLS
@cindex Emulated TLS