patch: update comment to match code.
Graham Stott
grahams@redhat.com
Tue Jan 15 02:14:00 GMT 2002
Richard,
OK here's the patch.
I've also changed the places where we used "(rtx) (HOST_WIDE_INT) 1"
to use "(rtx) (size_t) 1" and added the intermediate (size_t) cast
where it was missing.
Bootstrapped i686-pc-linux-gnu, all languages, no regressions.
Graham
ChangeLog
* calls.c (try_to_integrate): Use "(size_t)" intermediate
cast and when casting an integer literal to "rtx" pointer.
(expand_call): Likewise.
* flow.c (try_pre_increment): Likewise.
(find_use_as_address): Likewise.
* integrate.c (expand_iline_function): Likewise.
* regmove.c (): Likewise.
-----------------------------------------------------------------
Index: gcc/calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.218
diff -c -p -r1.218 calls.c
*** calls.c 2001/12/23 13:02:18 1.218
--- calls.c 2002/01/15 07:52:21
*************** try_to_integrate (fndecl, actparms, targ
*** 1822,1828 ****
timevar_pop (TV_INTEGRATION);
/* If inlining succeeded, return. */
! if (temp != (rtx) (HOST_WIDE_INT) - 1)
{
if (ACCUMULATE_OUTGOING_ARGS)
{
--- 1822,1828 ----
timevar_pop (TV_INTEGRATION);
/* If inlining succeeded, return. */
! if (temp != (rtx) (size_t) - 1)
{
if (ACCUMULATE_OUTGOING_ARGS)
{
*************** try_to_integrate (fndecl, actparms, targ
*** 1902,1908 ****
warning ("called from here");
}
mark_addressable (fndecl);
! return (rtx) (HOST_WIDE_INT) - 1;
}
/* We need to pop PENDING_STACK_ADJUST bytes. But, if the arguments
--- 1902,1908 ----
warning ("called from here");
}
mark_addressable (fndecl);
! return (rtx) (size_t) - 1;
}
/* We need to pop PENDING_STACK_ADJUST bytes. But, if the arguments
*************** expand_call (exp, target, ignore)
*** 2285,2291 ****
rtx temp = try_to_integrate (fndecl, actparms, target,
ignore, TREE_TYPE (exp),
structure_value_addr);
! if (temp != (rtx) (HOST_WIDE_INT) - 1)
return temp;
}
--- 2285,2291 ----
rtx temp = try_to_integrate (fndecl, actparms, target,
ignore, TREE_TYPE (exp),
structure_value_addr);
! if (temp != (rtx) (size_t) - 1)
return temp;
}
Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.499
diff -c -p -r1.499 flow.c
*** flow.c 2001/12/28 18:17:53 1.499
--- flow.c 2002/01/15 08:39:11
*************** try_pre_increment (insn, reg, amount)
*** 3974,3986 ****
use = 0;
if (pre_ok)
use = find_use_as_address (PATTERN (insn), reg, 0);
! if (post_ok && (use == 0 || use == (rtx) 1))
{
use = find_use_as_address (PATTERN (insn), reg, -amount);
do_post = 1;
}
! if (use == 0 || use == (rtx) 1)
return 0;
if (GET_MODE_SIZE (GET_MODE (use)) != (amount > 0 ? amount : - amount))
--- 3974,3986 ----
use = 0;
if (pre_ok)
use = find_use_as_address (PATTERN (insn), reg, 0);
! if (post_ok && (use == 0 || use == (rtx) (size_t) 1))
{
use = find_use_as_address (PATTERN (insn), reg, -amount);
do_post = 1;
}
! if (use == 0 || use == (rtx) (size_t) 1)
return 0;
if (GET_MODE_SIZE (GET_MODE (use)) != (amount > 0 ? amount : - amount))
*************** find_use_as_address (x, reg, plusconst)
*** 4036,4046 ****
/* If REG occurs inside a MEM used in a bit-field reference,
that is unacceptable. */
if (find_use_as_address (XEXP (x, 0), reg, 0) != 0)
! return (rtx) (HOST_WIDE_INT) 1;
}
if (x == reg)
! return (rtx) (HOST_WIDE_INT) 1;
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
--- 4036,4046 ----
/* If REG occurs inside a MEM used in a bit-field reference,
that is unacceptable. */
if (find_use_as_address (XEXP (x, 0), reg, 0) != 0)
! return (rtx) (size_t) 1;
}
if (x == reg)
! return (rtx) (size_t) 1;
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
*************** find_use_as_address (x, reg, plusconst)
*** 4050,4056 ****
if (value == 0)
value = tem;
else if (tem != 0)
! return (rtx) (HOST_WIDE_INT) 1;
}
else if (fmt[i] == 'E')
{
--- 4050,4056 ----
if (value == 0)
value = tem;
else if (tem != 0)
! return (rtx) (size_t) 1;
}
else if (fmt[i] == 'E')
{
*************** find_use_as_address (x, reg, plusconst)
*** 4061,4067 ****
if (value == 0)
value = tem;
else if (tem != 0)
! return (rtx) (HOST_WIDE_INT) 1;
}
}
}
--- 4061,4067 ----
if (value == 0)
value = tem;
else if (tem != 0)
! return (rtx) (size_t) 1;
}
}
}
Index: gcc/integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.181
diff -c -p -r1.181 integrate.c
*** integrate.c 2002/01/06 03:51:09 1.181
--- integrate.c 2002/01/15 07:52:33
*************** expand_inline_function (fndecl, parms, t
*** 698,704 ****
enum machine_mode mode;
if (actual == 0)
! return (rtx) (HOST_WIDE_INT) -1;
arg = TREE_VALUE (actual);
mode = TYPE_MODE (DECL_ARG_TYPE (formal));
--- 698,704 ----
enum machine_mode mode;
if (actual == 0)
! return (rtx) (size_t) -1;
arg = TREE_VALUE (actual);
mode = TYPE_MODE (DECL_ARG_TYPE (formal));
*************** expand_inline_function (fndecl, parms, t
*** 711,717 ****
|| (mode == BLKmode
&& (TYPE_MAIN_VARIANT (TREE_TYPE (arg))
!= TYPE_MAIN_VARIANT (TREE_TYPE (formal)))))
! return (rtx) (HOST_WIDE_INT) -1;
}
/* Extra arguments are valid, but will be ignored below, so we must
--- 711,717 ----
|| (mode == BLKmode
&& (TYPE_MAIN_VARIANT (TREE_TYPE (arg))
!= TYPE_MAIN_VARIANT (TREE_TYPE (formal)))))
! return (rtx) (size_t) -1;
}
/* Extra arguments are valid, but will be ignored below, so we must
Index: regmove.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regmove.c,v
retrieving revision 1.121
diff -c -p -r1.121 regmove.c
*** regmove.c 2002/01/01 22:22:25 1.121
--- regmove.c 2002/01/15 08:36:00
*************** try_auto_increment (insn, inc_insn, inc_
*** 111,117 ****
/* Can't use the size of SET_SRC, we might have something like
(sign_extend:SI (mem:QI ... */
rtx use = find_use_as_address (pset, reg, 0);
! if (use != 0 && use != (rtx) 1)
{
int size = GET_MODE_SIZE (GET_MODE (use));
if (0
--- 111,117 ----
/* Can't use the size of SET_SRC, we might have something like
(sign_extend:SI (mem:QI ... */
rtx use = find_use_as_address (pset, reg, 0);
! if (use != 0 && use != (rtx) (size_t) 1)
{
int size = GET_MODE_SIZE (GET_MODE (use));
if (0
---------------------------------------------------------------------
More information about the Gcc-patches
mailing list