From c245c83be1ce004ee94a0dbd2815b424cc40f5cd Mon Sep 17 00:00:00 2001 From: Mark Peerdeman Date: Thu, 8 Feb 2024 13:29:58 +0100 Subject: [PATCH] Set max bitwidths for atomic operations --- clang/lib/Basic/Targets/WebAssembly.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Basic/Targets/WebAssembly.h b/clang/lib/Basic/Targets/WebAssembly.h index cd7d2a7e8c03..52f36e8ba26a 100644 --- a/clang/lib/Basic/Targets/WebAssembly.h +++ b/clang/lib/Basic/Targets/WebAssembly.h @@ -212,6 +212,8 @@ class CheerpTargetInfo : public TargetInfo { LongDoubleWidth = LongDoubleAlign = 64; LongDoubleFormat = &llvm::APFloat::IEEEdouble(); SizeType = UnsignedInt; + // We define these as 32-bit for now, since AsmJS cannot handle 64-bit atomic operations currently. + MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32; // Use 32-bit integers for two separated bit fields. UseBitFieldTypeAlignment = true;