aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorZhenqiang Chen <zhenqiang.chen@linaro.org>2014-11-17 05:38:41 +0000
committerZhenqiang Chen <zqchen@gcc.gnu.org>2014-11-17 05:38:41 +0000
commit2e0f134153b4ac30da86de0a918fadcd4675a153 (patch)
tree93399df0b18fa5bdd993a2d8487f3182c6dd57c4 /gcc
parentc1c7f1fc21ff3b3ebbb8bf7eb91f68b2fec64d60 (diff)
downloadgcc-2e0f134153b4ac30da86de0a918fadcd4675a153.zip
gcc-2e0f134153b4ac30da86de0a918fadcd4675a153.tar.gz
gcc-2e0f134153b4ac30da86de0a918fadcd4675a153.tar.bz2
target.def (gen_ccmp_first, [...]): Add two new hooks.
2014-11-17 Zhenqiang Chen <zhenqiang.chen@linaor.org> * target.def (gen_ccmp_first, gen_ccmp_first): Add two new hooks. * doc/tm.texi.in (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New. * doc/tm.texi (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New. From-SVN: r217639
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/tm.texi18
-rw-r--r--gcc/doc/tm.texi.in4
-rw-r--r--gcc/target.def22
4 files changed, 50 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index de6db6d..d6423ff 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-17 Zhenqiang Chen <zhenqiang.chen@linaor.org>
+
+ * target.def (gen_ccmp_first, gen_ccmp_first): Add two new hooks.
+ * doc/tm.texi.in (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New.
+ * doc/tm.texi (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New.
+
2014-11-16 Patrick Palka <ppalka@gcc.gnu.org>
PR middle-end/63790
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 3cd137f..c09c510 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -11232,6 +11232,24 @@ This target hook is required only when the target has several different
modes and they have different conditional execution capability, such as ARM.
@end deftypefn
+@deftypefn {Target Hook} rtx TARGET_GEN_CCMP_FIRST (int @var{code}, rtx @var{op0}, rtx @var{op1})
+This function emits a comparison insn for the first of a sequence of
+ conditional comparisions. It returns a comparison expression appropriate
+ for passing to @code{gen_ccmp_next} or @code{cbranch_optab}. @var{code} is
+ the @code{rtx_code} of the compare for @var{op0} and @var{op1}.
+@end deftypefn
+
+@deftypefn {Target Hook} rtx TARGET_GEN_CCMP_NEXT (rtx @var{prev}, int @var{cmp_code}, rtx @var{op0}, rtx @var{op1}, int @var{bit_code})
+This function emits a conditional comparison within a sequence of
+ conditional comparisons. The @var{prev} expression is the result of a
+ prior call to @code{gen_ccmp_first} or @code{gen_ccmp_next}. It may return
+ @code{NULL} if the combination of @var{prev} and this comparison is
+ not supported, otherwise the result must be appropriate for passing to
+ @code{gen_ccmp_next} or @code{cbranch_optab}. @var{code} is the
+ @code{rtx_code} of the compare for @var{op0} and @var{op1}. @var{bit_code}
+ is @code{AND} or @code{IOR}, which is the op on the two compares.
+@end deftypefn
+
@deftypefn {Target Hook} unsigned TARGET_LOOP_UNROLL_ADJUST (unsigned @var{nunroll}, struct loop *@var{loop})
This target hook returns a new value for the number of times @var{loop}
should be unrolled. The parameter @var{nunroll} is the number of times
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 7bb5cca..8f86538 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -8044,6 +8044,10 @@ build_type_attribute_variant (@var{mdecl},
@hook TARGET_HAVE_CONDITIONAL_EXECUTION
+@hook TARGET_GEN_CCMP_FIRST
+
+@hook TARGET_GEN_CCMP_NEXT
+
@hook TARGET_LOOP_UNROLL_ADJUST
@defmac POWI_MAX_MULTS
diff --git a/gcc/target.def b/gcc/target.def
index c329b2a..3ccb028 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -2532,6 +2532,28 @@ modes and they have different conditional execution capability, such as ARM.",
bool, (void),
default_have_conditional_execution)
+DEFHOOK
+(gen_ccmp_first,
+ "This function emits a comparison insn for the first of a sequence of\n\
+ conditional comparisions. It returns a comparison expression appropriate\n\
+ for passing to @code{gen_ccmp_next} or @code{cbranch_optab}. @var{code} is\n\
+ the @code{rtx_code} of the compare for @var{op0} and @var{op1}.",
+ rtx, (int code, rtx op0, rtx op1),
+ NULL)
+
+DEFHOOK
+(gen_ccmp_next,
+ "This function emits a conditional comparison within a sequence of\n\
+ conditional comparisons. The @var{prev} expression is the result of a\n\
+ prior call to @code{gen_ccmp_first} or @code{gen_ccmp_next}. It may return\n\
+ @code{NULL} if the combination of @var{prev} and this comparison is\n\
+ not supported, otherwise the result must be appropriate for passing to\n\
+ @code{gen_ccmp_next} or @code{cbranch_optab}. @var{code} is the\n\
+ @code{rtx_code} of the compare for @var{op0} and @var{op1}. @var{bit_code}\n\
+ is @code{AND} or @code{IOR}, which is the op on the two compares.",
+ rtx, (rtx prev, int cmp_code, rtx op0, rtx op1, int bit_code),
+ NULL)
+
/* Return a new value for loop unroll size. */
DEFHOOK
(loop_unroll_adjust,