Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit a4ebfbf

Browse files
committed
stop emitting Atomics.fence which is no longer in the SAB spec
1 parent 332e3b0 commit a4ebfbf

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/Target/JSBackend/CallHandlers.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,9 @@ DEF_BUILTIN_HANDLER(emscripten_int32x4_not, SIMD_Int32x4_not);
888888
DEF_BUILTIN_HANDLER(emscripten_int32x4_and, SIMD_Int32x4_and);
889889
DEF_BUILTIN_HANDLER(emscripten_int32x4_or, SIMD_Int32x4_or);
890890
DEF_BUILTIN_HANDLER(emscripten_int32x4_xor, SIMD_Int32x4_xor);
891-
DEF_BUILTIN_HANDLER(emscripten_atomic_fence, Atomics_fence);
891+
DEF_CALL_HANDLER(emscripten_atomic_fence, {
892+
return "/* fence */";
893+
})
892894

893895
DEF_CALL_HANDLER(emscripten_float32x4_select, {
894896
// FIXME: We really need a more general way of handling boolean types,

lib/Target/JSBackend/JSBackend.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -2662,11 +2662,7 @@ void JSWriter::generateExpression(const User *I, raw_string_ostream& Code) {
26622662
break;
26632663
}
26642664
case Instruction::Fence:
2665-
if (EnablePthreads) {
2666-
Code << "Atomics_fence()";
2667-
} else {
2668-
Code << "/* fence */"; // no threads, so nothing to do here
2669-
}
2665+
Code << "/* fence */"; // not in the spec currently, so nothing to do here
26702666
break;
26712667
}
26722668

0 commit comments

Comments
 (0)