aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/ptrace.h
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2008-06-25 00:07:18 -0400
committerPaul Mackerras <paulus@samba.org>2008-06-30 21:28:50 -0400
commitce48b2100785e5ca629fb3aa8e3b50aca808f692 (patch)
tree63532ff7cc68b18ca4902bd10e03fcbaaf01cade /include/asm-powerpc/ptrace.h
parent72ffff5b1792b0fa4d40a8e2f3276fff999820ec (diff)
powerpc: Add VSX context save/restore, ptrace and signal support
This patch extends the floating point save and restore code to use the VSX load/stores when VSX is available. This will make FP context save/restore marginally slower on FP only code, when VSX is available, as it has to load/store 128bits rather than just 64bits. Mixing FP, VMX and VSX code will get constant architected state. The signals interface is extended to enable access to VSR 0-31 doubleword 1 after discussions with tool chain maintainers. Backward compatibility is maintained. The ptrace interface is also extended to allow access to VSR 0-31 full registers. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/ptrace.h')
-rw-r--r--include/asm-powerpc/ptrace.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h
index 38d87e5e569d..3d6e31024e56 100644
--- a/include/asm-powerpc/ptrace.h
+++ b/include/asm-powerpc/ptrace.h
@@ -224,6 +224,14 @@ extern void user_disable_single_step(struct task_struct *);
224#define PT_VRSAVE_32 (PT_VR0 + 33*4) 224#define PT_VRSAVE_32 (PT_VR0 + 33*4)
225#endif 225#endif
226 226
227/*
228 * Only store first 32 VSRs here. The second 32 VSRs in VR0-31
229 */
230#define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */
231#define PT_VSR31 (PT_VSR0 + 2*31)
232#ifdef __KERNEL__
233#define PT_VSR0_32 300 /* each VSR reg occupies 4 slots in 32-bit */
234#endif
227#endif /* __powerpc64__ */ 235#endif /* __powerpc64__ */
228 236
229/* 237/*
@@ -246,6 +254,10 @@ extern void user_disable_single_step(struct task_struct *);
246#define PTRACE_GETEVRREGS 20 254#define PTRACE_GETEVRREGS 20
247#define PTRACE_SETEVRREGS 21 255#define PTRACE_SETEVRREGS 21
248 256
257/* Get the first 32 128bit VSX registers */
258#define PTRACE_GETVSRREGS 27
259#define PTRACE_SETVSRREGS 28
260
249/* 261/*
250 * Get or set a debug register. The first 16 are DABR registers and the 262 * Get or set a debug register. The first 16 are DABR registers and the
251 * second 16 are IABR registers. 263 * second 16 are IABR registers.