https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124940

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In r16-8757 I've even added an assertion that this is not the case, I don't
think I'm willing to support that case without being able to easily test it
somewhere.
So, I think the RISCV maintainers have the option to disable _BitInt support
for TARGET_BIG_ENDIAN, or somebody needs to adjust the whole
gimple-lower-bitint.cc for this case.
The reason why it is complicated is that for big endian for types which have
full limb (half of ABI limb) of padding bits, we have
[ padding bit limb ][ optional partially padding bit limb ][ other limbs ]
in memory.  Currently all the bitint_big_endian handling just assumes the most
significant limb is at offset 0, so it iterates from maximum offset (least
significant limb) to 0 inclusive, or in the other direction.  But when there is
the extra padding bit only limb, everything shifts by 1 limb, so it now needs
to iterate down to 1 instead of 0, etc.
Is big endian riscv even a real thing?  I think Linus was strongly against that
in the kernel.

Reply via email to