Browse Source

+ added the WebAssembly table instructions

Nikolay Nikolov 3 years ago
parent
commit
2888710594
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

@@ -88,6 +88,8 @@ uses
       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
       // reference instructions
       a_ref_null, a_ref_is_null, a_ref_func,
       a_ref_null, a_ref_is_null, a_ref_func,
+      // table instructions
+      a_table_get, a_table_set, a_table_size, a_table_grow, a_table_fill, a_table_copy, a_table_init, a_elem_drop,
       // 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

@@ -87,6 +87,8 @@ interface
       'memory.copy 0,0', 'memory.fill 0', 'memory.init', 'data.drop',
       'memory.copy 0,0', 'memory.fill 0', 'memory.init', 'data.drop',
       // reference instructions
       // reference instructions
       'ref.null', 'ref.is_null', 'ref.func',
       'ref.null', 'ref.is_null', 'ref.func',
+      // table instructions
+      'table.get', 'table.set', 'table.size', 'table.grow', 'table.fill', 'table.copy', 'table.init', 'elem.drop',
       // 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

@@ -71,6 +71,8 @@
         'memory.copy', 'memory.fill', 'memory.init', 'data.drop',
         'memory.copy', 'memory.fill', 'memory.init', 'data.drop',
         // reference instructions
         // reference instructions
         'ref.null', 'ref.is_null', 'ref.func',
         'ref.null', 'ref.is_null', 'ref.func',
+        // table instructions
+        'table.get', 'table.set', 'table.size', 'table.grow', 'table.fill', 'table.copy', 'table.init', 'elem.drop',
         // 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