This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Combine known_cond() may create subreg of const_int


On Wed, Feb 20, 2002 at 06:25:51PM -0300, Alexandre Oliva wrote:
> -#define SPARC_SETHI_P(X) \
> -(((unsigned HOST_WIDE_INT) (X) & \
> -  (TARGET_ARCH64 ? ~(unsigned HOST_WIDE_INT) 0xfffffc00 : 0x3ff)) == 0)
> +#define SPARC_SETHI_P(X) (((unsigned HOST_WIDE_INT) (X) & 0x3ff) == 0)

This change is ok for SImode constants, but not DImode,
since sethi really sets 0x00000000fffffc00 for sparc64.

Thus the uses of this predicate must be audited.  It looks
like at least some of the uses in sparc.c are protected by

  && INTVAL (X) >= 0

but the 'K' constraint is not.  We probably can't use the
same constraint letter for sparc64 at all, since we do 
still want SImode patterns to use SETHI for negative values.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]