This is the mail archive of the 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: hard_regno_nregs == 0 ?

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,

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