summaryrefslogtreecommitdiff
path: root/gcc/doc/tm.texi
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-23 03:55:36 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-23 03:55:36 +0000
commit64d5fb6a673d142101ac222b683d8829d85e9673 (patch)
tree1170a3a1c1f2485f21dace07e688e18f211fa1b8 /gcc/doc/tm.texi
parent439a6dcaf0af95c43c83a0033b32cc1a2ee5f73e (diff)
downloadgcc-64d5fb6a673d142101ac222b683d8829d85e9673.tar.gz
* doc/tm.texi (TARGET_MD_ASM_CLOBBERS): Adjust wording to not
imply that this is called once, independent of asms in code. Adjust to now being pased output and input lists. Mention helper function decl_overlaps_hard_reg_set_p. * hooks.c (hook_tree_tree_tree_tree_3rd_identity): Rename from hook_tree_tree_identity and to take three trees, returning third. * hooks.h (hook_tree_tree_tree_tree_3rd_identity): Adjust the prototype. * stmt.c: include hard-reg-set.h before tree.h. (decl_overlaps_hard_reg_set_p): New function, broken out from... (decl_conflicts_with_clobbers_p): Call decl_overlaps_hard_reg_set_p. (expand_asm_operands): Pass output and input lists in call to targetm.md_asm_clobbers. * target-def.h (TARGET_MD_ASM_CLOBBERS): Define as hook_tree_tree_tree_tree_3rd_identity. * target.h (struct gcc_target.md_asm_clobbers): Take three tree parameters. * tree.h [HARD_CONST] (decl_overlaps_hard_reg_set_p): Prototype. * config/i386/i386.c (ix86_md_asm_clobbers): Adjust to three parameters, first two unused. * config/cris/cris.c (cris_md_asm_clobbers): Adjust to added parameters. Only add MOF to clobbers if there's no 'h' mentioned in constraint letters and MOF is not mentioned as a asm-declared register in neither of the input and output lists. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r--gcc/doc/tm.texi10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 799a0f854d3..af269f2a97c 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9314,11 +9314,15 @@ from shared libraries (DLLs).
You need not define this macro if it would always evaluate to zero.
@end defmac
-@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{clobbers})
+@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{outputs}, tree @var{inputs}, tree @var{clobbers})
This target hook should add to @var{clobbers} @code{STRING_CST} trees for
-any hard regs the port wishes to automatically clobber for all asms.
+any hard regs the port wishes to automatically clobber for an asm.
It should return the result of the last @code{tree_cons} used to add a
-clobber.
+clobber. The @var{outputs}, @var{inputs} and @var{clobber} lists are the
+corresponding parameters to the asm and may be inspected to avoid
+clobbering a register that is an input or output of the asm. You can use
+@code{decl_overlaps_hard_reg_set_p}, declared in @file{tree.h}, to test
+for overlap with regards to asm-declared registers.
@end deftypefn
@defmac MATH_LIBRARY