diff options
author | Michael Neuling <mikey@neuling.org> | 2008-06-25 00:07:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 21:28:50 -0400 |
commit | ce48b2100785e5ca629fb3aa8e3b50aca808f692 (patch) | |
tree | 63532ff7cc68b18ca4902bd10e03fcbaaf01cade /include/asm-powerpc/elf.h | |
parent | 72ffff5b1792b0fa4d40a8e2f3276fff999820ec (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/elf.h')
-rw-r--r-- | include/asm-powerpc/elf.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index d1e3bda0625..746e53d60cb 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h | |||
@@ -109,6 +109,7 @@ typedef elf_gregset_t32 compat_elf_gregset_t; | |||
109 | #ifdef __powerpc64__ | 109 | #ifdef __powerpc64__ |
110 | # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ | 110 | # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ |
111 | # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ | 111 | # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ |
112 | # define ELF_NVSRHALFREG 32 /* Half the vsx registers */ | ||
112 | # define ELF_GREG_TYPE elf_greg_t64 | 113 | # define ELF_GREG_TYPE elf_greg_t64 |
113 | #else | 114 | #else |
114 | # define ELF_NEVRREG 34 /* includes acc (as 2) */ | 115 | # define ELF_NEVRREG 34 /* includes acc (as 2) */ |
@@ -158,6 +159,7 @@ typedef __vector128 elf_vrreg_t; | |||
158 | typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; | 159 | typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; |
159 | #ifdef __powerpc64__ | 160 | #ifdef __powerpc64__ |
160 | typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; | 161 | typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; |
162 | typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; | ||
161 | #endif | 163 | #endif |
162 | 164 | ||
163 | #ifdef __KERNEL__ | 165 | #ifdef __KERNEL__ |
@@ -219,8 +221,8 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | |||
219 | typedef elf_vrregset_t elf_fpxregset_t; | 221 | typedef elf_vrregset_t elf_fpxregset_t; |
220 | 222 | ||
221 | #ifdef CONFIG_ALTIVEC | 223 | #ifdef CONFIG_ALTIVEC |
222 | extern int dump_task_altivec(struct task_struct *, elf_vrregset_t *vrregs); | 224 | extern int dump_task_vector(struct task_struct *, elf_vrregset_t *vrregs); |
223 | #define ELF_CORE_COPY_XFPREGS(tsk, regs) dump_task_altivec(tsk, regs) | 225 | #define ELF_CORE_COPY_XFPREGS(tsk, regs) dump_task_vector(tsk, regs) |
224 | #define ELF_CORE_XFPREG_TYPE NT_PPC_VMX | 226 | #define ELF_CORE_XFPREG_TYPE NT_PPC_VMX |
225 | #endif | 227 | #endif |
226 | 228 | ||