patch-base_runtime_mach-dep_signal-sysdep_h 1.0 KB

123456789101112131415161718192021222324252627
  1. $OpenBSD: patch-base_runtime_mach-dep_signal-sysdep_h,v 1.1 2013/12/08 22:24:01 jasper Exp $
  2. Add support for OpenBSD/powerpc.
  3. --- base/runtime/mach-dep/signal-sysdep.h.orig Sun Dec 8 15:10:20 2013
  4. +++ base/runtime/mach-dep/signal-sysdep.h Sun Dec 8 21:15:48 2013
  5. @@ -331,6 +331,19 @@ extern void SetFSR();
  6. # define SIG_ResetFPE(scp) { (scp)->regs->gpr[PT_FPSCR] = 0x0; }
  7. typedef void SigReturn_t;
  8. +# elif defined(OPSYS_OPENBSD)
  9. + /** PPC, OpenBSD **/
  10. +
  11. +# define SIG_FAULT1 SIGTRAP
  12. +# define INT_DIVZERO(s, c) ((s) == SIGTRAP)
  13. +# define INT_OVFLW(s, c) ((s) == SIGTRAP)
  14. +# define SIG_GetPC(scp) ((scp)->sc_frame.srr0)
  15. +# define SIG_SetPC(scp, addr) { (scp)->sc_frame.srr0 = (long)(addr); }
  16. +# define SIG_ZeroLimitPtr(scp) { ((scp)->sc_frame.fixreg[15] = 0); } /* limitptr = 15 (see src/runtime/mach-dep/PPC.prim.asm) */
  17. +# define SIG_GetCode(info,scp) (info)
  18. +
  19. + typedef void SigReturn_t;
  20. +
  21. # endif /* HOST_RS6000/HOST_PPC */
  22. #elif defined(HOST_HPPA)