On Thu, Jul 13, 2017 at 01:25:48PM +1000, Matt Brown wrote:
> +             case 585:       /* isel */

The secondary opcode for isel is only 5 bits, not 10 like most other
insns have.

> +                     mb = (instr >> 6) & 0x1f; /* bc */
> +                     val = (regs->ccr >> (mb + 32)) & 1;

regs->ccr >> (31 - mb)  ?

> +
> +                     if (val)
> +                             regs->gpr[rd] = regs->gpr[ra];

You need to treat ra=0 separately (as 0, not reg 0).

> +                     else
> +                             regs->gpr[rd] = regs->gpr[rb];
> +                     goto logical_done;


Segher

Reply via email to