Browse Source

+ added the WebAssembly reference instructions ref.null, ref.is_null and ref.func

Nikolay Nikolov 3 years ago
parent
commit
534383f686
3 changed files with 6 additions and 0 deletions
  1. 2 0
      compiler/wasm32/cpubase.pas
  2. 2 0
      compiler/wasm32/itcpugas.pas
  3. 2 0
      compiler/wasm32/strinst.inc

+ 2 - 0
compiler/wasm32/cpubase.pas

@@ -86,6 +86,8 @@ uses
       a_memory_grow, a_memory_size,
       a_memory_grow, a_memory_size,
       // bulk memory operations
       // bulk memory operations
       a_memory_copy, a_memory_fill, a_memory_init, a_data_drop,
       a_memory_copy, a_memory_fill, a_memory_init, a_data_drop,
+      // reference instructions
+      a_ref_null, a_ref_is_null, a_ref_func,
       // exceptions
       // exceptions
       a_try,a_catch,a_catch_all,a_delegate,a_throw,a_rethrow,a_end_try,
       a_try,a_catch,a_catch_all,a_delegate,a_throw,a_rethrow,a_end_try,
       // atomic memory accesses - load/store
       // atomic memory accesses - load/store

+ 2 - 0
compiler/wasm32/itcpugas.pas

@@ -85,6 +85,8 @@ interface
       'memory.grow 0', 'memory.size 0',
       'memory.grow 0', 'memory.size 0',
       // bulk memory operations
       // bulk memory operations
       'memory.copy 0,0', 'memory.fill 0', 'memory.init', 'data.drop',
       'memory.copy 0,0', 'memory.fill 0', 'memory.init', 'data.drop',
+      // reference instructions
+      'ref.null', 'ref.is_null', 'ref.func',
       // exceptions
       // exceptions
       'try','catch','catch_all','delegate','throw','rethrow','end_try',
       'try','catch','catch_all','delegate','throw','rethrow','end_try',
       // atomic memory accesses - load/store
       // atomic memory accesses - load/store

+ 2 - 0
compiler/wasm32/strinst.inc

@@ -69,6 +69,8 @@
         'grow_memory', 'current_memory',
         'grow_memory', 'current_memory',
         // bulk memory operations
         // bulk memory operations
         'memory.copy', 'memory.fill', 'memory.init', 'data.drop',
         'memory.copy', 'memory.fill', 'memory.init', 'data.drop',
+        // reference instructions
+        'ref.null', 'ref.is_null', 'ref.func',
         // exceptions
         // exceptions
         'try','catch','catch_all','delegate','throw','rethrow','end',
         'try','catch','catch_all','delegate','throw','rethrow','end',
         // atomic memory accesses - load/store
         // atomic memory accesses - load/store