Thread (18 messages) flat view 18 messages, 5 authors, 2017-07-14

Re: [PATCH 5/5] powerpc/lib/sstep: Add isel instruction emulation

From: Segher Boessenkool <hidden>
Date: 2017-07-13 07:47:38

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help