aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-04-08 13:55:23 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-04-08 13:56:04 +0200
commitce196529dcb62a1955ca1156090c444947e92fa6 (patch)
treebd26ede79b3ed51f5162f3d81033e3b2f44a79a7 /src/check_builtin.cpp
parent9d8bb7f4e4f0c541b363a1ee4caccf9e6aa211fa (diff)
enable the required target feature `atomics` when using them in wasm
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index f4aa9567d..d8fad487b 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -6014,6 +6014,8 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
return false;
}
+ enable_target_feature({}, str_lit("atomics"));
+
Operand ptr = {};
Operand expected = {};
Operand timeout = {};
@@ -6066,6 +6068,8 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
return false;
}
+ enable_target_feature({}, str_lit("atomics"));
+
Operand ptr = {};
Operand waiters = {};
check_expr(c, &ptr, ce->args[0]); if (ptr.mode == Addressing_Invalid) return false;