1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 1996 Paul Mackerras.
5 * NOTE: assert(sizeof(buf) > 23 * sizeof(long))
7 #include <asm/processor.h>
8 #include <asm/ppc_asm.h>
9 #include <asm/asm-offsets.h>
10 #include <asm/ptrace.h>
11 #include <asm/asm-compat.h>
14 * Grab the register values as they are now.
15 * This won't do a particularly good job because we really
16 * want our caller's caller's registers, and our caller has
17 * already executed its prologue.
18 * ToDo: We could reach back into the caller's save area to do
19 * a better job of representing the caller's state (note that
20 * that will be different for 32-bit and 64-bit, because of the
21 * different ABIs, though).
23 _GLOBAL(ppc_save_regs)
24 /* This allows stack frame accessor macros and offsets to be used */
25 subi r3,r3,STACK_INT_FRAME_REGS
31 lbz r0,PACAIRQSOFTMASK(r13)
34 /* store current SP */
52 PPC_STL r0,ORIG_GPR3(r3)