[Mono-dev] mono 2.2 rc2 on ARM issues

Cliff Brake cliff.brake at gmail.com
Thu Dec 11 15:36:13 EST 2008


On Thu, Dec 11, 2008 at 2:55 PM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
> The mono_arch_flush_icache is wrong, it passes a pointer to the end
> of the code buffer and not to the beggining.
>
> It should be mono_arch_flush_icache (buf, code - buf);

Basic on a quick scan I agree.  I made the code changes as follows,
but still get the Illegal instruction.

Thanks,
Cliff

Index: mono-2.2/mono/mini/tramp-arm.c
===================================================================
--- mono-2.2.orig/mono/mini/tramp-arm.c 2008-12-11 15:16:40.000000000 -0500
+++ mono-2.2/mono/mini/tramp-arm.c      2008-12-11 15:17:46.000000000 -0500
@@ -362,7 +362,7 @@
       code += 8;

       /* Flush instruction cache, since we've generated code */
-       mono_arch_flush_icache (code, code - buf);
+       mono_arch_flush_icache (buf, code - buf);

       /* Sanity check */
       g_assert ((code - buf) <= GEN_TRAMP_SIZE);
@@ -390,7 +390,7 @@

       ARM_MOV_REG_REG (code, ARMREG_PC, ARMREG_LR);

-       mono_arch_flush_icache (code, code - buf);
+       mono_arch_flush_icache (buf, code - buf);

       *code_len = code - buf;

@@ -447,7 +447,7 @@
       }

       /* Flush instruction cache, since we've generated code */
-       mono_arch_flush_icache (code, code - buf);
+       mono_arch_flush_icache (buf, code - buf);

       g_assert ((code - buf) <= size);



-- 
=======================
Cliff Brake
http://bec-systems.com


More information about the Mono-devel-list mailing list