This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: hard_regno_nregs == 0 ?
On Wed, 2008-01-09 at 15:38 -0500, DJ Delorie wrote:
> +@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 think that HARD_REGNO_NREGS should not be returning zero, but I also
think it is a moot point, as we shouldn't be using it on invalid
subregs. Hence I like Paul's wording better than yours, but it appears
not to be sufficient for your case, as your m32c is only fixing
HARD_REGNO_NREGS to not return zero. It appears that the m32c port does
define both HARD_REGNO_MODE_OK and CANNOT_CHANGE_MODE_CLASS, so it isn't
clear what the problem is. I suspect that there may be another problem
here. Unfortunately, I don't have a testcase I can use to look at this
myself. Maybe if we found and fixed this other problem, Paul's wording
would be correct again.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com