expmed.c (const_mult_add_overflow_p): Remove.
* expmed.c (const_mult_add_overflow_p): Remove. * expr.h: Remove the prototype for const_mult_add_overflow_p. From-SVN: r110334
This commit is contained in:
parent
3d538baeb5
commit
b79de014cc
|
@ -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
|
||||
|
|
38
gcc/expmed.c
38
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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue