static NOINLINE void host_instructions_updated(void *base, void *end, int force)
{
int step = 32, lgstep = 5;
- char *_base = base, *_end = end;
- int count = (_end - _base + step-1) >> lgstep;
+ char *_base = (char *)((uptr)base & ~(step-1));
+ int count = (((char *)end - _base) >> lgstep) + 1;
if (count <= 0) count = 1; // make sure count is positive
+ base = _base;
asm volatile(
" mtctr %1;"
#elif defined(__riscv__) || defined(__riscv)
#define DRC_SR_REG "s11"
#define DRC_REG_LL 0 // no ABI for (__ILP32__ && __riscv_xlen != 32)
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__ppc__)
#define DRC_SR_REG "r28"
#define DRC_REG_LL 0 // no ABI for __ILP32__
#elif defined(__i386__)
\r
void pemu_validate_config(void)\r
{\r
-#if !defined(__arm__) && !defined(__aarch64__) && !defined(__mips__) && !defined(__riscv__) && !defined(__riscv) && !defined(__powerpc__) && !defined(__i386__) && !defined(__x86_64__)\r
+#if !defined(__arm__) && !defined(__aarch64__) && !defined(__mips__) && !defined(__riscv__) && !defined(__riscv) && !defined(__powerpc__) && !defined(__ppc__) && !defined(__i386__) && !defined(__x86_64__)\r
PicoIn.opt &= ~POPT_EN_DRC;\r
#endif\r
}\r