Re: Use-case for _addcarryx_u64() wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 03, 2023 at 10:53:04AM +0200, Mason wrote:
> >> Sure, some builtins are officially supported.
> >> Those are meant to be used directly by users.
> >>
> >> Then there are many builtins which are implementation detail for some
> >> other API that users should use instead.
> >> That includes e.g. builtins used under the hood for <*intrin.h>
> >> implementation - users should use the intrinsics from those headers,
> >> that is documented interface which is supported by multiple compilers,
> >> or builtins used under the hood inside of libstdc++ headers (again,
> >> users should use standard C++ APIs which are supported by multiple
> >> compilers instead of the builtins directly) etc.
> >> E.g. between GCC 3.4 and current trunk 62 __builtin_ia32_* builtins
> >> which were implementation details of the x86 intrinsic headers
> >> have been removed as the intrinsics got implemented some other way
> >> (e.g. using generic vectors etc.).
> >
> > Does it matter whether or not those builtins are documented ? It seems 
> > like most of the __builtin_ia32_ builtins are explicitly documented in 
> > the manual, despite the fact that these seem like those you're referring 
> > to as being potentially removable at will whenever - and I see no 
> > indication in the documentation that they are implementation details/may 
> > be removed at any time for any reason.
> 
> Hello Gabriel,
> 
> As far as I understand, Jakub is merely saying:
> If a builtin is NOT documented, then it is NOT part of the API.
> 
> https://gcc.gnu.org/onlinedocs/gcc.pdf
> *builtin_ia32_addcarry* appears nowhere in the manual,
> thus it is NOT documented, thus it is NOT part of the API.

Roughly, except that some builtins are mistakenly documented when they
shouldn't be.  I think e.g. none of the __builtin_ia32_* builtins are actually
supported.
The documentation even mentions some __builtin_ia32_* builtins which were
removed years ago.  E.g. __builtin_ia32_paddw128 but lots of similar ones in GCC 5
(2015).

	Jakub




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux