+ if (direct)
+ {
+ EOP_C_B(cond,is_call,val & 0xffffff); // b, bl target
+ }
+ else
+ {
+#ifdef __EPOC32__
+// elprintf(EL_SVP, "emitting indirect jmp %08x->%08x", tcache_ptr, target);
+ if (is_call)
+ EOP_ADD_IMM(14,15,0,8); // add lr,pc,#8
+ EOP_C_AM2_IMM(cond,1,0,1,15,15,0); // ldrcc pc,[pc]
+ EOP_MOV_REG_SIMPLE(15,15); // mov pc, pc
+ EMIT((u32)target);
+#else
+ // should never happen
+ elprintf(EL_STATUS|EL_SVP|EL_ANOMALY, "indirect jmp %08x->%08x", target, tcache_ptr);
+ exit(1);
+#endif
+ }
+
+ return tcache_ptr - start_ptr;