diff --git a/llvm/include/llvm/Cheerp/NameGenerator.h b/llvm/include/llvm/Cheerp/NameGenerator.h index c0b84e184276..788778ea358d 100644 --- a/llvm/include/llvm/Cheerp/NameGenerator.h +++ b/llvm/include/llvm/Cheerp/NameGenerator.h @@ -68,6 +68,15 @@ class NameGenerator HANDLE_VAARG, EXCEPTION, FETCHBUFFER, + ATOMICLOAD, + ATOMICSTORE, + ATOMICADD, + ATOMICSUB, + ATOMICAND, + ATOMICOR, + ATOMICXOR, + ATOMICXCHG, + ATOMICCMPXCHG, MEMORY, HEAP8, HEAP16, diff --git a/llvm/lib/CheerpWriter/NameGenerator.cpp b/llvm/lib/CheerpWriter/NameGenerator.cpp index 37d49bf1ed8d..17615cb078fc 100644 --- a/llvm/lib/CheerpWriter/NameGenerator.cpp +++ b/llvm/lib/CheerpWriter/NameGenerator.cpp @@ -678,6 +678,15 @@ void NameGenerator::generateReadableNames(const Module& M, const GlobalDepsAnaly builtins[EXCEPTION] = "$except"; builtins[FETCHBUFFER] = "fetchBuffer"; builtins[STACKPTR] = "__stackPtr"; + builtins[ATOMICLOAD] = "__atomicload"; + builtins[ATOMICSTORE] = "__atomicstore"; + builtins[ATOMICADD] = "__atomicadd"; + builtins[ATOMICSUB] = "__atomicsub"; + builtins[ATOMICAND] = "__atomicand"; + builtins[ATOMICOR] = "__atomicor"; + builtins[ATOMICXOR] = "__atomicxor"; + builtins[ATOMICXCHG] = "__atomicexchange"; + builtins[ATOMICCMPXCHG] = "__atomiccompareExchange"; builtins[HEAP8] = "HEAP8"; builtins[HEAP16] = "HEAP16"; builtins[HEAP32] = "HEAP32";