RE: __builtin_addc support??

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

 



I just want a portable version of __builtin_addcarry and __builtin_subborrow. Of course if we have things __builtin_rcl and __builtin_rcr would be even better.

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

From: Paul Koning<mailto:paulkoning@xxxxxxxxxxx>
Sent: Wednesday, October 27, 2021 12:36
To: sotrdg sotrdg<mailto:euloanty@xxxxxxxx>
Cc: GCC Development<mailto:gcc@xxxxxxxxxxx>; gcc-request@xxxxxxxxxxx<mailto:gcc-request@xxxxxxxxxxx>; gcc-help@xxxxxxxxxxx<mailto:gcc-help@xxxxxxxxxxx>
Subject: Re: __builtin_addc support??



> On Oct 27, 2021, at 12:12 PM, sotrdg sotrdg via Gcc <gcc@xxxxxxxxxxx> wrote:
>
> 79173 – add-with-carry and subtract-with-borrow support (x86_64 and others) (gnu.org)<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79173>
>
> What I find quite interesting is things like this.
>
> Since llvm clang provides __builtin_addc __builtin_subc for all targets. Can we provide something similar? Since currently no solutions we can access carry flag besides x86

Certainly some other targets could do this.  The LLVM builtins explicitly expose carry, which isn't actually what you want (you'd want the carry flag in the condition code to be propagated).  Presumably optimization would eliminate those explicit arguments and reduce them to CC references.

        paul






[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