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

--- Comment #4 from g.peterh...@t-online.de ---
Am 23.05.19 um 20:11 schrieb glisse at gcc dot gnu.org:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90600
> 
> --- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
> Intel documents that it uses "unsigned __int64" but I don't see where they
> document what __int64 is. We could take a "void *out" argument and cast it
> inside the function, but that would lose useful diagnostics for people trying
> to pass a 32-bit type. We could overload in C++. Not sure any of that is worth
> the trouble, those interfaces are target-specific anyway.
> 
What else should "unsigned __int64" be than a uint64_t (0..2^64-1)? Then this
would look exactly like this:

external __inline uint8_t
__attribute __ ((__ gnu_inline__, __always_inline__, __artificial__))
_addcarry_u64 (uint8_t __CF, uint64_t __X, uint64_t __Y, uint64_t * __P)
{
    return __builtin_ia32_addcarryx_u64 (__CF, __X, __Y, __P);
}

And I miss addcarry/subborrow for uint8/16/128. You could make that available
as a general __builtin :-)
Of course it would be better if such functions are included in the C/C++
standard ...

Reply via email to