ソースを参照

+ WebAssembly internal asm support for the ref.null instruction

Nikolay Nikolov 2 年 前
コミット
957ff5b972
1 ファイル変更13 行追加1 行削除
  1. 13 1
      compiler/wasm32/aasmcpu.pas

+ 13 - 1
compiler/wasm32/aasmcpu.pas

@@ -581,7 +581,9 @@ uses
           a_i64_trunc_sat_f64_s,
           a_i64_trunc_sat_f64_u,
           a_memory_size,
-          a_memory_grow:
+          a_memory_grow,
+          a_ref_null_funcref,
+          a_ref_null_externref:
             result:=2;
           a_memory_copy:
             result:=4;
@@ -1991,6 +1993,16 @@ uses
               WriteByte($FC);
               WriteByte($07);
             end;
+          a_ref_null_funcref:
+            begin
+              WriteByte($D0);
+              WriteByte($70);
+            end;
+          a_ref_null_externref:
+            begin
+              WriteByte($D0);
+              WriteByte($6F);
+            end;
           else
             internalerror(2021092624);
         end;