|
@@ -495,6 +495,12 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame)
|
|
|
} while (0)
|
|
} while (0)
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
+#if UINTPTR_MAX == UINT64_MAX
|
|
|
|
|
+#define PUSH_PTR(value) PUSH_I64(value)
|
|
|
|
|
+#else
|
|
|
|
|
+#define PUSH_PTR(value) PUSH_I32(value)
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
/* in exception handling, label_type needs to be stored to lookup exception
|
|
/* in exception handling, label_type needs to be stored to lookup exception
|
|
|
* handlers */
|
|
* handlers */
|
|
|
|
|
|
|
@@ -1892,19 +1898,19 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
|
|
switch (handler_opcode) {
|
|
switch (handler_opcode) {
|
|
|
case WASM_OP_CATCH:
|
|
case WASM_OP_CATCH:
|
|
|
skip_leb(lookup_cursor); /* skip tag_index */
|
|
skip_leb(lookup_cursor); /* skip tag_index */
|
|
|
- PUSH_I64(end_addr);
|
|
|
|
|
|
|
+ PUSH_PTR(end_addr);
|
|
|
break;
|
|
break;
|
|
|
case WASM_OP_CATCH_ALL:
|
|
case WASM_OP_CATCH_ALL:
|
|
|
- PUSH_I64(end_addr);
|
|
|
|
|
|
|
+ PUSH_PTR(end_addr);
|
|
|
break;
|
|
break;
|
|
|
case WASM_OP_DELEGATE:
|
|
case WASM_OP_DELEGATE:
|
|
|
skip_leb(lookup_cursor); /* skip depth */
|
|
skip_leb(lookup_cursor); /* skip depth */
|
|
|
- PUSH_I64(end_addr);
|
|
|
|
|
|
|
+ PUSH_PTR(end_addr);
|
|
|
/* patch target_addr */
|
|
/* patch target_addr */
|
|
|
(frame_csp - 1)->target_addr = lookup_cursor;
|
|
(frame_csp - 1)->target_addr = lookup_cursor;
|
|
|
break;
|
|
break;
|
|
|
case WASM_OP_END:
|
|
case WASM_OP_END:
|
|
|
- PUSH_I64(0);
|
|
|
|
|
|
|
+ PUSH_PTR(0);
|
|
|
/* patch target_addr */
|
|
/* patch target_addr */
|
|
|
(frame_csp - 1)->target_addr = end_addr;
|
|
(frame_csp - 1)->target_addr = end_addr;
|
|
|
break;
|
|
break;
|