aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/doc/tm.texi.in
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/doc/tm.texi.in')
-rw-r--r--gcc-4.8/gcc/doc/tm.texi.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/doc/tm.texi.in b/gcc-4.8/gcc/doc/tm.texi.in
index dfba947f5..6b5c45b2b 100644
--- a/gcc-4.8/gcc/doc/tm.texi.in
+++ b/gcc-4.8/gcc/doc/tm.texi.in
@@ -9775,6 +9775,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
+@hook TARGET_GET_PIC_REG
+Return the pic_reg pseudo register which holds the base address of GOT.
+ It is only required by the simplify-got optimization.
+@end deftypefn
+
+@hook TARGET_CLEAR_PIC_REG
+After successful simplify-got optimization, the pic_reg is useless. So a
+ target can use this hook to clear pic_reg.
+@end deftypefn
+
+@hook TARGET_LOADED_GLOBAL_VAR
+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
+
+@hook TARGET_CAN_SIMPLIFY_GOT_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
+
+@hook TARGET_LOAD_GLOBAL_ADDRESS
+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