Explorar o código

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

Nikolay Nikolov %!s(int64=3) %!d(string=hai) anos
pai
achega
812736bd41
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      compiler/wasm32/aasmcpu.pas

+ 8 - 1
compiler/wasm32/aasmcpu.pas

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