+
+Fri Apr 9 15:28:01 CEST 2010 Paolo Molaro <lupus@ximian.com>
+
+ * driver.c, optflags-def.h, ir-emit.h: introduce an unsupported
+ unsafe optimization that will remove bound checks.
+
2010-04-08 Kornel Pal <kornelpal@gmail.com>
* method-to-ir.c (mini_emit_inst_for_method): Fix a typo that caused
MONO_OPT_SIMD | \
MONO_OPT_AOT)
-#define EXCLUDED_FROM_ALL (MONO_OPT_SHARED | MONO_OPT_PRECOMP)
+#define EXCLUDED_FROM_ALL (MONO_OPT_SHARED | MONO_OPT_PRECOMP | MONO_OPT_UNSAFE)
static guint32
parse_optimizations (const char* p)
* index_reg is the vreg holding the index
*/
#define MONO_EMIT_BOUNDS_CHECK(cfg, array_reg, array_type, array_length_field, index_reg) do { \
+ if (!(cfg->opt & MONO_OPT_UNSAFE)) { \
if (!(cfg->opt & MONO_OPT_ABCREM)) { \
MONO_EMIT_NULL_CHECK (cfg, array_reg); \
MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
(cfg)->flags |= MONO_CFG_HAS_ARRAY_ACCESS; \
(cfg)->cbb->has_array_access = TRUE; \
} \
+ } \
} while (0)
G_END_DECLS
OPTFLAG(SSE2 ,23, "sse2", "SSE2 instructions on x86")
OPTFLAG(GSHARED ,24, "gshared", "Share generics")
OPTFLAG(SIMD ,25, "simd", "Simd intrinsics")
+OPTFLAG(UNSAFE ,26, "unsafe", "Remove bound checks and perform other dangerous changes")