https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117581
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kito Cheng <[email protected]>: https://gcc.gnu.org/g:808b684172c7689a225f853e2d90a8687e528ea8 commit r16-6731-g808b684172c7689a225f853e2d90a8687e528ea8 Author: Kito Cheng <[email protected]> Date: Mon Jan 12 21:31:11 2026 +0800 RISC-V: Add support for _BitInt [PR117581] This patch implements _BitInt support for RISC-V target by defining the type layout and ABI requirements. The limb mode selection is based on the bit width, using appropriate integer modes from QImode to TImode. The implementation also adds the necessary libgcc version symbols for _BitInt runtime support functions. Changes in v3: - Require sync_char_short effective target for bitint-64.c, bitint-82.c and bitint-84.c tests since they use atomic operations. - Add -fno-section-anchors to bitint-32-on-rv64.c and adjust expected assembly output patterns. Changes in v2: - limb_mode use up to XLEN when N > XLEN, which is different setting from the abi_limb_mode. - Adding missing floatbitinthf in libgcc. gcc/ChangeLog: PR target/117581 * config/riscv/riscv.cc (riscv_bitint_type_info): New function. (TARGET_C_BITINT_TYPE_INFO): Define. gcc/testsuite/ChangeLog: PR target/117581 * gcc.dg/torture/bitint-64.c: Add sync_char_short effective target requirement. * gcc.dg/torture/bitint-82.c: Likewise. * gcc.dg/torture/bitint-84.c: Likewise. * gcc.target/riscv/bitint-32-on-rv64.c: New test. * gcc.target/riscv/bitint-alignments.c: New test. * gcc.target/riscv/bitint-args.c: New test. * gcc.target/riscv/bitint-sizes.c: New test. libgcc/ChangeLog: PR target/117581 * config/riscv/libgcc-riscv.ver: New file. * config/riscv/t-elf (SHLIB_MAPFILES): Add libgcc-riscv.ver. * config/riscv/t-softfp32 (softfp_extras): Add floatbitinttf and fixtfbitint.
