On 05/30/2014 07:47 AM, Leon Alrae wrote:
> +        switch (opc) {
> +        case OPC_BLEZALC: /* OPC_BGEZALC, OPC_BGEUC */
> +            if (rs == 0 && rt != 0) {
> +                /* OPC_BLEZALC */
> +                tcg_gen_setcondi_tl(TCG_COND_LE, bcond, t1, 0);
> +            } else if (rs != 0 && rt != 0 && rs == rt) {
> +                /* OPC_BGEZALC */
> +                tcg_gen_setcondi_tl(TCG_COND_GE, bcond, t1, 0);
> +            } else {
> +                /* OPC_BGEUC */
> +                tcg_gen_setcond_tl(TCG_COND_GEU, bcond, t0, t1);
> +            }
> +            break;

I can't help but think that a better emulation would be to generate a branch
opcode here, rather than leaving this for later.  After all, the whole point of
compact branches is that there's no delay slot processing that needs to be done.


r~

Reply via email to