public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Use-case for _addcarryx_u64() wrapper
@ 2023-06-01  7:42 Mason
  2023-06-01  8:40 ` Uros Bizjak
  2023-06-03 11:37 ` Mason
  0 siblings, 2 replies; 11+ messages in thread
From: Mason @ 2023-06-01  7:42 UTC (permalink / raw)
  To: gcc-help; +Cc: Uros Bizjak, Jakub Jelinek, Jeffrey Walton, Marc Glisse

Hello,

As far as I can tell, intrinsics _addcarry_u64() and _addcarryx_u64() are
plain wrappers around the same __builtin_ia32_addcarryx_u64() function.

https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/adxintrin.h

Thus, I wonder: what is the use-case for the wrappers?
Why would a programmer not call the builtin directly?
Is it for compatibility with Intel compilers?

Also, based on the names, I would have assumed that
_addcarry_u64 generates adc
while
_addcarryx_u64 generates adcx/adox ?

Relevant past discussion:
https://gcc.gnu.org/legacy-ml/gcc-help/2017-08/msg00100.html

Regards


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-06-03 11:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01  7:42 Use-case for _addcarryx_u64() wrapper Mason
2023-06-01  8:40 ` Uros Bizjak
2023-06-02 12:45   ` Mason
2023-06-02 12:50     ` Jeffrey Walton
2023-06-03  9:10       ` Mason
2023-06-02 12:59     ` Jakub Jelinek
2023-06-02 22:53       ` Gabriel Ravier
2023-06-03  8:53         ` Mason
2023-06-03  9:09           ` Jakub Jelinek
2023-06-03 11:37 ` Mason
2023-06-03 11:49   ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).