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: [PATCH] rs6000: Add eI constraint for 34-bit constants


Hi!

On Wed, May 29, 2019 at 01:08:28PM -0500, Bill Schmidt wrote:
> +/* Whether a given VALUE is a valid 16- or 34-bit signed offset.  EXTRA is the
> +   amount that we can't touch at the high end of the range (typically if the
> +   address is split into smaller addresses, the extra covers the addresses
> +   which might be generated when the insn is split).  */
> +#define SIGNED_16BIT_OFFSET_P(VALUE, EXTRA)				\
> +  IN_RANGE (VALUE,							\
> +	    ~(HOST_WIDE_INT_1 << 15),					\
> +	    (HOST_WIDE_INT_1 << 15) - 1 - (EXTRA))
> +
> +#define SIGNED_34BIT_OFFSET_P(VALUE, EXTRA)				\
> +  IN_RANGE (VALUE,							\
> +	    ~(HOST_WIDE_INT_1 << 33),					\
> +	    (HOST_WIDE_INT_1 << 33) - 1 - (EXTRA))

The ~ should be - I think?

Okay for trunk with that change.  Thanks,


Segher


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