This is the mail archive of the
mailing list for the GCC project.
Re: hard_regno_nregs == 0 ?
- From: Jim Wilson <wilson at specifix dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 09 Jan 2008 11:26:48 -0800
- Subject: Re: hard_regno_nregs == 0 ?
- References: <200801082013.m08KDLeU011644@greed.delorie.com>
DJ Delorie wrote:
Which assumption is wrong? That hard_regno_nregs can be zero (m32c),
or that hard_regno_nregs will never be zero (rtlanal)?
I would say the m32c port is wrong. HARD_REGNO_MODE_OK indicates
whether a register can hold a mode. HARD_REGNO_NREGS indicates how many
registers we need to hold a value. This is a number that can be larger
than 1 if the value is larger than one register, but it makes no sense
for it to be zero, as no (non-void) value can ever be held in zero
registers. The number of registers needed is irrespective of whether
the register can actually hold the value, as that is specified by
HARD_REGNO_MODE_OK. There are lots of places that use HARD_REGNO_NREGS
in division/modulus operations. It would be complicated to fix them all
to handle a zero value.
However, as Ian mentioned, there does seem to be something else wrong
here, as it seems odd that you have an invalid subreg being passed in here.
Jim Wilson, GNU Tools Support, http://www.specifix.com