X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fcarthw%2Fsvp%2Fcompiler.c;h=3632b919eaa6e1453246ecbeea7b092a3205a0e4;hb=4685e5a10e388a9a07f1b11c3c14cce6e4e8ef5b;hp=c26e8e3c6348dbe00597cfa4fb6ebada005e9c39;hpb=553c3eaa3a4bda6ba99d925ecab518fe82530cd6;p=picodrive.git diff --git a/pico/carthw/svp/compiler.c b/pico/carthw/svp/compiler.c index c26e8e3..3632b91 100644 --- a/pico/carthw/svp/compiler.c +++ b/pico/carthw/svp/compiler.c @@ -356,7 +356,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; } @@ -1197,7 +1197,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;