From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BECC23857834; Tue, 25 Oct 2022 20:32:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BECC23857834 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666729964; bh=W7s0GA0tnP2n+iVbm4UkfmGcODYdJMGvUICvD4vkQvg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uv73RsupoQOBxfCb9xHvjGbv3w6683WJQ8QXpDdpQEX3YIZlr/ZxbwfL33Udd9aiA 8/29tpXpejFOoOLcLUAl5Y0i+qLHsJe8PJkhR9VfcTqwMVG7fCKSmDdgoPehj3yxFa 6pVUHUDgidQjwJJRLZ5IMnYPI4/1HJC9EJqHpBLs= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102989] Implement C2x's n2763 (_BitInt) Date: Tue, 25 Oct 2022 20:32:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: NEW 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102989 --- Comment #13 from joseph at codesourcery dot com --- On Tue, 25 Oct 2022, jakub at gcc dot gnu.org via Gcc-bugs wrote: > The x86-64 psABI has been changed for this: > https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/8ca45392570e96920f8a15d= 903d6122f6d263cd0 > but the state of the padding bits isn't mentioned there anywhere. I think the words "The value of the unused bits beyond the width of the=20 \texttt{_BitInt(N)} value but within the size of the \texttt{_BitInt(N)}=20 are unspecified when stored in memory or register." are what deals with=20 padding (both padding within sizeof(_BitInt(N)) bytes, and bytes within a=20 register or stack slot used for argument passing / return but outside=20 sizeof(_BitInt(N)) bytes). (Of course different architectures might make different choices for how to= =20 handle padding.) I filed https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/300 in= =20 July to request an ABI for _BitInt on RISC-V. I've just now filed=20 https://github.com/ARM-software/abi-aa/issues/175 to request such an ABI=20 for both 32-bit and 64-bit Arm, and=20 https://gitlab.com/x86-psABIs/i386-ABI/-/issues/5 to request such an ABI=20 for 32-bit x86. I don't know if there are other psABIs with public issue=20 trackers where such issues can be filed (but we'll need some sensible=20 default anyway for architectures where we can't get an ABI properly=20 specified in an upstream-maintained ABI document).=