[all-commits] [llvm/llvm-project] c96a17: [tsan] Enable __TSAN_HAS_INT128 on s390x and mips6...
Mauri de Souza Meneguzzo via All-commits
all-commits at lists.llvm.org
Thu Jul 16 13:45:15 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c96a176dd15690ed8181c6764b26d0303008a40f
https://github.com/llvm/llvm-project/commit/c96a176dd15690ed8181c6764b26d0303008a40f
Author: Mauri de Souza Meneguzzo <mauri870 at gmail.com>
Date: 2026-07-16 (Thu, 16 Jul 2026)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_interface.h
Log Message:
-----------
[tsan] Enable __TSAN_HAS_INT128 on s390x and mips64 (#197319)
The s390x exclusion was added in
https://github.com/llvm/llvm-project/commit/b17673816d7f65e07015489993b22049e36b04db
(https://reviews.llvm.org/D105629)
citing lack of hardware 128-bit atomics. s390x does have the CDSG
instruction,
but `alignof(__int128) == 8` on the s390x psABI while CDSG requires
16-byte
alignment, so Clang does not define
`__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16` for
this target. The mips64 exclusion has been present since
`__TSAN_HAS_INT128` was
introduced in
https://github.com/llvm/llvm-project/commit/06bbca9ec4bbc5a103c94c4973797ea4ddf944b5
(https://reviews.llvm.org/D18543) with no documented
rationale. Clang similarly does not define
`__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16`
for mips64.
Both exclusions are unnecessary. When
`__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16` is
not defined, all a128 operations use the SpinMutex-based emulation path,
which
serializes 128-bit accesses under a global lock without requiring any
hardware
CAS16 support.
Verified with Clang (targets: s390x-linux-gnu, mips64-linux-gnuabi64,
mips64el-linux-gnuabi64): all three produce the full set of 12
`__tsan_atomic128_*` symbols with zero `__sync_*_16 / __atomic_*_16`
libcall references.
Runtime testing has not been performed as I lack access to these
architectures.
Relates https://github.com/llvm/llvm-project/pull/196833
For https://github.com/golang/go/issues/61236
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list