aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expmed.c38
-rw-r--r--gcc/expr.h1
3 files changed, 5 insertions, 39 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2f0fe91..f7210c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-28 Kazu Hirata <kazu@codesourcery.com>
+
+ * expmed.c (const_mult_add_overflow_p): Remove.
+ * expr.h: Remove the prototype for const_mult_add_overflow_p.
+
2006-01-28 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): -msoft-float
diff --git a/gcc/expmed.c b/gcc/expmed.c
index c4797b8..1ad0949 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -5025,44 +5025,6 @@ make_tree (tree type, rtx x)
}
}
-/* Check whether the multiplication X * MULT + ADD overflows.
- X, MULT and ADD must be CONST_*.
- MODE is the machine mode for the computation.
- X and MULT must have mode MODE. ADD may have a different mode.
- So can X (defaults to same as MODE).
- UNSIGNEDP is nonzero to do unsigned multiplication. */
-
-bool
-const_mult_add_overflow_p (rtx x, rtx mult, rtx add,
- enum machine_mode mode, int unsignedp)
-{
- tree type, mult_type, add_type, result;
-
- type = lang_hooks.types.type_for_mode (mode, unsignedp);
-
- /* In order to get a proper overflow indication from an unsigned
- type, we have to pretend that it's a sizetype. */
- mult_type = type;
- if (unsignedp)
- {
- /* FIXME:It would be nice if we could step directly from this
- type to its sizetype equivalent. */
- mult_type = build_distinct_type_copy (type);
- TYPE_IS_SIZETYPE (mult_type) = 1;
- }
-
- add_type = (GET_MODE (add) == VOIDmode ? mult_type
- : lang_hooks.types.type_for_mode (GET_MODE (add), unsignedp));
-
- result = fold_build2 (PLUS_EXPR, mult_type,
- fold_build2 (MULT_EXPR, mult_type,
- make_tree (mult_type, x),
- make_tree (mult_type, mult)),
- make_tree (add_type, add));
-
- return TREE_CONSTANT_OVERFLOW (result);
-}
-
/* Return an rtx representing the value of X * MULT + ADD.
TARGET is a suggestion for where to store the result (an rtx).
MODE is the machine mode for the computation.
diff --git a/gcc/expr.h b/gcc/expr.h
index ef42387..6d09644 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -722,7 +722,6 @@ extern rtx extract_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int, rtx,
enum machine_mode, enum machine_mode);
extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int);
-extern bool const_mult_add_overflow_p (rtx, rtx, rtx, enum machine_mode, int);
extern rtx expand_mult_add (rtx, rtx, rtx, rtx,enum machine_mode, int);
extern rtx expand_mult_highpart_adjust (enum machine_mode, rtx, rtx, rtx, rtx, int);