From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E501E3857C61; Mon, 15 Mar 2021 10:21:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E501E3857C61 From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99582] No intrinsics to access rcl or rcr instruction on x86_64 Date: Mon, 15 Mar 2021 10:21:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: unlvsur at live dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 10:21:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99582 --- Comment #2 from cqwrteur --- (In reply to Richard Biener from comment #1) > ROR can be open-coded, GCC tries hard to detect common patterns. >=20 > RCR is difficult because it involves the carry flag and thus the carry > producer > would have to be explicit. Or it would need to be an awkward intrinsic > like >=20 > __builtin_rcr ({unsigned, unsigned short, unsigned char} word, bool carry, > unsigned amnt); >=20 > and you'd need to hope the compiler can arrange 'carry' to be produced in > the carry flag ... so is that possible to __builtin_rcl and __builtin_rcr? I think a lot of cryptography and multi-precision libraries need that for pow stuffs=