[RFC PATCH] powerpc: Emulate most load and store instructions in emulate_step()
Milton Miller
miltonm at bga.com
Sat May 22 02:35:48 EST 2010
[resending to hit the list]
> + if (regs->gpr[0] == 0x1ebe &&
> + cpu_has_feature(CPU_FTR_REAL_LE)) {
> + regs->msr ^= MSR_LE;
> + goto instr_done;
> + }
> regs->gpr[9] = regs->gpr[13];
> + regs->gpr[10] = MSR_KERNEL;
>
this hunk didn't seem to be mentioned in the change log
>+ static inline unsigned long xform_ea(unsigned int instr, struct pt_regs *regs)
..
> + if (ra) {
> + ea += regs->gpr[ra];
> + if (instr & 0x40) /* update forms */
> + regs->gpr[ra] = ea;
> + }
if the instruction faults, we shouldn't update ra
> + case 62: /* std[u] */
> + val = regs->gpr[rd];
> + switch (instr & 3) {
> + case 0: /* ld */
> + err = write_mem(val, dsform_ea(instr, regs), 8, regs);
> + goto ldst_done;
> + case 1: /* ldu */
> + err = write_mem(val, dsform_ea(instr, regs), 8, regs);
> + goto ldst_done;
> + }
> + break;
>
comments seem to be copied
milton
More information about the Linuxppc-dev
mailing list