On Tue, 28 Jan 2020 at 17:00, Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Tue, Jan 28, 2020 at 04:56:59PM +0530, Prathamesh Kulkarni wrote:
> > Thanks for the suggestions. In the attached patch I bumped up value of
> > ERF_RETURNS_ARG_MASK
> > to UINT_MAX >> 2, and use highest two bits for ERF_NOALIAS and 
> > ERF_RETURNS_ARG.
> > And use fn spec "Z<argnum>" to store the argument number in fn-spec format.
> > Does that look OK ?
>
> No.
>
> +#define ERF_RETURN_ARG_MASK    (UINT_MAX >> 2)
>
>  /* Nonzero if the return value is equal to the argument number
>     flags & ERF_RETURN_ARG_MASK.  */
> -#define ERF_RETURNS_ARG                (1 << 2)
> +#define ERF_RETURNS_ARG                (1 << (BITS_PER_WORD - 2))
>
> How is size of host int related to BITS_PER_WORD?  Not to mention that
> if BITS_PER_WORD is 64 and host int is 32-bit, 1 << (64 - 2) is UB.
Oops sorry. I should have used HOST_BITS_PER_INT.
I assume that'd be correct ?

Thanks,
Prathamesh
>
>         Jakub
>

Reply via email to