g_assert_not_reached ();
#endif
}
-
-static void
-arch_emit_label_address (MonoAotCompile *acfg, const char *target, gboolean external_call, gboolean thumb, MonoJumpInfo *ji, int *call_size)
-{
-#if defined(TARGET_ARM) && defined(TARGET_ANDROID)
- /* binutils ld does not support branch islands on arm32 */
- if (!thumb) {
- emit_unset_mode (acfg);
- fprintf (acfg->fp, "ldr pc,=%s\n", target);
- fprintf (acfg->fp, ".ltorg\n");
- *call_size = 8;
- } else
-#endif
- arch_emit_direct_call (acfg, target, external_call, thumb, ji, call_size);
-}
#endif
/*
int call_size;
if (!ignore_cfg (acfg->cfgs [i])) {
- arch_emit_label_address (acfg, acfg->cfgs [i]->asm_symbol, FALSE, acfg->thumb_mixed && acfg->cfgs [i]->compile_llvm, NULL, &call_size);
+ arch_emit_direct_call (acfg, acfg->cfgs [i]->asm_symbol, FALSE, acfg->thumb_mixed && acfg->cfgs [i]->compile_llvm, NULL, &call_size);
} else {
- arch_emit_label_address (acfg, symbol, FALSE, FALSE, NULL, &call_size);
+ arch_emit_direct_call (acfg, symbol, FALSE, FALSE, NULL, &call_size);
}
#endif
}
guint32 ins;
gint32 offset;
- ins_addr = (guint32 *)table + (index * 2);
- if ((guint32) *ins_addr == (guint32 ) 0xe51ff004) { // ldr pc, =<label>
- return *((char **) (ins_addr + 1));
- }
-
ins_addr = (guint32*)table + index;
ins = *ins_addr;
if ((ins >> ARMCOND_SHIFT) == ARMCOND_NV) {
offset = (((int)(((ins & 0xffffff) << 1) | ((ins >> 24) & 0x1))) << 7) >> 7;
return (char*)ins_addr + (offset * 2) + 8 + 1;
} else {
- g_assert ((ins >> ARMCOND_SHIFT) == ARMCOND_AL);
- /* bl */
offset = (((int)ins & 0xffffff) << 8) >> 8;
return (char*)ins_addr + (offset * 4) + 8;
}