From 8acca0a66a1067f7a02b28add647d64868e3782f Mon Sep 17 00:00:00 2001 From: zoltan Date: Mon, 1 Feb 2010 14:52:06 +0000 Subject: [PATCH] 2010-02-01 Zoltan Varga * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when using LLVM, its not needed, and abcrem can't handle it. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@150642 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- mono/mini/ChangeLog | 5 +++++ mono/mini/method-to-ir.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 8e59bdf7b..a1b2635dd 100755 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,8 @@ +2010-02-01 Zoltan Varga + + * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when + using LLVM, its not needed, and abcrem can't handle it. + Mon Feb 1 14:29:43 CET 2010 Paolo Molaro diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c index 317987020..b5f7c431a 100644 --- a/mono/mini/method-to-ir.c +++ b/mono/mini/method-to-ir.c @@ -3678,8 +3678,13 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono #if SIZEOF_REGISTER == 8 /* The array reg is 64 bits but the index reg is only 32 */ - index2_reg = alloc_preg (cfg); - MONO_EMIT_NEW_UNALU (cfg, OP_SEXT_I4, index2_reg, index_reg); + if (COMPILE_LLVM (cfg)) { + /* Not needed */ + index2_reg = index_reg; + } else { + index2_reg = alloc_preg (cfg); + MONO_EMIT_NEW_UNALU (cfg, OP_SEXT_I4, index2_reg, index_reg); + } #else if (index->type == STACK_I8) { index2_reg = alloc_preg (cfg); -- 2.11.4.GIT