[RFC PATCH] powerpc: Emulate nop too
Paul Mackerras
paulus at samba.org
Fri May 28 12:05:56 EST 2010
On Thu, May 27, 2010 at 07:42:03PM +0530, Ananth N Mavinakayanahalli wrote:
> While we are at it, can we also add nop to the list of emulated
> instructions?
I have a patch in development that emulates most of the arithmetic,
logical and shift/rotate instructions, including ori.
While you're here (in a virtual sense at least :), could you explain
what's going on with the emulate_step() call in resume_execution() in
arch/powerpc/kernel/kprobes.c? It looks like, having decided that
emulate_step() can't handle the instruction, you single-step the
instruction out of line and then call emulate_step again on the same
instruction, in resume_execution(). Why on earth is it trying to
emulate the instruction when it has already been executed at this
point? Is there any reason why we can't just remove the emulate_step
call from resume_execution()?
Paul.
More information about the Linuxppc-dev
mailing list