1# $NetBSD: genassym.cf,v 1.5 2024/04/20 14:09:40 skrll Exp $ 2 3# 4# Copyright (c) 2014 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Nick Hudson 9# 10# Redistribution and use in source and binary forms, with or without 11# modification, are permitted provided that the following conditions 12# are met: 13# 1. Redistributions of source code must retain the above copyright 14# notice, this list of conditions and the following disclaimer. 15# 2. Redistributions in binary form must reproduce the above copyright 16# notice, this list of conditions and the following disclaimer in the 17# documentation and/or other materials provided with the distribution. 18# 19# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29# POSSIBILITY OF SUCH DAMAGE. 30# 31 32include <sys/types.h> 33include <signal.h> 34include <ucontext.h> 35include <machine/frame.h> 36 37define _REG_R1 _REG_R1 38define _REG_R2 _REG_R2 39define _REG_R3 _REG_R3 40define _REG_R4 _REG_R4 41define _REG_R5 _REG_R5 42define _REG_R6 _REG_R6 43define _REG_R7 _REG_R7 44define _REG_R8 _REG_R8 45define _REG_R9 _REG_R9 46define _REG_R10 _REG_R10 47define _REG_R11 _REG_R11 48define _REG_R12 _REG_R12 49define _REG_R13 _REG_R13 50define _REG_R14 _REG_R14 51define _REG_R15 _REG_R15 52define _REG_R16 _REG_R16 53define _REG_R17 _REG_R17 54define _REG_R18 _REG_R18 55define _REG_R19 _REG_R19 56define _REG_R20 _REG_R20 57define _REG_R21 _REG_R21 58define _REG_R22 _REG_R22 59define _REG_R23 _REG_R23 60define _REG_R24 _REG_R24 61define _REG_R25 _REG_R25 62define _REG_R26 _REG_R26 63define _REG_R27 _REG_R27 64define _REG_R28 _REG_R28 65define _REG_R29 _REG_R29 66define _REG_R30 _REG_R30 67define _REG_R31 _REG_R31 68define _REG_PCOQH _REG_PCOQH 69define _REG_PCOQT _REG_PCOQT 70define _REG_RET0 _REG_RET0 71 72define SIZEOF_SIGTRAMP HPPA_FRAME_ROUND(sizeof(siginfo_t) + sizeof(ucontext_t)) 73define SIZEOF_SIGINFO sizeof(siginfo_t) 74 75define _UC_GREGS offsetof(ucontext_t, uc_mcontext.__gregs[0]) 76define _UC_GREGS_R1 offsetof(ucontext_t, uc_mcontext.__gregs[1]) 77define _UC_GREGS_R2 offsetof(ucontext_t, uc_mcontext.__gregs[2]) 78define _UC_GREGS_R3 offsetof(ucontext_t, uc_mcontext.__gregs[3]) 79define _UC_GREGS_R4 offsetof(ucontext_t, uc_mcontext.__gregs[4]) 80define _UC_GREGS_R5 offsetof(ucontext_t, uc_mcontext.__gregs[5]) 81define _UC_GREGS_R6 offsetof(ucontext_t, uc_mcontext.__gregs[6]) 82define _UC_GREGS_R7 offsetof(ucontext_t, uc_mcontext.__gregs[7]) 83define _UC_GREGS_R8 offsetof(ucontext_t, uc_mcontext.__gregs[8]) 84define _UC_GREGS_R9 offsetof(ucontext_t, uc_mcontext.__gregs[9]) 85define _UC_GREGS_R10 offsetof(ucontext_t, uc_mcontext.__gregs[10]) 86define _UC_GREGS_R11 offsetof(ucontext_t, uc_mcontext.__gregs[11]) 87define _UC_GREGS_R12 offsetof(ucontext_t, uc_mcontext.__gregs[12]) 88define _UC_GREGS_R13 offsetof(ucontext_t, uc_mcontext.__gregs[13]) 89define _UC_GREGS_R14 offsetof(ucontext_t, uc_mcontext.__gregs[14]) 90define _UC_GREGS_R15 offsetof(ucontext_t, uc_mcontext.__gregs[15]) 91define _UC_GREGS_R16 offsetof(ucontext_t, uc_mcontext.__gregs[16]) 92define _UC_GREGS_R17 offsetof(ucontext_t, uc_mcontext.__gregs[17]) 93define _UC_GREGS_R18 offsetof(ucontext_t, uc_mcontext.__gregs[18]) 94define _UC_GREGS_R19 offsetof(ucontext_t, uc_mcontext.__gregs[19]) 95define _UC_GREGS_R20 offsetof(ucontext_t, uc_mcontext.__gregs[20]) 96define _UC_GREGS_R21 offsetof(ucontext_t, uc_mcontext.__gregs[21]) 97define _UC_GREGS_R22 offsetof(ucontext_t, uc_mcontext.__gregs[22]) 98define _UC_GREGS_R23 offsetof(ucontext_t, uc_mcontext.__gregs[23]) 99define _UC_GREGS_R24 offsetof(ucontext_t, uc_mcontext.__gregs[24]) 100define _UC_GREGS_R25 offsetof(ucontext_t, uc_mcontext.__gregs[25]) 101define _UC_GREGS_R26 offsetof(ucontext_t, uc_mcontext.__gregs[26]) 102define _UC_GREGS_R27 offsetof(ucontext_t, uc_mcontext.__gregs[27]) 103define _UC_GREGS_R28 offsetof(ucontext_t, uc_mcontext.__gregs[28]) 104define _UC_GREGS_R29 offsetof(ucontext_t, uc_mcontext.__gregs[29]) 105define _UC_GREGS_R30 offsetof(ucontext_t, uc_mcontext.__gregs[30]) 106define _UC_GREGS_R31 offsetof(ucontext_t, uc_mcontext.__gregs[31]) 107 108define SIZEOF_SIGCONTEXT sizeof(struct sigcontext) 109define _SC_ONSTACK offsetof(struct sigcontext, sc_onstack) 110define _SC_MASK13 offsetof(struct sigcontext, __sc_mask13) 111define _SC_REGS_SP offsetof(struct sigcontext, sc_sp) 112define _SC_REGS_FP offsetof(struct sigcontext, sc_fp) 113define _SC_REGS_AP offsetof(struct sigcontext, sc_ap) 114define _SC_REGS_PCSQH offsetof(struct sigcontext, sc_pcsqh) 115define _SC_REGS_PCOQH offsetof(struct sigcontext, sc_pcoqh) 116define _SC_REGS_PCSQT offsetof(struct sigcontext, sc_pcsqt) 117define _SC_REGS_PCOQT offsetof(struct sigcontext, sc_pcoqt) 118define _SC_REGS_PS offsetof(struct sigcontext, sc_ps) 119define _SC_MASK offsetof(struct sigcontext, sc_mask) 120