From bac32354901139f28d668b3bdbcad3f6f9a87f01 Mon Sep 17 00:00:00 2001 From: Ben Maurer Date: Sat, 11 Sep 2004 13:58:18 +0000 Subject: [PATCH] 2004-09-11 Ben Maurer * inssel.brg: make ldelema check aot friendly. svn path=/branches/mono-1-0/mono/; revision=33746 --- mono/mini/ChangeLog | 4 ++++ mono/mini/inssel.brg | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index a9a7c7de6fa..a1da824b5dd 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,7 @@ +2004-09-11 Ben Maurer + + * inssel.brg: make ldelema check aot friendly. + Thu Sep 9 20:57:53 CEST 2004 Paolo Molaro diff --git a/mono/mini/inssel.brg b/mono/mini/inssel.brg index e0bc1f0254b..0cb8129cca0 100644 --- a/mono/mini/inssel.brg +++ b/mono/mini/inssel.brg @@ -1736,7 +1736,14 @@ reg: OP_CHECK_ARRAY_TYPE (reg) { vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass)); MONO_EMIT_NEW_LOAD_MEMBASE_OP (s, OP_LOAD_MEMBASE, elclass_reg, class_reg, G_STRUCT_OFFSET (MonoClass, element_class)); - MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, elclass_reg, tree->klass); + if (mono_compile_aot) { + int klass_reg = mono_regstate_next_int (s->rs); + MONO_EMIT_NEW_CLASSCONST (s, klass_reg, tree->klass); + MONO_EMIT_NEW_BIALU (s, OP_COMPARE, -1, elclass_reg, klass_reg); + } else { + MONO_EMIT_NEW_BIALU_IMM (s, OP_COMPARE_IMM, -1, elclass_reg, tree->klass); + } + MONO_EMIT_NEW_COND_EXC (s, NE_UN, "ArrayTypeMismatchException"); MONO_EMIT_UNALU (s, tree, OP_MOVE, state->reg1, state->left->reg1); } -- 2.11.4.GIT