From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-12v.sys.comcast.net (resqmta-ch2-12v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:44]) by sourceware.org (Postfix) with ESMTPS id 380013858C27 for ; Wed, 27 Oct 2021 16:36:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 380013858C27 Received: from resomta-ch2-10v.sys.comcast.net ([69.252.207.106]) by resqmta-ch2-12v.sys.comcast.net with ESMTP id flcymlDevp8dBfluumufhW; Wed, 27 Oct 2021 16:36:44 +0000 Received: from smtpclient.apple ([73.60.223.101]) by resomta-ch2-10v.sys.comcast.net with ESMTPSA id flutmw4lYxnOfflutmflIY; Wed, 27 Oct 2021 16:36:44 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvtddrvdegtddgleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucenucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpefhueduueffuedujeevieffheehleelteeuffehfeefgfevhfduueetieffheegudenucffohhmrghinhepghhnuhdrohhrghenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepvghulhhorghnthihsehlihhvvgdrtghomhdprhgtphhtthhopehgtggtsehgtggtrdhgnhhurdhorhhgpdhrtghpthhtohepghgttgdqrhgvqhhuvghsthesghgttgdrghhnuhdrohhrghdprhgtphhtthhopehgtggtqdhhvghlphesghgttgdrghhnuhdrohhrgh X-Xfinity-VMeta: sc=0.00;st=legit Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: __builtin_addc support?? From: Paul Koning In-Reply-To: Date: Wed, 27 Oct 2021 12:36:43 -0400 Cc: GCC Development , "gcc-request@gcc.gnu.org" , "gcc-help@gcc.gnu.org" Content-Transfer-Encoding: quoted-printable Message-Id: <058A01F7-6073-4F1D-994A-4D6748126173@comcast.net> References: To: sotrdg sotrdg X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2021 16:36:48 -0000 > On Oct 27, 2021, at 12:12 PM, sotrdg sotrdg via Gcc = wrote: >=20 > 79173 =E2=80=93 add-with-carry and subtract-with-borrow support = (x86_64 and others) = (gnu.org) >=20 > What I find quite interesting is things like this. >=20 > 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