]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc: Split out instruction analysis part of emulate_step()
authorPaul Mackerras <paulus@samba.org>
Tue, 2 Sep 2014 04:35:07 +0000 (14:35 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:51 +0000 (23:14 +1000)
commitbe96f63375a14ee8e690856ac77e579c75bd0bae
treeef054973ec062a761afcf10aa688e67ad047d7ff
parentad72a279a2b874828d1b5070ef01cf6ee6b1d62c
powerpc: Split out instruction analysis part of emulate_step()

This splits out the instruction analysis part of emulate_step() into
a separate analyse_instr() function, which decodes the instruction,
but doesn't execute any load or store instructions.  It does execute
integer instructions and branches which can be executed purely by
updating register values in the pt_regs struct.  For other instructions,
it returns the instruction type and other details in a new
instruction_op struct.  emulate_step() then uses that information
to execute loads, stores, cache operations, mfmsr, mtmsr[d], and
(on 64-bit) sc instructions.

The reason for doing this is so that the KVM code can use it instead
of having its own separate instruction emulation code.  Possibly the
alignment interrupt handler could also use this.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/sstep.h
arch/powerpc/lib/sstep.c