Re: [RFC PATCH 1/3] bitint: Support ABI-extended _BitInt(N)

2025-05-20 Thread Jakub Jelinek
On Tue, May 20, 2025 at 11:29:10AM +0800, Yang Yujie wrote: > gcc/c-family/ChangeLog: > > * c-common.cc (resolve_overloaded_atomic_exchange): Truncate > _BitInt values before atomic store. You aren't truncating _BitInt values before atomic store, you are extending them. > (reso

[RFC PATCH 1/3] bitint: Support ABI-extended _BitInt(N)

2025-05-19 Thread Yang Yujie
The padding bits of _BitInt(N) are undefined in the x86-64 and the aarch64 ABI. In general, the current lowering and expand process perform truncations when taking a _BitInt value as input, while leaving them as-is in the output. By adding truncation on the output side, we can define psABIs (e.g.