From: Xin Wang <[email protected]> The use of UOItype with mode(OI) for 16-byte atomic operations is non-standard. The OI mode is not defined in machmode.def and exists only as an ad-hoc construct in libgcc/sync.c.
This patch replaces it with UTItype using mode(TI), which is the standard GCC machine mode for 16-byte integers (Tetra Integer). The size argument is also corrected from 8 to 16 to match the actual operand width. --- libgcc/ChangeLog | 5 +++++ libgcc/sync.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 6ac5fd5c078..513cb4e143e 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2025-12-25 Xin Wang <[email protected]> + + * sync.c: Replace UOItype with UTItype and use mode(TI) + Pass 16, not 8, to DEFINE macro. + 2025-12-15 Peter Damianov <[email protected]> * config/score/crti.S: Delete. diff --git a/libgcc/sync.c b/libgcc/sync.c index f2d35ecf1e0..a94482a0864 100644 --- a/libgcc/sync.c +++ b/libgcc/sync.c @@ -151,8 +151,8 @@ DEFINE (FN, 8, UDItype) #elif SIZE == 16 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 -typedef unsigned int UOItype __attribute__((mode (OI))); -DEFINE (FN, 8, UOItype) +typedef unsigned int UTItype __attribute__((mode (TI))); +DEFINE (FN, 16, UTItype) #endif -- 2.34.1
