- if (is_x)
- rc = jitTransitionToExecutable(&g_jit);
- else
- rc = jitTransitionToWritable(&g_jit);
- if (R_FAILED(rc))
- SysPrintf("jitTransition %d %08x\n", is_x, rc);
- #elif defined(NDRC_WRITE_OFFSET)
+ // check to avoid the full flush in jitTransitionToExecutable()
+ if (g_jit.type != JitType_CodeMemory) {
+ if (is_x)
+ rc = jitTransitionToExecutable(&g_jit);
+ else
+ rc = jitTransitionToWritable(&g_jit);
+ if (R_FAILED(rc))
+ ;//SysPrintf("jitTransition %d %08x\n", is_x, rc);
+ }
+ #elif defined(TC_WRITE_OFFSET)