r347005 - [WebAssembly] Change type of wake count to unsigned int

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 15 16:48:58 PST 2018


Author: aheejin
Date: Thu Nov 15 16:48:58 2018
New Revision: 347005

URL: http://llvm.org/viewvc/llvm-project?rev=347005&view=rev
Log:
[WebAssembly] Change type of wake count to unsigned int

Summary:
We discussed this at the Nov 12th CG meeting, and decided to use the
unsigned semantics for the wake count.
Corresponding spec change:
https://github.com/WebAssembly/threads/pull/110

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, sunfish, jfb, cfe-commits

Differential Revision: https://reviews.llvm.org/D54572

Modified:
    cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def
    cfe/trunk/test/CodeGen/builtins-wasm.c

Modified: cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def?rev=347005&r1=347004&r2=347005&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsWebAssembly.def Thu Nov 15 16:48:58 2018
@@ -37,7 +37,7 @@ BUILTIN(__builtin_wasm_rethrow, "v", "r"
 // Atomic wait and notify.
 BUILTIN(__builtin_wasm_atomic_wait_i32, "ii*iLLi", "n")
 BUILTIN(__builtin_wasm_atomic_wait_i64, "iLLi*LLiLLi", "n")
-BUILTIN(__builtin_wasm_atomic_notify, "Uii*i", "n")
+BUILTIN(__builtin_wasm_atomic_notify, "Uii*Ui", "n")
 
 // Saturating fp-to-int conversions
 BUILTIN(__builtin_wasm_trunc_saturate_s_i32_f32, "if", "nc")

Modified: cfe/trunk/test/CodeGen/builtins-wasm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-wasm.c?rev=347005&r1=347004&r2=347005&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-wasm.c (original)
+++ cfe/trunk/test/CodeGen/builtins-wasm.c Thu Nov 15 16:48:58 2018
@@ -77,7 +77,7 @@ int atomic_wait_i64(long long *addr, lon
   // WEBASSEMBLY64: call i32 @llvm.wasm.atomic.wait.i64(i64* %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
 }
 
-unsigned int atomic_notify(int *addr, int count) {
+unsigned int atomic_notify(int *addr, unsigned int count) {
   return __builtin_wasm_atomic_notify(addr, count);
   // WEBASSEMBLY32: call i32 @llvm.wasm.atomic.notify(i32* %{{.*}}, i32 %{{.*}})
   // WEBASSEMBLY64: call i32 @llvm.wasm.atomic.notify(i32* %{{.*}}, i32 %{{.*}})




More information about the cfe-commits mailing list