Robin Dapp <rdapp....@gmail.com> writes:
> Ok so the consensus seems to rather stay with 32 bits and only
> change the shift to 10/20?

Yeah.  The check would then be:

  if (NUM_OPTABS > 0xfff || NUM_MACHINE_MODES > 0x3ff)
    fatal ("genopinit range assumptions invalid");

> As MACHINE_MODE_BITSIZE is already
> 16 we would need an additional check independent of that.
> Wouldn't that also be a bit confusing?

MACHINE_MODE_BITSIZE isn't really relevant to genopinit.cc.
If we wanted to make it relevant, we ought to express everything
that depends on the mode size in terms of MACHINE_MODE_BITSIZE,
so that the shifts would be << MACHINE_MODE_BITSIZE and
<< (2 * MACHINE_MODE_BITSIZE).  The NUM_OPTABS condition would
need to be expressed in terms of MACHINE_MODE_BITSIZE too.

But that seems overkill.  The reason for going straight from 8 to 16 for
the bitfields was to keep the accesses fast.  But that isn't an issue
for these shifts, since the end result is just ORed into a 32-bit blob.
And 32 bits are still plenty, even with the new RISC-V modes.

Thanks,
Richard

Reply via email to