Merge pull request #487 from mayerwin/patch-1
[mono.git] / mono / mini / tramp-arm.c
index 5711ef1f180ddc800105fa07612a4de5a281876d..1aeeeffa6bd5cb8f8a1c6a0977adbdb5c23c1100 100644 (file)
@@ -740,8 +740,13 @@ mono_arch_get_call_target (guint8 *code)
 {
        guint32 ins = ((guint32*)(gpointer)code) [-1];
 
+#if MONOTOUCH
+       /* Should be a 'bl' or a 'b' */
+       if (((ins >> 25) & 0x7) == 0x5) {
+#else
        /* Should be a 'bl' */
        if ((((ins >> 25) & 0x7) == 0x5) && (((ins >> 24) & 0x1) == 0x1)) {
+#endif
                gint32 disp = ((gint32)ins) & 0xffffff;
                guint8 *target = code - 4 + 8 + (disp * 4);