Richard Sandiford <richard.sandif...@arm.com> writes:
> Robin Dapp via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>> Hi,
>>
>> upcoming changes for RISC-V will have us exceed 256 modes or 8 bits. The
>> helper functions in gen* rely on the opcode as well as two modes fitting
>> into an unsigned int (a signed int even if we consider the qsort default
>> comparison function).  This patch changes the type of the index/hash
>> from unsigned int to unsigned long long and allows up to 16 bits for a
>> mode as well as 32 bits for an optab.
>>
>> Despite fearing worse, bootstrap, build and test suite run times on
>> x86, aarch64, rv64 and power10 are actually unchanged (I didn't check
>> 32-bit architectures but would expect similar results).
>
> I think for now we should just bump the mode shift to 10 and assert
> (statically) that MAX_MACHINE_MODE < 1024.

Sorry, just remembered that we already have:

  if (NUM_OPTABS > 0xffff
    || MAX_MACHINE_MODE >= ((1 << MACHINE_MODE_BITSIZE) - 1))
    fatal ("genopinit range assumptions invalid");

so it would be a case of changing those instead.

Thanks,
Richard

Reply via email to