powerpc: Separate out load/store emulation into its own function
This moves the parts of emulate_step() that deal with emulating load and store instructions into a new function called emulate_loadstore(). This is to make it possible to reuse this code in the alignment handler. Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
d955189ae4
commit
a53d5182e2
@@ -152,6 +152,15 @@ void emulate_update_regs(struct pt_regs *reg, struct instruction_op *op);
|
||||
*/
|
||||
extern int emulate_step(struct pt_regs *regs, unsigned int instr);
|
||||
|
||||
/*
|
||||
* Emulate a load or store instruction by reading/writing the
|
||||
* memory of the current process. FP/VMX/VSX registers are assumed
|
||||
* to hold live values if the appropriate enable bit in regs->msr is
|
||||
* set; otherwise this will use the saved values in the thread struct
|
||||
* for user-mode accesses.
|
||||
*/
|
||||
extern int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op);
|
||||
|
||||
extern void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg,
|
||||
const void *mem, bool cross_endian);
|
||||
extern void emulate_vsx_store(struct instruction_op *op,
|
||||
|
Reference in New Issue
Block a user