Browse Source

+ added instructions for the new WebAssembly exception handling with exnref

Nikolay Nikolov 2 days ago
parent
commit
8797966db3
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

@@ -101,6 +101,8 @@ uses
       a_i64_trunc_sat_f64_u,
       // exceptions (legacy)
       a_legacy_try,a_legacy_catch,a_legacy_catch_all,a_legacy_delegate,a_legacy_throw,a_legacy_rethrow,a_end_legacy_try,
+      // exceptions (with exnref)
+      a_try_table,a_catch,a_catch_ref,a_catch_all,a_catch_all_ref,a_throw,a_throw_ref,a_end_try_table,
       // atomic memory accesses - load/store
       a_i32_atomic_load8_u, a_i32_atomic_load16_u, a_i32_atomic_load,
       a_i64_atomic_load8_u, a_i64_atomic_load16_u, a_i64_atomic_load32_u,

+ 2 - 0
compiler/wasm32/itcpugas.pas

@@ -100,6 +100,8 @@ interface
       'i64.trunc_sat_f64_u',
       // exceptions (legacy)
       'try','catch','catch_all','delegate','throw','rethrow','end_try',
+      // exceptions (with exnref)
+      'try_table','catch','catch_ref','catch_all','catch_all_ref','throw','throw_ref','end' {try_table},
       // atomic memory accesses - load/store
       'i32.atomic.load8_u', 'i32.atomic.load16_u', 'i32.atomic.load',
       'i64.atomic.load8_u', 'i64.atomic.load16_u', 'i64.atomic.load32_u',

+ 2 - 0
compiler/wasm32/strinst.inc

@@ -85,6 +85,8 @@
         'i64.trunc_sat_f64_u',
         // exceptions (legacy)
         'try','catch','catch_all','delegate','throw','rethrow','end' {try},
+        // exceptions (with exnref)
+        'try_table','catch','catch_ref','catch_all','catch_all_ref','throw','throw_ref','end' {try_table},
         // atomic memory accesses - load/store
         'i32.atomic.load8_u', 'i32.atomic.load16_u', 'i32.atomic.load',
         'i64.atomic.load8_u', 'i64.atomic.load16_u', 'i64.atomic.load32_u',