genassym.cf revision 1.16
11.16Srmind# $NetBSD: genassym.cf,v 1.16 2009/12/10 05:10:03 rmind Exp $ 21.1Smatt 31.1Smatt# 41.1Smatt# Copyright (C) 1995, 1996 Wolfgang Solfrank. 51.1Smatt# Copyright (C) 1995, 1996 TooLs GmbH. 61.1Smatt# All rights reserved. 71.1Smatt# 81.1Smatt# Redistribution and use in source and binary forms, with or without 91.1Smatt# modification, are permitted provided that the following conditions 101.1Smatt# are met: 111.1Smatt# 1. Redistributions of source code must retain the above copyright 121.1Smatt# notice, this list of conditions and the following disclaimer. 131.1Smatt# 2. Redistributions in binary form must reproduce the above copyright 141.1Smatt# notice, this list of conditions and the following disclaimer in the 151.1Smatt# documentation and/or other materials provided with the distribution. 161.1Smatt# 3. All advertising materials mentioning features or use of this software 171.1Smatt# must display the following acknowledgement: 181.1Smatt# This product includes software developed by TooLs GmbH. 191.1Smatt# 4. The name of TooLs GmbH may not be used to endorse or promote products 201.1Smatt# derived from this software without specific prior written permission. 211.1Smatt# 221.1Smatt# THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 231.1Smatt# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 241.1Smatt# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 251.1Smatt# IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 261.1Smatt# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 271.1Smatt# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 281.1Smatt# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 291.1Smatt# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 301.1Smatt# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 311.1Smatt# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 321.1Smatt# 331.1Smatt 341.15Smattquote #define __MUTEX_PRIVATE 351.15Smattquote #define __RWLOCK_PRIVATE 361.15Smatt 371.1Smattinclude <sys/param.h> 381.1Smattinclude <sys/time.h> 391.1Smattinclude <sys/proc.h> 401.1Smatt 411.1Smattinclude <uvm/uvm_extern.h> 421.1Smatt 431.1Smattinclude <machine/pcb.h> 441.1Smattinclude <machine/pmap.h> 451.1Smatt 461.1Smattdefine FRAMELEN FRAMELEN 471.1Smattdefine FRAME_0 offsetof(struct trapframe, fixreg[0]) 481.1Smattdefine FRAME_1 offsetof(struct trapframe, fixreg[1]) 491.1Smattdefine FRAME_2 offsetof(struct trapframe, fixreg[2]) 501.1Smattdefine FRAME_3 offsetof(struct trapframe, fixreg[3]) 511.3Smattdefine FRAME_4 offsetof(struct trapframe, fixreg[4]) 521.3Smattdefine FRAME_5 offsetof(struct trapframe, fixreg[5]) 531.3Smattdefine FRAME_6 offsetof(struct trapframe, fixreg[6]) 541.3Smattdefine FRAME_7 offsetof(struct trapframe, fixreg[7]) 551.3Smattdefine FRAME_8 offsetof(struct trapframe, fixreg[8]) 561.3Smattdefine FRAME_9 offsetof(struct trapframe, fixreg[9]) 571.3Smattdefine FRAME_10 offsetof(struct trapframe, fixreg[10]) 581.3Smattdefine FRAME_11 offsetof(struct trapframe, fixreg[11]) 591.3Smattdefine FRAME_12 offsetof(struct trapframe, fixreg[12]) 601.3Smattdefine FRAME_13 offsetof(struct trapframe, fixreg[13]) 611.3Smattdefine FRAME_14 offsetof(struct trapframe, fixreg[14]) 621.3Smattdefine FRAME_15 offsetof(struct trapframe, fixreg[15]) 631.3Smattdefine FRAME_16 offsetof(struct trapframe, fixreg[16]) 641.3Smattdefine FRAME_17 offsetof(struct trapframe, fixreg[17]) 651.3Smattdefine FRAME_18 offsetof(struct trapframe, fixreg[18]) 661.3Smattdefine FRAME_19 offsetof(struct trapframe, fixreg[19]) 671.3Smattdefine FRAME_20 offsetof(struct trapframe, fixreg[20]) 681.3Smattdefine FRAME_21 offsetof(struct trapframe, fixreg[21]) 691.3Smattdefine FRAME_22 offsetof(struct trapframe, fixreg[22]) 701.3Smattdefine FRAME_23 offsetof(struct trapframe, fixreg[23]) 711.3Smattdefine FRAME_24 offsetof(struct trapframe, fixreg[24]) 721.3Smattdefine FRAME_25 offsetof(struct trapframe, fixreg[25]) 731.3Smattdefine FRAME_26 offsetof(struct trapframe, fixreg[26]) 741.3Smattdefine FRAME_27 offsetof(struct trapframe, fixreg[27]) 751.3Smattdefine FRAME_28 offsetof(struct trapframe, fixreg[28]) 761.3Smattdefine FRAME_29 offsetof(struct trapframe, fixreg[29]) 771.3Smattdefine FRAME_30 offsetof(struct trapframe, fixreg[30]) 781.3Smattdefine FRAME_31 offsetof(struct trapframe, fixreg[31]) 791.1Smattdefine FRAME_LR offsetof(struct trapframe, lr) 801.1Smattdefine FRAME_CR offsetof(struct trapframe, cr) 811.1Smattdefine FRAME_CTR offsetof(struct trapframe, ctr) 821.1Smattdefine FRAME_XER offsetof(struct trapframe, xer) 831.1Smattdefine FRAME_SRR0 offsetof(struct trapframe, srr0) 841.1Smattdefine FRAME_SRR1 offsetof(struct trapframe, srr1) 851.1Smattdefine FRAME_DEAR offsetof(struct trapframe, dar) 861.1Smattdefine FRAME_EXC offsetof(struct trapframe, exc) 871.1Smattdefine FRAME_ESR offsetof(struct trapframe, tf_xtra[TF_ESR]) 881.1Smattdefine FRAME_PID offsetof(struct trapframe, tf_xtra[TF_PID]) 891.1Smatt 901.1Smattdefine IFRAMELEN IFRAMELEN 911.1Smattdefine IFRAME_R1 offsetof(struct intrframe, r1) 921.1Smattdefine IFRAME_SRR1 offsetof(struct intrframe, srr1) 931.1Smattdefine IFRAME_SRR0 offsetof(struct intrframe, srr0) 941.1Smattdefine IFRAME_PRI offsetof(struct intrframe, pri) 951.1Smattdefine IFRAME_INTR_DEPTH offsetof(struct intrframe, intrdepth) 961.1Smattdefine IFRAME_PID offsetof(struct intrframe, pid) 971.1Smattdefine IFRAME_CTR offsetof(struct intrframe, ctr) 981.1Smattdefine IFRAME_XER offsetof(struct intrframe, xer) 991.1Smattdefine IFRAME_CR offsetof(struct intrframe, cr) 1001.1Smattdefine IFRAME_LR offsetof(struct intrframe, lr) 1011.1Smattdefine IFRAME_R12 offsetof(struct intrframe, r12) 1021.1Smattdefine IFRAME_R11 offsetof(struct intrframe, r11) 1031.1Smattdefine IFRAME_R10 offsetof(struct intrframe, r10) 1041.1Smattdefine IFRAME_R9 offsetof(struct intrframe, r9) 1051.1Smattdefine IFRAME_R8 offsetof(struct intrframe, r8) 1061.1Smattdefine IFRAME_R7 offsetof(struct intrframe, r7) 1071.1Smattdefine IFRAME_R6 offsetof(struct intrframe, r6) 1081.1Smattdefine IFRAME_R5 offsetof(struct intrframe, r5) 1091.1Smattdefine IFRAME_R4 offsetof(struct intrframe, r4) 1101.1Smattdefine IFRAME_R3 offsetof(struct intrframe, r3) 1111.1Smattdefine IFRAME_R0 offsetof(struct intrframe, r0) 1121.1Smatt 1131.1Smattdefine CALLFRAMELEN CALLFRAMELEN 1141.1Smattdefine CFRAME_SP offsetof(struct callframe, sp) 1151.1Smattdefine CFRAME_LR offsetof(struct callframe, lr) 1161.1Smattdefine CFRAME_R30 offsetof(struct callframe, r30) 1171.1Smattdefine CFRAME_R31 offsetof(struct callframe, r31) 1181.1Smatt 1191.8Smattdefine SFRAMELEN SFRAMELEN 1201.1Smattdefine SFRAME_SP offsetof(struct switchframe, sp) 1211.7Smattdefine SFRAME_LR offsetof(struct switchframe, lr) 1221.4Smattdefine SFRAME_USER_SR offsetof(struct switchframe, user_sr) 1231.1Smattdefine SFRAME_CR offsetof(struct switchframe, cr) 1241.1Smattdefine SFRAME_R2 offsetof(struct switchframe, fixreg2) 1251.3Smattdefine SFRAME_R13 offsetof(struct switchframe, fixreg[0]) 1261.3Smattdefine SFRAME_R14 offsetof(struct switchframe, fixreg[1]) 1271.3Smattdefine SFRAME_R15 offsetof(struct switchframe, fixreg[2]) 1281.3Smattdefine SFRAME_R16 offsetof(struct switchframe, fixreg[3]) 1291.3Smattdefine SFRAME_R17 offsetof(struct switchframe, fixreg[4]) 1301.3Smattdefine SFRAME_R18 offsetof(struct switchframe, fixreg[5]) 1311.3Smattdefine SFRAME_R19 offsetof(struct switchframe, fixreg[6]) 1321.3Smattdefine SFRAME_R20 offsetof(struct switchframe, fixreg[7]) 1331.3Smattdefine SFRAME_R21 offsetof(struct switchframe, fixreg[8]) 1341.3Smattdefine SFRAME_R22 offsetof(struct switchframe, fixreg[9]) 1351.3Smattdefine SFRAME_R23 offsetof(struct switchframe, fixreg[10]) 1361.3Smattdefine SFRAME_R24 offsetof(struct switchframe, fixreg[11]) 1371.3Smattdefine SFRAME_R25 offsetof(struct switchframe, fixreg[12]) 1381.3Smattdefine SFRAME_R26 offsetof(struct switchframe, fixreg[13]) 1391.3Smattdefine SFRAME_R27 offsetof(struct switchframe, fixreg[14]) 1401.3Smattdefine SFRAME_R28 offsetof(struct switchframe, fixreg[15]) 1411.3Smattdefine SFRAME_R29 offsetof(struct switchframe, fixreg[16]) 1421.3Smattdefine SFRAME_R30 offsetof(struct switchframe, fixreg[17]) 1431.3Smattdefine SFRAME_R31 offsetof(struct switchframe, fixreg[18]) 1441.1Smatt 1451.6Smattdefine PCB_PM offsetof(struct pcb, pcb_pm) 1461.1Smattdefine PCB_SP offsetof(struct pcb, pcb_sp) 1471.1Smattdefine PCB_FAULT offsetof(struct pcb, pcb_onfault) 1481.1Smatt 1491.1Smattdefine PM_CTX offsetof(struct pmap, pm_ctx) 1501.1Smatt 1511.16Srminddefine L_PCB offsetof(struct lwp, l_addr) 1521.1Smattdefine L_STAT offsetof(struct lwp, l_stat) 1531.1Smattdefine L_CPU offsetof(struct lwp, l_cpu) 1541.1Smattdefine L_PRIORITY offsetof(struct lwp, l_priority) 1551.1Smattdefine L_PROC offsetof(struct lwp, l_proc) 1561.1Smatt 1571.1Smattdefine P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall) 1581.1Smatt 1591.12Syamtdefine LSRUN LSRUN 1601.1Smattdefine LSONPROC LSONPROC 1611.1Smatt 1621.1Smattdefine CI_SIZE sizeof(struct cpu_info) 1631.1Smattdefine CI_CURLWP offsetof(struct cpu_info, ci_curlwp) 1641.1Smattdefine CI_CURPCB offsetof(struct cpu_info, ci_curpcb) 1651.9Ssimonbdefine CI_CURPM offsetof(struct cpu_info, ci_curpm) 1661.1Smattdefine CI_ASTPENDING offsetof(struct cpu_info, ci_astpending) 1671.13Srjsdefine CI_WANT_RESCHED offsetof(struct cpu_info, ci_want_resched) 1681.1Smattdefine CI_CPL offsetof(struct cpu_info, ci_cpl) 1691.1Smattdefine CI_INTRDEPTH offsetof(struct cpu_info, ci_intrdepth) 1701.1Smattdefine CI_INTSTK offsetof(struct cpu_info, ci_intstk) 1711.1Smattdefine CI_TEMPSAVE offsetof(struct cpu_info, ci_tempsave) 1721.1Smattdefine CI_DDBSAVE offsetof(struct cpu_info, ci_ddbsave) 1731.1Smattdefine CI_IPKDBSAVE offsetof(struct cpu_info, ci_ipkdbsave) 1741.1Smattdefine CI_DISISAVE offsetof(struct cpu_info, ci_disisave) 1751.10Smattdefine CI_IDLESPIN offsetof(struct cpu_info, ci_idlespin) 1761.1Smatt 1771.3Smattdefine CPUSAVE_R28 CPUSAVE_R28*sizeof(register_t) 1781.3Smattdefine CPUSAVE_R29 CPUSAVE_R29*sizeof(register_t) 1791.3Smattdefine CPUSAVE_R30 CPUSAVE_R30*sizeof(register_t) 1801.3Smattdefine CPUSAVE_R31 CPUSAVE_R31*sizeof(register_t) 1811.3Smattdefine CPUSAVE_DAR CPUSAVE_DAR*sizeof(register_t) 1821.3Smattdefine CPUSAVE_DSISR CPUSAVE_DSISR*sizeof(register_t) 1831.3Smattdefine CPUSAVE_SRR0 CPUSAVE_SRR0*sizeof(register_t) 1841.3Smattdefine CPUSAVE_SRR1 CPUSAVE_SRR1*sizeof(register_t) 1851.3Smatt 1861.1Smattdefine FB_PC offsetof(struct faultbuf, fb_pc) 1871.1Smattdefine FB_SP offsetof(struct faultbuf, fb_sp) 1881.1Smattdefine FB_R2 offsetof(struct faultbuf, fb_r2) 1891.1Smattdefine FB_CR offsetof(struct faultbuf, fb_cr) 1901.3Smattdefine FB_R13 offsetof(struct faultbuf, fb_fixreg[0]) 1911.3Smattdefine FB_R14 offsetof(struct faultbuf, fb_fixreg[1]) 1921.3Smattdefine FB_R15 offsetof(struct faultbuf, fb_fixreg[2]) 1931.3Smattdefine FB_R16 offsetof(struct faultbuf, fb_fixreg[3]) 1941.3Smattdefine FB_R17 offsetof(struct faultbuf, fb_fixreg[4]) 1951.3Smattdefine FB_R18 offsetof(struct faultbuf, fb_fixreg[5]) 1961.3Smattdefine FB_R19 offsetof(struct faultbuf, fb_fixreg[6]) 1971.3Smattdefine FB_R20 offsetof(struct faultbuf, fb_fixreg[7]) 1981.3Smattdefine FB_R21 offsetof(struct faultbuf, fb_fixreg[8]) 1991.3Smattdefine FB_R22 offsetof(struct faultbuf, fb_fixreg[9]) 2001.3Smattdefine FB_R23 offsetof(struct faultbuf, fb_fixreg[10]) 2011.3Smattdefine FB_R24 offsetof(struct faultbuf, fb_fixreg[11]) 2021.3Smattdefine FB_R25 offsetof(struct faultbuf, fb_fixreg[12]) 2031.3Smattdefine FB_R26 offsetof(struct faultbuf, fb_fixreg[13]) 2041.3Smattdefine FB_R27 offsetof(struct faultbuf, fb_fixreg[14]) 2051.3Smattdefine FB_R28 offsetof(struct faultbuf, fb_fixreg[15]) 2061.3Smattdefine FB_R29 offsetof(struct faultbuf, fb_fixreg[16]) 2071.3Smattdefine FB_R30 offsetof(struct faultbuf, fb_fixreg[17]) 2081.3Smattdefine FB_R31 offsetof(struct faultbuf, fb_fixreg[18]) 2091.1Smatt 2101.1Smattdefine CACHELINESIZE CACHELINESIZE 2111.1Smatt 2121.1Smattdefine CPU_CI offsetof(struct cpu_info, ci_ci) 2131.15Smatt 2141.15Smattifdef __HAVE_MUTEX_STUBS 2151.15Smattdefine __HAVE_MUTEX_STUBS __HAVE_MUTEX_STUBS 2161.15Smattendif 2171.15Smattifdef __HAVE_MUTEX_SPIN_STUBS 2181.15Smattdefine __HAVE_MUTEX_SPIN_STUBS __HAVE_MUTEX_SPIN_STUBS 2191.15Smattendif 2201.15Smattdefine MTX_OWNER offsetof(struct kmutex, mtx_owner) 2211.15Smattdefine MTX_LOCK offsetof(struct kmutex, mtx_lock) 2221.15Smattdefine MTX_IPL offsetof(struct kmutex, mtx_ipl) 2231.15Smatt 2241.15Smattifdef __HAVE_RW_STUBS 2251.15Smattdefine __HAVE_RW_STUBS __HAVE_RW_STUBS 2261.15Smattendif 2271.15Smattdefine RW_OWNER offsetof(struct krwlock, rw_owner) 2281.15Smattdefine RW_WRITE_LOCKED RW_WRITE_LOCKED 2291.15Smattdefine RW_READ_INCR RW_READ_INCR 2301.15Smattdefine RW_READER RW_READER 231