summaryrefslogtreecommitdiff
path: root/gcc/doc/tm.texi
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-23 21:05:21 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-23 21:05:21 +0000
commit124ac4e4e3be031b5d9e0d9c855684053af1bf22 (patch)
tree1957c990b77f48c80e149663c064a9f71d8e783a /gcc/doc/tm.texi
parenta3278934c71197997b32261f7e782730fcf5162a (diff)
downloadgcc-124ac4e4e3be031b5d9e0d9c855684053af1bf22.tar.gz
PR gcc/1532
* cse.c (cse_change_cc_mode): New static function. (cse_change_cc_mode_insns, cse_cc_succs): Likewise. (cse_condition_code_reg): New function. * rtl.h (cse_condition_code_reg): Declare. * toplev.c (rest_of_handle_cse2): Call cse_condition_code_reg. * target.h (struct gcc_target): Add fixed_condition_code_regs and cc_modes_compatible. * target-def.h (TARGET_FIXED_CONDITION_CODE_REGS): Define. (TARGET_CC_MODES_COMPATIBLE): Define. (TARGET_INITIALIZER): Add new initializers. * targhooks.c (default_cc_modes_compatible): New function. * targhooks.c (default_cc_modes_compatible): Declare. * hooks.c (hook_bool_intp_intp_false): New function. * hooks.h (hook_bool_intp_intp_false): Declare. * config/i386/i386.c (TARGET_FIXED_CONDITION_CODE_REGS): Define. (TARGET_CC_MODES_COMPATIBLE): Define. (ix86_fixed_condition_code_regs): New static function. (ix86_cc_modes_compatible): Likewise. * doc/tm.texi (Condition Code): Document new hooks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76454 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r--gcc/doc/tm.texi28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 41f1fcb6732..8f1dfa7233d 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5177,6 +5177,34 @@ follows:
@end smallexample
@end defmac
+@deftypefn {Target Hook} bool TARGET_FIXED_CONDITION_CODE_REGS (unsigned int *, unsigned int *)
+On targets which do not use @code{(cc0)}, and which use a hard
+register rather than a pseudo-register to hold condition codes, the
+regular CSE passes are often not able to identify cases in which the
+hard register is set to a common value. Use this hook to enable a
+small pass which optimizes such cases. This hook should return true
+to enable this pass, and it should set the integers to which its
+arguments point to the hard register numbers used for condition codes.
+When there is only one such register, as is true on most systems, the
+integer pointed to by the second argument should be set to
+@code{INVALID_REGNUM}.
+
+The default version of this hook returns false.
+@end deftypefn
+
+@deftypefn {Target Hook} enum machine_mode TARGET_CC_MODES_COMPATIBLE (enum machine_mode, enum machine_mode)
+On targets which use multiple condition code modes in class
+@code{MODE_CC}, it is sometimes the case that a comparison can be
+validly done in more than one mode. On such a system, define this
+target hook to take two mode arguments and to return a mode in which
+both comparisons may be validly done. If there is no such mode,
+return @code{VOIDmode}.
+
+The default version of this hook checks whether the modes are the
+same. If they are, it returns that mode. If they are different, it
+returns @code{VOIDmode}.
+@end deftypefn
+
@node Costs
@section Describing Relative Costs of Operations
@cindex costs of instructions