hard_regno_nregs == 0 ?

Paul Brook paul@codesourcery.com
Wed Jan 9 21:48:00 GMT 2008


>  @defmac HARD_REGNO_NREGS (@var{regno}, @var{mode})
>  A C expression for the number of consecutive hard registers, starting
>  at register number @var{regno}, required to hold a value of mode
> -@var{mode}.
> +@var{mode}.  This macro must never return zero, even if a register
> +cannot hold the requested mode - indicate that with HARD_REGNO_MODE_OK
> +and/or CANNOT_CHANGE_MODE_CLASS instead.

I find this somewhat unclear - It seems to imply that HARD_REGNO_NREGS may be 
called even when HARD_REGNO_MODE_OK returns false.

How about:

This macro must return a nonzero value for all combinations permitted by 
HARD_REGNO_MODE_OK and CANNOT_CHANGE_MODE_CLASS.

Paul



More information about the Gcc mailing list