X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=picodrive.git;a=blobdiff_plain;f=cpu%2Fsh2%2Fcompiler.c;fp=cpu%2Fsh2%2Fcompiler.c;h=089f3ef1a7f1aa442614ecca192dcd95f7257047;hp=3b6b45af6b198e84f46389a0d8615cbe2c9497a2;hb=fda2f31020bf0d6cf7b5dd70ec01cf390b7e1483;hpb=48c9e01be8ad93a7902e22f9ad07aba4527e6572 diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index 3b6b45a..089f3ef 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -313,9 +313,9 @@ static const int reg_map_g2h[] = { xSI,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, - -1, -1, -1, xDI, - -1, -1, -1, -1, + -1, -1, -1, -1, // r12 .. sp + -1, -1, -1, xDI, // SHR_PC, SHR_PPC, SHR_PR, SHR_SR, + -1, -1, -1, -1, // SHR_GBR, SHR_VBR, SHR_MACH, SHR_MACL, }; // ax, cx, dx are usually temporaries by convention @@ -330,12 +330,21 @@ static temp_reg_t reg_temp[] = { #include "../drc/emit_x86.c" static const int reg_map_g2h[] = { +#ifndef _WIN32 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, // r12 .. sp + -1, -1, -1, xBX, // SHR_PC, SHR_PPC, SHR_PR, SHR_SR, + -1, -1, -1, -1, // SHR_GBR, SHR_VBR, SHR_MACH, SHR_MACL, +#else + xDI,-1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, xBX, -1, -1, -1, -1, + -1, -1, -1, -1, // r12 .. sp + -1, -1, -1, xBX, // SHR_PC, SHR_PPC, SHR_PR, SHR_SR, + -1, -1, -1, -1, // SHR_GBR, SHR_VBR, SHR_MACH, SHR_MACL, +#endif }; // ax, cx, dx are usually temporaries by convention @@ -344,7 +353,9 @@ static temp_reg_t reg_temp[] = { { xCX, }, { xDX, }, { xSI, }, +#ifndef _WIN32 { xDI, }, +#endif }; #else @@ -1400,7 +1411,7 @@ static void emit_block_entry(void) emith_call(sh2_drc_log_entry); rcache_invalidate(); #endif - emith_tst_r_r(RET_REG, RET_REG); + emith_tst_r_r_ptr(RET_REG, RET_REG); EMITH_SJMP_START(DCOND_EQ); emith_jump_reg_c(DCOND_NE, RET_REG); EMITH_SJMP_END(DCOND_EQ);