1*95bbc8c7Sskrll# $NetBSD: genassym.cf,v 1.4 2024/05/30 15:56:43 skrll Exp $ 26cf6fe02Smatt 36cf6fe02Smatt# 46cf6fe02Smatt# Copyright (c) 2001 The NetBSD Foundation, Inc. 56cf6fe02Smatt# All rights reserved. 66cf6fe02Smatt# 76cf6fe02Smatt# This code is derived from software contributed to The NetBSD Foundation 86cf6fe02Smatt# by Matt Thomas <matt@3am-sfotware.com>. 96cf6fe02Smatt# 106cf6fe02Smatt# Redistribution and use in source and binary forms, with or without 116cf6fe02Smatt# modification, are permitted provided that the following conditions 126cf6fe02Smatt# are met: 136cf6fe02Smatt# 1. Redistributions of source code must retain the above copyright 146cf6fe02Smatt# notice, this list of conditions and the following disclaimer. 156cf6fe02Smatt# 2. Redistributions in binary form must reproduce the above copyright 166cf6fe02Smatt# notice, this list of conditions and the following disclaimer in the 176cf6fe02Smatt# documentation and/or other materials provided with the distribution. 186cf6fe02Smatt# 196cf6fe02Smatt# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 206cf6fe02Smatt# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 216cf6fe02Smatt# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 226cf6fe02Smatt# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 236cf6fe02Smatt# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 246cf6fe02Smatt# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 256cf6fe02Smatt# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 266cf6fe02Smatt# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 276cf6fe02Smatt# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 286cf6fe02Smatt# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 296cf6fe02Smatt# POSSIBILITY OF SUCH DAMAGE. 306cf6fe02Smatt# 316cf6fe02Smatt 326cf6fe02Smattinclude <sys/types.h> 336cf6fe02Smattinclude <sys/cpu.h> 3483b9ddadSskrllinclude <sys/queue.h> 356cf6fe02Smattinclude <sys/signal.h> 366cf6fe02Smattinclude <sys/ucontext.h> 376cf6fe02Smatt 386cf6fe02Smattinclude <machine/setjmp.h> 396cf6fe02Smatt 40*95bbc8c7Sskrlldefine UC_GREGS_RA offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RA]) 416cf6fe02Smattdefine UC_GREGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP]) 42*95bbc8c7Sskrlldefine UC_GREGS_GP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_GP]) 43*95bbc8c7Sskrlldefine UC_GREGS_TP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_TP]) 44*95bbc8c7Sskrlldefine UC_GREGS_T0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T0]) 45*95bbc8c7Sskrlldefine UC_GREGS_T1 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T1]) 46*95bbc8c7Sskrlldefine UC_GREGS_T2 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T2]) 47*95bbc8c7Sskrlldefine UC_GREGS_S0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S0]) 48*95bbc8c7Sskrlldefine UC_GREGS_S1 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S1]) 49*95bbc8c7Sskrlldefine UC_GREGS_A0 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A0]) 50*95bbc8c7Sskrlldefine UC_GREGS_A1 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A1]) 51*95bbc8c7Sskrlldefine UC_GREGS_A2 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A2]) 52*95bbc8c7Sskrlldefine UC_GREGS_A3 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A3]) 53*95bbc8c7Sskrlldefine UC_GREGS_A4 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A4]) 54*95bbc8c7Sskrlldefine UC_GREGS_A5 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A5]) 55*95bbc8c7Sskrlldefine UC_GREGS_A6 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A6]) 56*95bbc8c7Sskrlldefine UC_GREGS_A7 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_A7]) 57*95bbc8c7Sskrlldefine UC_GREGS_S2 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S2]) 58*95bbc8c7Sskrlldefine UC_GREGS_S3 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S3]) 59*95bbc8c7Sskrlldefine UC_GREGS_S4 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S4]) 60*95bbc8c7Sskrlldefine UC_GREGS_S5 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S5]) 61*95bbc8c7Sskrlldefine UC_GREGS_S6 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S6]) 62*95bbc8c7Sskrlldefine UC_GREGS_S7 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S7]) 63*95bbc8c7Sskrlldefine UC_GREGS_S8 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S8]) 64*95bbc8c7Sskrlldefine UC_GREGS_S9 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S9]) 65*95bbc8c7Sskrlldefine UC_GREGS_S10 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S10]) 66*95bbc8c7Sskrlldefine UC_GREGS_S11 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_S11]) 67*95bbc8c7Sskrlldefine UC_GREGS_T3 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T3]) 68*95bbc8c7Sskrlldefine UC_GREGS_T4 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T4]) 69*95bbc8c7Sskrlldefine UC_GREGS_T5 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T5]) 70*95bbc8c7Sskrlldefine UC_GREGS_T6 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_T6]) 716cf6fe02Smattdefine UC_GREGS_RV offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RV]) 726cf6fe02Smattdefine UC_GREGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC]) 73*95bbc8c7Sskrlldefine UC_GREGS offsetof(ucontext_t, uc_mcontext.__gregs[0]) 746cf6fe02Smatt 756cf6fe02Smattdefine SIG_BLOCK SIG_BLOCK 766cf6fe02Smattdefine SIG_SETMASK SIG_SETMASK 776cf6fe02Smattdefine SIGINFO_SIZE (sizeof(siginfo_t) + __ALIGNBYTES) & ~__ALIGNBYTES 786cf6fe02Smatt 796cf6fe02Smattdefine JBLEN _JBLEN * sizeof(_BSD_JBSLOT_T_) 806cf6fe02Smattdefine JB_MAGIC _JB_MAGIC * sizeof(_BSD_JBSLOT_T_) 816cf6fe02Smattdefine JB_RA _JB_RA * sizeof(_BSD_JBSLOT_T_) 826cf6fe02Smattdefine JB_S0 _JB_S0 * sizeof(_BSD_JBSLOT_T_) 836cf6fe02Smattdefine JB_S1 _JB_S1 * sizeof(_BSD_JBSLOT_T_) 846cf6fe02Smattdefine JB_S2 _JB_S2 * sizeof(_BSD_JBSLOT_T_) 856cf6fe02Smattdefine JB_S3 _JB_S3 * sizeof(_BSD_JBSLOT_T_) 866cf6fe02Smattdefine JB_S4 _JB_S4 * sizeof(_BSD_JBSLOT_T_) 876cf6fe02Smattdefine JB_S5 _JB_S5 * sizeof(_BSD_JBSLOT_T_) 886cf6fe02Smattdefine JB_S6 _JB_S6 * sizeof(_BSD_JBSLOT_T_) 896cf6fe02Smattdefine JB_S7 _JB_S7 * sizeof(_BSD_JBSLOT_T_) 906cf6fe02Smattdefine JB_S8 _JB_S8 * sizeof(_BSD_JBSLOT_T_) 916cf6fe02Smattdefine JB_S9 _JB_S9 * sizeof(_BSD_JBSLOT_T_) 926cf6fe02Smattdefine JB_S10 _JB_S10 * sizeof(_BSD_JBSLOT_T_) 936cf6fe02Smattdefine JB_S11 _JB_S11 * sizeof(_BSD_JBSLOT_T_) 946cf6fe02Smattdefine JB_SP _JB_SP * sizeof(_BSD_JBSLOT_T_) 956cf6fe02Smattdefine JB_TP _JB_TP * sizeof(_BSD_JBSLOT_T_) 966cf6fe02Smattdefine JB_GP _JB_GP * sizeof(_BSD_JBSLOT_T_) 976cf6fe02Smattdefine JB_FCSR _JB_FCSR * sizeof(_BSD_JBSLOT_T_) 986cf6fe02Smatt 994ec25a89Smattdefine JB_FS0 _JB_FS0 * sizeof(_BSD_JBSLOT_T_) 1004ec25a89Smattdefine JB_FS1 _JB_FS1 * sizeof(_BSD_JBSLOT_T_) 1014ec25a89Smattdefine JB_FS2 _JB_FS2 * sizeof(_BSD_JBSLOT_T_) 1024ec25a89Smattdefine JB_FS3 _JB_FS3 * sizeof(_BSD_JBSLOT_T_) 1034ec25a89Smattdefine JB_FS4 _JB_FS4 * sizeof(_BSD_JBSLOT_T_) 1044ec25a89Smattdefine JB_FS5 _JB_FS5 * sizeof(_BSD_JBSLOT_T_) 1054ec25a89Smattdefine JB_FS6 _JB_FS6 * sizeof(_BSD_JBSLOT_T_) 1064ec25a89Smattdefine JB_FS7 _JB_FS7 * sizeof(_BSD_JBSLOT_T_) 1074ec25a89Smattdefine JB_FS8 _JB_FS8 * sizeof(_BSD_JBSLOT_T_) 1084ec25a89Smattdefine JB_FS9 _JB_FS9 * sizeof(_BSD_JBSLOT_T_) 1094ec25a89Smattdefine JB_FS10 _JB_FS10 * sizeof(_BSD_JBSLOT_T_) 1104ec25a89Smattdefine JB_FS11 _JB_FS11 * sizeof(_BSD_JBSLOT_T_) 1116cf6fe02Smatt 1126cf6fe02Smattdefine JB_SIGMASK _JB_SIGMASK * sizeof(_BSD_JBSLOT_T_) 113