diff options
Diffstat (limited to 'wasm2c/wasm-rt.h')
-rw-r--r-- | wasm2c/wasm-rt.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/wasm2c/wasm-rt.h b/wasm2c/wasm-rt.h index f06748eb..5c07ff44 100644 --- a/wasm2c/wasm-rt.h +++ b/wasm2c/wasm-rt.h @@ -88,6 +88,14 @@ extern "C" { #endif /** + * If enabled, perform additional sanity checks in the generated wasm2c code and + * wasm2c runtime. This is useful to enable on debug builds. + */ +#ifndef WASM_RT_SANITY_CHECKS +#define WASM_RT_SANITY_CHECKS 0 +#endif + +/** * Backward compatibility: Convert the previously exposed * WASM_RT_MEMCHECK_SIGNAL_HANDLER macro to the ALLOCATION and CHECK macros that * are now used. @@ -197,6 +205,18 @@ extern "C" { #endif /** + * This macro, if defined to 1 (i.e., allows the "segue" optimization), allows + * Wasm2c to use segment registers to speedup access to the linear heap. Note + * that even if allowed in this way, the segment registers would only be used if + * Wasm2c output is compiled for a suitable architecture and OS and the produces + * C file is compiled by supported compilers. The extact restrictions are listed + * in detail in src/template/wasm2c.declarations.c + */ +#ifndef WASM_RT_ALLOW_SEGUE +#define WASM_RT_ALLOW_SEGUE 0 +#endif + +/** * This macro, if defined, allows the embedder to disable all stack exhaustion * checks. This a non conformant configuration, i.e., this does not respect * Wasm's specification, and may compromise security. Use with caution. |