mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 11:40:50 +08:00
arm-protos.h (arm_canonicalize_comparison): Update prototype.
2005-07-30 Paul Brook <paul@codesourcery.com> * config/arm/arm-protos.h (arm_canonicalize_comparison): Update prototype. * config/arm/arm.c (arm_canonicalize_comparison): Use correct limit value for mode. * config/arm/arm.h (CANONICALIZE_COMPARISON): Pass mode argument. From-SVN: r102574
This commit is contained in:
parent
7c47d6e984
commit
a14b88bb20
@ -1,3 +1,11 @@
|
||||
2005-07-30 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* config/arm/arm-protos.h (arm_canonicalize_comparison): Update
|
||||
prototype.
|
||||
* config/arm/arm.c (arm_canonicalize_comparison): Use correct limit
|
||||
value for mode.
|
||||
* config/arm/arm.h (CANONICALIZE_COMPARISON): Pass mode argument.
|
||||
|
||||
2005-07-29 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR c/529
|
||||
|
@ -52,7 +52,8 @@ extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
|
||||
extern int const_ok_for_arm (HOST_WIDE_INT);
|
||||
extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
|
||||
HOST_WIDE_INT, rtx, rtx, int);
|
||||
extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, rtx *);
|
||||
extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
|
||||
rtx *);
|
||||
extern int legitimate_pic_operand_p (rtx);
|
||||
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
|
||||
extern int arm_legitimate_address_p (enum machine_mode, rtx, RTX_CODE, int);
|
||||
|
@ -2328,9 +2328,12 @@ arm_gen_constant (enum rtx_code code, enum machine_mode mode, rtx cond,
|
||||
immediate value easier to load. */
|
||||
|
||||
enum rtx_code
|
||||
arm_canonicalize_comparison (enum rtx_code code, rtx * op1)
|
||||
arm_canonicalize_comparison (enum rtx_code code, enum machine_mode mode,
|
||||
rtx * op1)
|
||||
{
|
||||
unsigned HOST_WIDE_INT i = INTVAL (*op1);
|
||||
unsigned HOST_WIDE_INT maxval;
|
||||
maxval = (((unsigned HOST_WIDE_INT) 1) << (GET_MODE_BITSIZE(mode) - 1)) - 1;
|
||||
|
||||
switch (code)
|
||||
{
|
||||
@ -2340,7 +2343,7 @@ arm_canonicalize_comparison (enum rtx_code code, rtx * op1)
|
||||
|
||||
case GT:
|
||||
case LE:
|
||||
if (i != ((((unsigned HOST_WIDE_INT) 1) << (HOST_BITS_PER_WIDE_INT - 1)) - 1)
|
||||
if (i != maxval
|
||||
&& (const_ok_for_arm (i + 1) || const_ok_for_arm (-(i + 1))))
|
||||
{
|
||||
*op1 = GEN_INT (i + 1);
|
||||
@ -2350,7 +2353,7 @@ arm_canonicalize_comparison (enum rtx_code code, rtx * op1)
|
||||
|
||||
case GE:
|
||||
case LT:
|
||||
if (i != (((unsigned HOST_WIDE_INT) 1) << (HOST_BITS_PER_WIDE_INT - 1))
|
||||
if (i != ~maxval
|
||||
&& (const_ok_for_arm (i - 1) || const_ok_for_arm (-(i - 1))))
|
||||
{
|
||||
*op1 = GEN_INT (i - 1);
|
||||
|
@ -2243,7 +2243,8 @@ extern int making_const_table;
|
||||
|| (const_ok_for_arm (- INTVAL (OP1))))) \
|
||||
{ \
|
||||
rtx const_op = OP1; \
|
||||
CODE = arm_canonicalize_comparison ((CODE), &const_op); \
|
||||
CODE = arm_canonicalize_comparison ((CODE), GET_MODE (OP0), \
|
||||
&const_op); \
|
||||
OP1 = const_op; \
|
||||
} \
|
||||
} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user