X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fcarthw%2Fsvp%2Fcompiler.c;h=e7d5b9e87690a648dea1081e02aa6cdbcadaf022;hb=1889fe877cc7cb3c954925c452597498f3c82184;hp=b47484f4a222d71b0128f77c86874aa6b667ef7d;hpb=65c75cb07df9d27905dd166b876d5b6461cb656d;p=picodrive.git diff --git a/pico/carthw/svp/compiler.c b/pico/carthw/svp/compiler.c index b47484f..e7d5b9e 100644 --- a/pico/carthw/svp/compiler.c +++ b/pico/carthw/svp/compiler.c @@ -1,7 +1,10 @@ -// SSP1601 to ARM recompiler - -// (c) Copyright 2008, Grazvydas "notaz" Ignotas -// Free for non-commercial use. +/* + * SSP1601 to ARM recompiler + * (C) notaz, 2008,2009,2010 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include "../../pico_int.h" #include "../../../cpu/drc/cmn.h" @@ -35,6 +38,7 @@ void ssp_drc_next_patch(void){} void ssp_drc_end(void){} #endif +#define COUNT_OP #include "../../../cpu/drc/emit_arm.c" // ----------------------------------------------------- @@ -355,7 +359,7 @@ static void tr_mov16(int r, int val) static void tr_mov16_cond(int cond, int r, int val) { - emith_op_imm(cond, A_OP_MOV, r, val); + emith_op_imm(cond, 0, A_OP_MOV, r, val); hostreg_r[r] = -1; } @@ -1196,7 +1200,10 @@ static int tr_detect_set_pm(unsigned int op, int *pc, int imm) int reg = is_write ? ((tmpv>>4)&0x7) : (tmpv&0x7); if (reg > 4) tr_unhandled(); if ((tmpv & 0x0f) != 0 && (tmpv & 0xf0) != 0) tr_unhandled(); - known_regs.pmac_read[is_write ? reg + 5 : reg] = pmcv; + if (is_write) + known_regs.pmac_write[reg] = pmcv; + else + known_regs.pmac_read[reg] = pmcv; known_regb |= is_write ? (1 << (reg+25)) : (1 << (reg+20)); dirty_regb |= is_write ? (1 << (reg+25)) : (1 << (reg+20)); known_regs.emu_status &= ~SSP_PMC_SET; @@ -1787,7 +1794,9 @@ void *ssp_translate_block(int pc) exit(0); #endif - handle_caches(); +#ifdef ARM + cache_flush_d_inval_i(tcache, tcache_ptr); +#endif return block_start; }