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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't see how it can work with all the _BitInts though, the _BitInt ABI
depends on various things, which precisions are handled as normal scalar
integral types or their bitfields, which are handled as arrays of limbs, what
the limb size is, limb ordering, bit ordering within the limbs, etc.
So, to support _BitInt with SSO, one would basically need to define a new ABI
which would be a big endian (or little endian) counterpart of the normal
_BitInt ABI.
Plus all the libgcc _BitInt helper routines would need to have their SSO
variants, otherwise one could handle (with lot of pain in bitint lowering)
struct __attribute__((scalar_storage_order ("big-endian"))) S
{
  _BitInt(1023) a;
} b;
_BitInt(1023) c;

_BitInt(1023)
foo (void)
{
  return b.a + c;
}
but not really
  return b.a * c;
(the addition is done without libgcc help, so one could do the b.a endian
adjustment,
but multiplication, floating <-> _BitInt casts, etc. are all done with libgcc
help).

Note, right now there is no big-endian _BitInt support at all, neither
powerpc{,64} nor s390{,x} nor any other target I have usual access to defines
their _BitInt psABI.
And Segher was talking about some PDP-endian _BitInt for powerpc* (having the
bits inside of limbs big endian, but limbs ordered little endian).

So I think rejecting _BitInt at least for now is the only possible solution.

Reply via email to