[jit] Move a few DISABLE_JIT stubs to arch-stubs.c. (#10991)
[mono-project.git] / mono / mini / exceptions-wasm.c
blob1665d5edcb4022de3f17aa3d5ed79400f2d59e25
1 #include "mini.h"
3 static void
4 wasm_restore_context (void)
6 g_error ("wasm_restore_context");
9 static void
10 wasm_call_filter (void)
12 g_error ("wasm_call_filter");
15 static void
16 wasm_throw_exception (void)
18 g_error ("wasm_throw_exception");
21 static void
22 wasm_rethrow_exception (void)
24 g_error ("wasm_rethrow_exception");
27 static void
28 wasm_rethrow_preserve_exception (void)
30 g_error ("wasm_rethrow_preserve_exception");
33 static void
34 wasm_throw_corlib_exception (void)
36 g_error ("wasm_throw_corlib_exception");
39 gboolean
40 mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls,
41 MonoJitInfo *ji, MonoContext *ctx,
42 MonoContext *new_ctx, MonoLMF **lmf,
43 host_mgreg_t **save_locations,
44 StackFrameInfo *frame)
46 if (ji)
47 g_error ("Can't unwind compiled code");
49 if (*lmf) {
50 if ((*lmf)->top_entry)
51 return FALSE;
52 g_error ("Can't handle non-top-entry LMFs\n");
55 return FALSE;
58 #ifndef DISABLE_JIT
60 gpointer
61 mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
63 if (info)
64 *info = mono_tramp_info_create ("call_filter", (guint8*)wasm_call_filter, 1, NULL, NULL);
65 return (gpointer)wasm_call_filter;
68 gpointer
69 mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
71 if (info)
72 *info = mono_tramp_info_create ("restore_context", (guint8*)wasm_restore_context, 1, NULL, NULL);
73 return (gpointer)wasm_restore_context;
75 gpointer
76 mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
78 if (info)
79 *info = mono_tramp_info_create ("throw_corlib_exception", (guint8*)wasm_throw_corlib_exception, 1, NULL, NULL);
80 return (gpointer)wasm_throw_corlib_exception;
83 gpointer
84 mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
86 if (info)
87 *info = mono_tramp_info_create ("rethrow_exception", (guint8*)wasm_rethrow_exception, 1, NULL, NULL);
88 return (gpointer)wasm_rethrow_exception;
91 gpointer
92 mono_arch_get_rethrow_preserve_exception (MonoTrampInfo **info, gboolean aot)
94 if (info)
95 *info = mono_tramp_info_create ("rethrow_preserve_exception", (guint8*)wasm_rethrow_preserve_exception, 1, NULL, NULL);
96 return (gpointer)wasm_rethrow_exception;
99 gpointer
100 mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
102 if (info)
103 *info = mono_tramp_info_create ("throw_exception", (guint8*)wasm_throw_exception, 1, NULL, NULL);
104 return (gpointer)wasm_throw_exception;
107 #endif
109 void
110 mono_arch_undo_ip_adjustment (MonoContext *ctx)
114 gboolean
115 mono_arch_handle_exception (void *sigctx, gpointer obj)
117 g_error ("mono_arch_handle_exception");