sigcontext.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _ASM_PPC64_SIGCONTEXT_H
  2. #define _ASM_PPC64_SIGCONTEXT_H
  3. /*
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version
  7. * 2 of the License, or (at your option) any later version.
  8. */
  9. #include <linux/compiler.h>
  10. #include <asm/ptrace.h>
  11. #include <asm/elf.h>
  12. struct sigcontext {
  13. unsigned long _unused[4];
  14. int signal;
  15. int _pad0;
  16. unsigned long handler;
  17. unsigned long oldmask;
  18. struct pt_regs __user *regs;
  19. elf_gregset_t gp_regs;
  20. elf_fpregset_t fp_regs;
  21. /*
  22. * To maintain compatibility with current implementations the sigcontext is
  23. * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t)
  24. * followed by an unstructured (vmx_reserve) field of 69 doublewords. This
  25. * allows the array of vector registers to be quadword aligned independent of
  26. * the alignment of the containing sigcontext or ucontext. It is the
  27. * responsibility of the code setting the sigcontext to set this pointer to
  28. * either NULL (if this processor does not support the VMX feature) or the
  29. * address of the first quadword within the allocated (vmx_reserve) area.
  30. *
  31. * The pointer (v_regs) of vector type (elf_vrreg_t) is type compatible with
  32. * an array of 34 quadword entries (elf_vrregset_t). The entries with
  33. * indexes 0-31 contain the corresponding vector registers. The entry with
  34. * index 32 contains the vscr as the last word (offset 12) within the
  35. * quadword. This allows the vscr to be stored as either a quadword (since
  36. * it must be copied via a vector register to/from storage) or as a word.
  37. * The entry with index 33 contains the vrsave as the first word (offset 0)
  38. * within the quadword.
  39. */
  40. elf_vrreg_t __user *v_regs;
  41. long vmx_reserve[ELF_NVRREG+ELF_NVRREG+1];
  42. };
  43. #endif /* _ASM_PPC64_SIGCONTEXT_H */