Browse Source

+ support the atomic.fence instruction in the WebAssembly internal object writer

Nikolay Nikolov 3 years ago
parent
commit
812736bd41
1 changed files with 8 additions and 1 deletions
  1. 8 1
      compiler/wasm32/aasmcpu.pas

+ 8 - 1
compiler/wasm32/aasmcpu.pas

@@ -544,7 +544,8 @@ uses
             result:=2;
           a_memory_copy:
             result:=4;
-          a_memory_fill:
+          a_memory_fill,
+          a_atomic_fence:
             result:=3;
           a_i32_const:
             begin
@@ -890,6 +891,12 @@ uses
               WriteUleb(11);
               WriteByte($00);
             end;
+          a_atomic_fence:
+            begin
+              WriteByte($FE);
+              WriteByte($03);
+              WriteByte($00);
+            end;
           a_i32_eqz:
             WriteByte($45);
           a_i32_eq: