summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/alpha/genassym.cf180
-rw-r--r--sys/arch/amiga/amiga/genassym.cf141
-rw-r--r--sys/arch/hp300/hp300/genassym.cf190
-rw-r--r--sys/arch/hppa/hppa/genassym.cf192
-rw-r--r--sys/arch/i386/i386/genassym.cf130
-rw-r--r--sys/arch/m68k/m68k/genassym.cf37
-rw-r--r--sys/arch/mac68k/mac68k/genassym.cf71
-rw-r--r--sys/arch/macppc/macppc/genassym.cf55
-rw-r--r--sys/arch/mvme68k/mvme68k/genassym.cf120
-rw-r--r--sys/arch/mvme88k/mvme88k/genassym.cf71
-rw-r--r--sys/arch/mvmeppc/mvmeppc/genassym.cf55
-rw-r--r--sys/arch/sparc/sparc/genassym.cf177
-rw-r--r--sys/arch/sparc64/sparc64/genassym.cf228
-rw-r--r--sys/arch/sun3/sun3/genassym.cf79
-rw-r--r--sys/arch/vax/vax/genassym.cf133
15 files changed, 955 insertions, 904 deletions
diff --git a/sys/arch/alpha/alpha/genassym.cf b/sys/arch/alpha/alpha/genassym.cf
index e8cdfb11489..677c75793d9 100644
--- a/sys/arch/alpha/alpha/genassym.cf
+++ b/sys/arch/alpha/alpha/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.1 2001/05/11 09:45:22 art Exp $
+# $OpenBSD: genassym.cf,v 1.2 2001/09/16 14:28:01 miod Exp $
# Copyright (c) 1994, 1995 Gordon W. Ross
# Copyright (c) 1993 Adam Glass
@@ -55,122 +55,126 @@ endif
include <vm/vm.h>
# general constants
-define NBPG NBPG
-define PGSHIFT PGSHIFT
-define VM_MAX_ADDRESS VM_MAX_ADDRESS
+export NBPG
+export PGSHIFT
+export VM_MAX_ADDRESS
# Register offsets, for stack frames.
-define FRAME_V0 FRAME_V0
-define FRAME_T0 FRAME_T0
-define FRAME_T1 FRAME_T1
-define FRAME_T2 FRAME_T2
-define FRAME_T3 FRAME_T3
-define FRAME_T4 FRAME_T4
-define FRAME_T5 FRAME_T5
-define FRAME_T6 FRAME_T6
-define FRAME_T7 FRAME_T7
-define FRAME_S0 FRAME_S0
-define FRAME_S1 FRAME_S1
-define FRAME_S2 FRAME_S2
-define FRAME_S3 FRAME_S3
-define FRAME_S4 FRAME_S4
-define FRAME_S5 FRAME_S5
-define FRAME_S6 FRAME_S6
-define FRAME_A3 FRAME_A3
-define FRAME_A4 FRAME_A4
-define FRAME_A5 FRAME_A5
-define FRAME_T8 FRAME_T8
-define FRAME_T9 FRAME_T9
-define FRAME_T10 FRAME_T10
-define FRAME_T11 FRAME_T11
-define FRAME_RA FRAME_RA
-define FRAME_T12 FRAME_T12
-define FRAME_AT FRAME_AT
-define FRAME_SP FRAME_SP
-
-define FRAME_SW_SIZE FRAME_SW_SIZE
-
-define FRAME_PS FRAME_PS
-define FRAME_PC FRAME_PC
-define FRAME_GP FRAME_GP
-define FRAME_A0 FRAME_A0
-define FRAME_A1 FRAME_A1
-define FRAME_A2 FRAME_A2
-
-define FRAME_SIZE FRAME_SIZE
+export FRAME_V0
+export FRAME_T0
+export FRAME_T1
+export FRAME_T2
+export FRAME_T3
+export FRAME_T4
+export FRAME_T5
+export FRAME_T6
+export FRAME_T7
+export FRAME_S0
+export FRAME_S1
+export FRAME_S2
+export FRAME_S3
+export FRAME_S4
+export FRAME_S5
+export FRAME_S6
+export FRAME_A3
+export FRAME_A4
+export FRAME_A5
+export FRAME_T8
+export FRAME_T9
+export FRAME_T10
+export FRAME_T11
+export FRAME_RA
+export FRAME_T12
+export FRAME_AT
+export FRAME_SP
+
+export FRAME_SW_SIZE
+
+export FRAME_PS
+export FRAME_PC
+export FRAME_GP
+export FRAME_A0
+export FRAME_A1
+export FRAME_A2
+
+export FRAME_SIZE
# bits of the PS register
-define ALPHA_PSL_USERMODE ALPHA_PSL_USERMODE
-define ALPHA_PSL_IPL_MASK ALPHA_PSL_IPL_MASK
-define ALPHA_PSL_IPL_0 ALPHA_PSL_IPL_0
-define ALPHA_PSL_IPL_SOFT ALPHA_PSL_IPL_SOFT
-define ALPHA_PSL_IPL_HIGH ALPHA_PSL_IPL_HIGH
+export ALPHA_PSL_USERMODE
+export ALPHA_PSL_IPL_MASK
+export ALPHA_PSL_IPL_0
+export ALPHA_PSL_IPL_SOFT
+export ALPHA_PSL_IPL_HIGH
# pte bits
-define ALPHA_PTE_VALID ALPHA_PTE_VALID
-define ALPHA_PTE_ASM ALPHA_PTE_ASM
-define ALPHA_PTE_KR ALPHA_PTE_KR
-define ALPHA_PTE_KW ALPHA_PTE_KW
+export ALPHA_PTE_VALID
+export ALPHA_PTE_ASM
+export ALPHA_PTE_KR
+export ALPHA_PTE_KW
# Important offsets into the proc struct & associated constants
-define P_FORW offsetof(struct proc, p_forw)
-define P_BACK offsetof(struct proc, p_back)
-define P_ADDR offsetof(struct proc, p_addr)
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define P_STAT offsetof(struct proc, p_stat)
-define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
-define P_MD_PCBPADDR offsetof(struct proc, p_md.md_pcbpaddr)
-define PH_LINK offsetof(struct prochd, ph_link)
-define PH_RLINK offsetof(struct prochd, ph_rlink)
+struct proc
+member p_forw
+member p_back
+member p_addr
+member p_vmspace
+member p_stat
+member P_MD_FLAGS p_md.md_flags
+member P_MD_PCBPADDR p_md.md_pcbpaddr
+struct prochd
+member ph_link
+member ph_rlink
# offsets needed by cpu_switch() to switch mappings.
define VM_MAP_PMAP offsetof(struct vmspace, vm_map.pmap)
# Important offsets into the user struct & associated constants
-define UPAGES UPAGES
-define U_PCB offsetof(struct user, u_pcb)
-define U_PCB_HWPCB offsetof(struct user, u_pcb.pcb_hw)
-define U_PCB_HWPCB_KSP offsetof(struct user, u_pcb.pcb_hw.apcb_ksp)
-define U_PCB_CONTEXT offsetof(struct user, u_pcb.pcb_context[0])
-define U_PCB_ONFAULT offsetof(struct user, u_pcb.pcb_onfault)
-define U_PCB_ACCESSADDR offsetof(struct user, u_pcb.pcb_accessaddr)
+export UPAGES
+struct user
+member u_pcb
+member U_PCB_HWPCB u_pcb.pcb_hw
+member U_PCB_HWPCB_KSP u_pcb.pcb_hw.apcb_ksp
+member U_PCB_CONTEXT u_pcb.pcb_context[0]
+member U_PCB_ONFAULT u_pcb.pcb_onfault
+member U_PCB_ACCESSADDR u_pcb.pcb_accessaddr
# Offsets into struct fpstate, for save, restore
-define FPREG_FPR_REGS offsetof(struct fpreg, fpr_regs[0])
-define FPREG_FPR_CR offsetof(struct fpreg, fpr_cr)
+struct fpreg FPREG_
+member FPR_REGS fpr_regs[0]
+member fpr_cr
# Important other addresses
-define HWRPB_ADDR HWRPB_ADDR
-define VPTBASE VPTBASE
+export HWRPB_ADDR
+export VPTBASE
# Offsets into the HWRPB.
define RPB_PRIMARY_CPU_ID offsetof(struct rpb, rpb_primary_cpu_id)
# Kernel entries
-define ALPHA_KENTRY_ARITH ALPHA_KENTRY_ARITH
-define ALPHA_KENTRY_MM ALPHA_KENTRY_MM
-define ALPHA_KENTRY_IF ALPHA_KENTRY_IF
-define ALPHA_KENTRY_UNA ALPHA_KENTRY_UNA
+export ALPHA_KENTRY_ARITH
+export ALPHA_KENTRY_MM
+export ALPHA_KENTRY_IF
+export ALPHA_KENTRY_UNA
# errno values
-define ENAMETOOLONG ENAMETOOLONG
-define EFAULT EFAULT
+export ENAMETOOLONG
+export EFAULT
# Syscalls called from sigreturn.
-define SYS_sigreturn SYS_sigreturn
-define SYS_exit SYS_exit
+export SYS_sigreturn
+export SYS_exit
ifdef COMPAT_NETBSD
# XXX - these should probably use the magic macro from machine/asm.h
-define NETBSD_SYS___sigreturn14 NETBSD_SYS___sigreturn14
-define NETBSD_SYS_exit NETBSD_SYS_exit
+export NETBSD_SYS___sigreturn14
+export NETBSD_SYS_exit
endif
# CPU info
-define CPU_INFO_CURPROC offsetof(struct cpu_info, ci_curproc)
-define CPU_INFO_FPCURPROC offsetof(struct cpu_info, ci_fpcurproc)
-define CPU_INFO_CURPCB offsetof(struct cpu_info, ci_curpcb)
-define CPU_INFO_IDLE_PCB_PADDR offsetof(struct cpu_info, ci_idle_pcb_paddr)
-define CPU_INFO_WANT_RESCHED offsetof(struct cpu_info, ci_want_resched)
-define CPU_INFO_ASTPENDING offsetof(struct cpu_info, ci_astpending)
-define CPU_INFO_SIZEOF sizeof(struct cpu_info)
+struct cpu_info CPU_INFO_
+member CURPROC ci_curproc
+member FPCURPROC ci_fpcurproc
+member CURPCB ci_curpcb
+member IDLE_PCB_PADDR ci_idle_pcb_paddr
+member WANT_RESCHED ci_want_resched
+member ASTPENDING ci_astpending
diff --git a/sys/arch/amiga/amiga/genassym.cf b/sys/arch/amiga/amiga/genassym.cf
index 7e6f0b293ef..24226293301 100644
--- a/sys/arch/amiga/amiga/genassym.cf
+++ b/sys/arch/amiga/amiga/genassym.cf
@@ -1,5 +1,5 @@
# $NetBSD: genassym.cf,v 1.3 1997/07/16 00:01:49 is Exp $
-# $OpenBSD: genassym.cf,v 1.8 2001/08/31 00:37:15 miod Exp $
+# $OpenBSD: genassym.cf,v 1.9 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1982, 1990, 1993
# The Regents of the University of California. All rights reserved.
@@ -57,64 +57,66 @@ include <amiga/amiga/cia.h>
include <amiga/amiga/isr.h>
# values for mmutype
-define MMU_68851 MMU_68851
-define MMU_68030 MMU_68030
-define MMU_68040 MMU_68040
-define MMU_68060 MMU_68060
+export MMU_68851
+export MMU_68030
+export MMU_68040
+export MMU_68060
# values for cputype
-define CPU_68020 CPU_68020
-define CPU_68030 CPU_68030
-define CPU_68040 CPU_68040
-define CPU_68060 CPU_68060
+export CPU_68020
+export CPU_68030
+export CPU_68040
+export CPU_68060
# values for ectype
-define EC_NONE EC_NONE
+export EC_NONE
# values for fputype
-define FPU_NONE FPU_NONE
-define FPU_68881 FPU_68881
-define FPU_68882 FPU_68882
-define FPU_68040 FPU_68040
-define FPU_68060 FPU_68060
-define FPU_UNKNOWN FPU_UNKNOWN
+export FPU_NONE
+export FPU_68881
+export FPU_68882
+export FPU_68040
+export FPU_68060
+export FPU_UNKNOWN
ifdef FPU_EMULATE
-define FPU_EMULATE FPU_EMULATE
+export FPU_EMULATE
endif
# values for machineid
-define AMIGA_68020 AMIGA_68020
-define AMIGA_68030 AMIGA_68030
-define AMIGA_68040 AMIGA_68040
-define AMIGA_68060 AMIGA_68060
+export AMIGA_68020
+export AMIGA_68030
+export AMIGA_68040
+export AMIGA_68060
ifdef DRACO
-define DRACO DRACO
+export DRACO
endif
ifdef BB060STUPIDROM
-define BB060STUPIDROM BB060STUPIDROM
+export BB060STUPIDROM
endif
# proc structure fields and values
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define P_ADDR offsetof(struct proc, p_addr)
-define P_MD_REGS offsetof(struct proc, p_md.md_regs)
+struct proc
+member p_vmspace
+member p_addr
+member P_MD_REGS p_md.md_regs
# interrupt/fault metering
-define UVMEXP_INTRS offsetof(struct uvmexp, intrs)
+struct uvmexp UVMEXP_
+member intrs
# general constants
-define UPAGES UPAGES
-define USPACE USPACE
-define PGSHIFT PGSHIFT
-define USRSTACK USRSTACK
+export UPAGES
+export USPACE
+export PGSHIFT
+export USRSTACK
# PSL values
-define PSL_S PSL_S
-define PSL_IPL7 PSL_IPL7
-define PSL_IPL PSL_IPL
-define PSL_LOWIPL PSL_LOWIPL
-define PSL_USER PSL_USER
+export PSL_S
+export PSL_IPL7
+export PSL_IPL
+export PSL_LOWIPL
+export PSL_USER
define SPL1 PSL_S | PSL_IPL1
define SPL2 PSL_S | PSL_IPL2
define SPL3 PSL_S | PSL_IPL3
@@ -123,49 +125,52 @@ define SPL5 PSL_S | PSL_IPL5
define SPL6 PSL_S | PSL_IPL6
# magic
-define FC_SUPERD FC_SUPERD
-define CACHE_ON CACHE_ON
-define CACHE_OFF CACHE_OFF
-define CACHE_CLR CACHE_CLR
-define IC_CLEAR IC_CLEAR
-define DC_CLEAR DC_CLEAR
-define CACHE40_ON CACHE40_ON
-define CACHE40_OFF CACHE40_OFF
-define CACHE60_ON CACHE60_ON
-define CACHE60_OFF CACHE60_OFF
-define IC60_CUBC IC60_CUBC
-define IC60_CABC IC60_CABC
+export FC_SUPERD
+export CACHE_ON
+export CACHE_OFF
+export CACHE_CLR
+export IC_CLEAR
+export DC_CLEAR
+export CACHE40_ON
+export CACHE40_OFF
+export CACHE60_ON
+export CACHE60_OFF
+export IC60_CUBC
+export IC60_CABC
# pte/ste bits
-define PG_V PG_V
-define PG_NV PG_NV
-define PG_RO PG_RO
-define PG_RW PG_RW
-define PG_CI PG_CI
-define PG_PROT PG_PROT
-define PG_FRAME PG_FRAME
+export PG_V
+export PG_NV
+export PG_RO
+export PG_RW
+export PG_CI
+export PG_PROT
+export PG_FRAME
# pcb fields
-define PCB_FLAGS offsetof(struct pcb, pcb_flags)
-define PCB_PS offsetof(struct pcb, pcb_ps)
-define PCB_USP offsetof(struct pcb, pcb_usp)
-define PCB_REGS offsetof(struct pcb, pcb_regs)
-define PCB_CMAP2 offsetof(struct pcb, pcb_cmap2)
-define PCB_FPCTX offsetof(struct pcb, pcb_fpregs)
+struct pcb
+member pcb_flags
+member pcb_ps
+member pcb_usp
+member pcb_regs
+member pcb_cmap2
+member PCB_FPCTX pcb_fpregs
define SIZEOF_PCB sizeof(struct pcb)
# isr fields
-define ISR_FORW offsetof(struct isr, isr_forw)
-define ISR_INTR offsetof(struct isr, isr_intr)
-define ISR_ARG offsetof(struct isr, isr_arg)
+struct isr
+member isr_forw
+member isr_intr
+member isr_arg
# system calls
-define SYS_exit SYS_exit
-define SYS_execve SYS_execve
+export SYS_exit
+export SYS_execve
# user fields
-define U_PROF offsetof(struct user, u_stats.p_prof)
-define U_PROFSCALE offsetof(struct user, u_stats.p_prof.pr_scale)
+struct user
+member U_PROF u_stats.p_prof
+member U_PROFSCALE u_stats.p_prof.pr_scale
# miscellaneous custom chip register offsets
define CIAICR offsetof(struct CIA, icr)
diff --git a/sys/arch/hp300/hp300/genassym.cf b/sys/arch/hp300/hp300/genassym.cf
index 720183c5b12..dbb977f3cc4 100644
--- a/sys/arch/hp300/hp300/genassym.cf
+++ b/sys/arch/hp300/hp300/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.11 2001/08/31 00:37:20 miod Exp $
+# $OpenBSD: genassym.cf,v 1.12 2001/09/16 14:28:04 miod Exp $
# $NetBSD: genassym.cf,v 1.11 1998/02/16 20:58:29 thorpej Exp $
#
@@ -58,10 +58,10 @@ include <machine/pte.h>
include <hp300/hp300/clockreg.h>
# values for mmutype
-define MMU_68040 MMU_68040
-define MMU_68030 MMU_68030
-define MMU_HP MMU_HP
-define MMU_68851 MMU_68851
+export MMU_68040
+export MMU_68030
+export MMU_HP
+export MMU_68851
# MMU configuration options
ifdef M68K_MMU_HP
@@ -72,9 +72,9 @@ define M68K_MMU_MOTOROLA 1
endif
# values for cputype
-define CPU_68020 CPU_68020
-define CPU_68030 CPU_68030
-define CPU_68040 CPU_68040
+export CPU_68020
+export CPU_68030
+export CPU_68040
# CPU configuration options
ifdef M68020
@@ -88,42 +88,42 @@ define M68040 1
endif
# values for fputype
-define FPU_68881 FPU_68881
-define FPU_68882 FPU_68882
-define FPU_68040 FPU_68040
+export FPU_68881
+export FPU_68882
+export FPU_68040
# values for machineid
-define HP_320 HP_320
-define HP_330 HP_330
-define HP_340 HP_340
-define HP_345 HP_345
-define HP_350 HP_350
-define HP_360 HP_360
-define HP_370 HP_370
-define HP_375 HP_375
-define HP_380 HP_380
-define HP_385 HP_385
-define HP_400 HP_400
-define HP_425 HP_425
-define HP_433 HP_433
+export HP_320
+export HP_330
+export HP_340
+export HP_345
+export HP_350
+export HP_360
+export HP_370
+export HP_375
+export HP_380
+export HP_385
+export HP_400
+export HP_425
+export HP_433
# values for mmuid
-define MMUID_345 MMUID_345
-define MMUID_375 MMUID_375
-define MMUID_385 MMUID_385
-define MMUID_425_T MMUID_425_T
-define MMUID_425_S MMUID_425_S
-define MMUID_433_T MMUID_433_T
-define MMUID_433_S MMUID_433_S
-define MMUID_425_E MMUID_425_E
-
-define MMUID_SHIFT MMUID_SHIFT
-define MMUID_MASK MMUID_MASK
+export MMUID_345
+export MMUID_375
+export MMUID_385
+export MMUID_425_T
+export MMUID_425_S
+export MMUID_433_T
+export MMUID_433_S
+export MMUID_425_E
+
+export MMUID_SHIFT
+export MMUID_MASK
# values for ectype
-define EC_PHYS EC_PHYS
-define EC_NONE EC_NONE
-define EC_VIRT EC_VIRT
+export EC_PHYS
+export EC_NONE
+export EC_VIRT
# Cache type configuration options
ifdef CACHE_HAVE_VAC
@@ -134,27 +134,30 @@ define CACHE_HAVE_PAC 1
endif
# general constants
-define UPAGES UPAGES
-define USPACE USPACE
-define PGSHIFT PGSHIFT
-define USRSTACK USRSTACK
-define MAXADDR MAXADDR
+export UPAGES
+export USPACE
+export PGSHIFT
+export USRSTACK
+export MAXADDR
# proc fields and values
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define P_ADDR offsetof(struct proc, p_addr)
-define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
-define P_MD_REGS offsetof(struct proc, p_md.md_regs)
-define SSLEEP SSLEEP
+struct proc
+member p_vmspace
+member p_addr
+member P_MD_FLAGS p_md.md_flags
+member P_MD_REGS p_md.md_regs
+
+export SSLEEP
# interrupt/fault metering
-define UVMEXP_INTRS offsetof(struct uvmexp, intrs)
+struct uvmexp UVMEXP_
+member intrs
# PSL values
-define PSL_S PSL_S
-define PSL_IPL7 PSL_IPL7
-define PSL_LOWIPL PSL_LOWIPL
-define PSL_USER PSL_USER
+export PSL_S
+export PSL_IPL7
+export PSL_LOWIPL
+export PSL_USER
define PSL_TS PSL_T | PSL_S
define SPL1 PSL_S | PSL_IPL1
define SPL2 PSL_S | PSL_IPL2
@@ -164,55 +167,56 @@ define SPL5 PSL_S | PSL_IPL5
define SPL6 PSL_S | PSL_IPL6
# magic
-define FC_PURGE FC_PURGE
-define INTIOBASE INTIOBASE
-define MMUBASE MMUBASE
-define MMUSTAT MMUSTAT
-define MMUCMD MMUCMD
-define MMUSSTP MMUSSTP
-define MMUUSTP MMUUSTP
-define MMUTBINVAL MMUTBINVAL
-define MMU_BERR MMU_BERR
-define MMU_ENAB MMU_ENAB
-define MMU_FAULT MMU_FAULT
-define MMU_CEN MMU_CEN
-define MMU_IEN MMU_IEN
-define MMU_FPE MMU_FPE
-define CACHE_ON CACHE_ON
-define CACHE_OFF CACHE_OFF
-define CACHE_CLR CACHE_CLR
-define IC_CLEAR IC_CLEAR
-define DC_CLEAR DC_CLEAR
+export FC_PURGE
+export INTIOBASE
+export MMUBASE
+export MMUSTAT
+export MMUCMD
+export MMUSSTP
+export MMUUSTP
+export MMUTBINVAL
+export MMU_BERR
+export MMU_ENAB
+export MMU_FAULT
+export MMU_CEN
+export MMU_IEN
+export MMU_FPE
+export CACHE_ON
+export CACHE_OFF
+export CACHE_CLR
+export IC_CLEAR
+export DC_CLEAR
# pte/ste bits
-define PG_V PG_V
-define PG_NV PG_NV
-define PG_RO PG_RO
-define PG_RW PG_RW
-define PG_CI PG_CI
-define PG_PROT PG_PROT
-define PG_FRAME PG_FRAME
-define SG_V SG_V
-define SG_NV SG_NV
-define SG_RW SG_RW
-define SG_FRAME SG_FRAME
-define SG_ISHIFT SG_ISHIFT
+export PG_V
+export PG_NV
+export PG_RO
+export PG_RW
+export PG_CI
+export PG_PROT
+export PG_FRAME
+export SG_V
+export SG_NV
+export SG_RW
+export SG_FRAME
+export SG_ISHIFT
# pcb fields
-define PCB_PS offsetof(struct pcb, pcb_ps)
-define PCB_USP offsetof(struct pcb, pcb_usp)
-define PCB_REGS offsetof(struct pcb, pcb_regs)
-define PCB_FPCTX offsetof(struct pcb, pcb_fpregs)
+struct pcb
+member pcb_ps
+member pcb_usp
+member pcb_regs
+member PCB_FPCTX pcb_fpregs
define SIZEOF_PCB sizeof(struct pcb)
# exception frame size
define FR_SIZE sizeof(struct trapframe)
# system calls
-define SYS_exit SYS_exit
-define SYS_execve SYS_execve
+export SYS_exit
+export SYS_execve
# clock registers
-define CLKSR CLKSR
-define CLKMSB1 CLKMSB1
-define CLKMSB3 CLKMSB3
+export CLKSR
+export CLKMSB1
+export CLKMSB3
diff --git a/sys/arch/hppa/hppa/genassym.cf b/sys/arch/hppa/hppa/genassym.cf
index 03d1060116d..7354cc18f77 100644
--- a/sys/arch/hppa/hppa/genassym.cf
+++ b/sys/arch/hppa/hppa/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.16 2000/07/03 17:45:11 mickey Exp $
+# $OpenBSD: genassym.cf,v 1.17 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -56,135 +56,118 @@ include <machine/frame.h>
include <machine/pmap.h>
include <machine/iomod.h>
-
# general constants
-define NBPG NBPG
-define PGSHIFT PGSHIFT
-define USRSTACK USRSTACK
-define HPPA_PID_KERNEL HPPA_PID_KERNEL
-define HPPA_SID_KERNEL HPPA_SID_KERNEL
-define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS
+export NBPG
+export PGSHIFT
+export USRSTACK
+export HPPA_PID_KERNEL
+export HPPA_SID_KERNEL
+export VM_MAXUSER_ADDRESS
# `break' entry points
-define HPPA_BREAK_KERNEL HPPA_BREAK_KERNEL
-define HPPA_BREAK_GET_PSW HPPA_BREAK_GET_PSW
-define HPPA_BREAK_SET_PSW HPPA_BREAK_SET_PSW
+export HPPA_BREAK_KERNEL
+export HPPA_BREAK_GET_PSW
+export HPPA_BREAK_SET_PSW
# pte things
-define TLB_REF_POS TLB_REF_POS
-define TLB_GATE_PROT TLB_GATE_PROT
-define TLB_DIRTY_POS TLB_DIRTY_POS
+export TLB_REF_POS
+export TLB_GATE_PROT
+export TLB_DIRTY_POS
# hpt_table fields
struct hpt_entry
member hpt_tlbprot
member hpt_tlbpage
member hpt_entry
-define hpt_tag 0
+define HPT_TAG 0
# pv_entry fields
struct pv_entry
member pv_hash
-member pv_pmap
member pv_space
member pv_va
member pv_tlbpage
member pv_tlbprot
-# pmap
-struct pmap
-member pmap_space
-member pmap_pid
-
-# export iomod
-struct iomod
-member io_command
-
-# export mbuf
-struct mbuf
-member m_len
-member m_next
-member m_data
-
# saved state fields
-define TF_SIZE sizeof(struct trapframe)
-define TF_FLAGS offsetof(struct trapframe, tf_flags)
-define TF_PHYS offsetof(struct trapframe, tf_sar)
-define TF_R1 offsetof(struct trapframe, tf_r1)
-define TF_R2 offsetof(struct trapframe, tf_rp)
-define TF_GOTO offsetof(struct trapframe, tf_rp)
-define TF_R3 offsetof(struct trapframe, tf_r3)
-define TF_R4 offsetof(struct trapframe, tf_r4)
-define TF_R5 offsetof(struct trapframe, tf_r5)
-define TF_R6 offsetof(struct trapframe, tf_r6)
-define TF_R7 offsetof(struct trapframe, tf_r7)
-define TF_R8 offsetof(struct trapframe, tf_r8)
-define TF_R9 offsetof(struct trapframe, tf_r9)
-define TF_R10 offsetof(struct trapframe, tf_r10)
-define TF_R11 offsetof(struct trapframe, tf_r11)
-define TF_R12 offsetof(struct trapframe, tf_r12)
-define TF_R13 offsetof(struct trapframe, tf_r13)
-define TF_R14 offsetof(struct trapframe, tf_r14)
-define TF_R15 offsetof(struct trapframe, tf_r15)
-define TF_R16 offsetof(struct trapframe, tf_r16)
-define TF_R17 offsetof(struct trapframe, tf_r17)
-define TF_R18 offsetof(struct trapframe, tf_r18)
-define TF_R19 offsetof(struct trapframe, tf_t4)
-define TF_R20 offsetof(struct trapframe, tf_t3)
-define TF_R21 offsetof(struct trapframe, tf_t2)
-define TF_R22 offsetof(struct trapframe, tf_t1)
-define TF_R23 offsetof(struct trapframe, tf_arg3)
-define TF_R24 offsetof(struct trapframe, tf_arg2)
-define TF_R25 offsetof(struct trapframe, tf_arg1)
-define TF_R26 offsetof(struct trapframe, tf_arg0)
-define TF_R27 offsetof(struct trapframe, tf_dp)
-define TF_R28 offsetof(struct trapframe, tf_ret0)
-define TF_R29 offsetof(struct trapframe, tf_ret1)
-define TF_R30 offsetof(struct trapframe, tf_sp)
-define TF_R31 offsetof(struct trapframe, tf_r31)
-define TF_SR0 offsetof(struct trapframe, tf_sr0)
-define TF_SR1 offsetof(struct trapframe, tf_sr1)
-define TF_SR2 offsetof(struct trapframe, tf_sr2)
-define TF_SR3 offsetof(struct trapframe, tf_sr3)
-define TF_SR4 offsetof(struct trapframe, tf_sr4)
-define TF_SR5 offsetof(struct trapframe, tf_sr5)
-define TF_SR6 offsetof(struct trapframe, tf_sr6)
-define TF_SR7 offsetof(struct trapframe, tf_sr7)
-define TF_CR0 offsetof(struct trapframe, tf_rctr)
-define TF_IIOQH offsetof(struct trapframe, tf_iioq_head)
-define TF_IIOQT offsetof(struct trapframe, tf_iioq_tail)
-define TF_IISQH offsetof(struct trapframe, tf_iisq_head)
-define TF_IISQT offsetof(struct trapframe, tf_iisq_tail)
-define TF_CR8 offsetof(struct trapframe, tf_pidr1)
-define TF_CR9 offsetof(struct trapframe, tf_pidr2)
-define TF_CR11 offsetof(struct trapframe, tf_sar)
-define TF_CR12 offsetof(struct trapframe, tf_pidr3)
-define TF_CR13 offsetof(struct trapframe, tf_pidr4)
-define TF_CR15 offsetof(struct trapframe, tf_eiem)
-define TF_CR19 offsetof(struct trapframe, tf_iir)
-define TF_CR20 offsetof(struct trapframe, tf_isr)
-define TF_CR21 offsetof(struct trapframe, tf_ior)
-define TF_CR22 offsetof(struct trapframe, tf_ipsw)
-define TF_CR23 offsetof(struct trapframe, tf_eirr)
-define TF_CR24 offsetof(struct trapframe, tf_hptm)
-define TF_CR25 offsetof(struct trapframe, tf_vtop)
-define TF_CR28 offsetof(struct trapframe, tf_cr28)
-define TF_CR30 offsetof(struct trapframe, tf_cr30)
+struct trapframe
+member TF_FLAGS
+member TF_PHYS tf_sar
+member TF_R1
+member TF_R2 tf_rp
+member TF_GOTO tf_rp
+member TF_R3
+member TF_R4
+member TF_R5
+member TF_R6
+member TF_R7
+member TF_R8
+member TF_R9
+member TF_R10
+member TF_R11
+member TF_R12
+member TF_R13
+member TF_R14
+member TF_R15
+member TF_R16
+member TF_R17
+member TF_R18
+member TF_R19 tf_t4
+member TF_R20 tf_t3
+member TF_R21 tf_t2
+member TF_R22 tf_t1
+member TF_R23 tf_arg3
+member TF_R24 tf_arg2
+member TF_R25 tf_arg1
+member TF_R26 tf_arg0
+member TF_R27 tf_dp
+member TF_R28 tf_ret0
+member TF_R29 tf_ret1
+member TF_R30 tf_sp
+member TF_R31
+member TF_SR0
+member TF_SR1
+member TF_SR2
+member TF_SR3
+member TF_SR4
+member TF_SR5
+member TF_SR6
+member TF_SR7
+member TF_CR0 tf_rctr
+member TF_IIOQH tf_iioq_head
+member TF_IIOQT tf_iioq_tail
+member TF_IISQH tf_iisq_head
+member TF_IISQT tf_iisq_tail
+member TF_CR8 tf_pidr1
+member TF_CR9 tf_pidr2
+member TF_CR11 tf_sar
+member TF_CR12 tf_pidr3
+member TF_CR13 tf_pidr4
+member TF_CR15 tf_eiem
+member TF_CR19 tf_iir
+member TF_CR20 tf_isr
+member TF_CR21 tf_ior
+member TF_CR22 tf_ipsw
+member TF_CR23 tf_eirr
+member TF_CR24 tf_hptm
+member TF_CR25 tf_vtop
+member TF_CR28
+member TF_CR30
+member TF_SIZE sizeof(struct trapframe)
# proc fields and values
struct proc
member p_forw
member p_back
-member p_vmspace
member p_addr
member p_priority
member p_stat
member p_wchan
member p_md
-define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
-define P_MD_REGS offsetof(struct proc, p_md.md_regs)
-define SSLEEP SSLEEP
-define SRUN SRUN
+member P_MD_FLAGS p_md.md_flags
+member P_MD_REGS p_md.md_regs
+
+export SRUN
struct pcb
member pcb_fpregs
@@ -195,11 +178,8 @@ member pcb_uva
struct user
member u_pcb
-# interrupt/fault metering
-#define V_INTR offsetof(struct vmmeter, v_intr)
-
# system calls
-define SYSCALLGATE SYSCALLGATE
-define SYS_exit SYS_exit
-define SYS_execve SYS_execve
-define SYS_sigreturn SYS_sigreturn
+export SYSCALLGATE
+export SYS_exit
+export SYS_execve
+export SYS_sigreturn
diff --git a/sys/arch/i386/i386/genassym.cf b/sys/arch/i386/i386/genassym.cf
index b75e396d006..0df70c1582b 100644
--- a/sys/arch/i386/i386/genassym.cf
+++ b/sys/arch/i386/i386/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.9 2001/05/05 23:25:36 art Exp $
+# $OpenBSD: genassym.cf,v 1.10 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -68,96 +68,108 @@ if NISA > 0
include <i386/isa/isa_machdep.h>
endif
-define SRUN SRUN
+export SRUN
# values for page tables
-define PDSLOT_KERN PDSLOT_KERN
-define PDSLOT_PTE PDSLOT_PTE
-define NKPTP_MIN NKPTP_MIN
-define NKPTP_MAX NKPTP_MAX
-define APTDPTDI APTDPTDI
+export PDSLOT_KERN
+export PDSLOT_PTE
+export NKPTP_MIN
+export NKPTP_MAX
+export APTDPTDI
# values for virtual memory
-define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS
+export VM_MAXUSER_ADDRESS
# proc fields and values
-define P_ADDR offsetof(struct proc, p_addr)
-define P_BACK offsetof(struct proc, p_back)
-define P_FORW offsetof(struct proc, p_forw)
-define P_PRIORITY offsetof(struct proc, p_priority)
-define P_STAT offsetof(struct proc, p_stat)
-define P_WCHAN offsetof(struct proc, p_wchan)
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define P_FLAG offsetof(struct proc, p_flag)
-
-define P_SYSTEM P_SYSTEM
+struct proc
+member p_addr
+member p_back
+member p_forw
+member p_priority
+member p_stat
+member p_wchan
+member p_vmspace
+member p_flag
+
+export P_SYSTEM
# interrupt/fault metering
-define V_TRAP offsetof(struct uvmexp, traps)
-define V_INTR offsetof(struct uvmexp, intrs)
+struct uvmexp V_
+member TRAP traps
+member INTR intrs
# pcb fields
-define PCB_CR3 offsetof(struct pcb, pcb_cr3)
-define PCB_EBP offsetof(struct pcb, pcb_ebp)
-define PCB_ESP offsetof(struct pcb, pcb_esp)
-define PCB_FS offsetof(struct pcb, pcb_fs)
-define PCB_GS offsetof(struct pcb, pcb_gs)
-define PCB_CR0 offsetof(struct pcb, pcb_cr0)
-define PCB_LDT_SEL offsetof(struct pcb, pcb_ldt_sel)
-define PCB_TSS_SEL offsetof(struct pcb, pcb_tss_sel)
-define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
+struct pcb
+member pcb_cr3
+member pcb_ebp
+member pcb_esp
+member pcb_fs
+member pcb_gs
+member pcb_cr0
+member pcb_ldt_sel
+member pcb_tss_sel
+member pcb_onfault
# frame definitions
-define TF_CS offsetof(struct trapframe, tf_cs)
-define TF_TRAPNO offsetof(struct trapframe, tf_trapno)
-define TF_EFLAGS offsetof(struct trapframe, tf_eflags)
-define TF_EIP offsetof(struct trapframe, tf_eip)
-define TF_ERR offsetof(struct trapframe, tf_err)
-
+struct trapframe
+member tf_cs
+member tf_trapno
+member tf_eflags
+member tf_eip
+member tf_err
define FRAMESIZE sizeof(struct trapframe)
# signal handling
-define SIGF_HANDLER offsetof(struct sigframe, sf_handler)
-define SIGF_SC offsetof(struct sigframe, sf_sc)
-define SC_FS offsetof(struct sigcontext, sc_fs)
-define SC_GS offsetof(struct sigcontext, sc_gs)
-define SC_EFLAGS offsetof(struct sigcontext, sc_eflags)
+struct sigframe SIGF_
+member HANDLER sf_handler
+member SC sf_sc
+struct sigcontext
+member sc_fs
+member sc_gs
+member sc_eflags
# mbuf fields
ifdef INET
-define M_NEXT offsetof(struct mbuf, m_next)
-define M_DATA offsetof(struct mbuf, m_data)
-define M_LEN offsetof(struct mbuf, m_len)
+struct mbuf
+member m_next
+member m_data
+member m_len
endif
# SVR4 frame offsets
ifdef COMPAT_SVR4
-define SVR4_SIGF_HANDLER offsetof(struct svr4_sigframe, sf_handler)
-define SVR4_SIGF_UC offsetof(struct svr4_sigframe, sf_uc)
-define SVR4_UC_FS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])
-define SVR4_UC_GS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])
-define SVR4_UC_EFLAGS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL])
+struct svr4_sigframe SVR4_SIGF_
+member HANDLER sf_handler
+member UC sf_uc
+struct svr4_ucontext SVR4_UC_
+member FS uc_mcontext.greg[SVR4_X86_FS]
+member GS uc_mcontext.greg[SVR4_X86_GS]
+member EFLAGS uc_mcontext.greg[SVR4_X86_EFL]
endif
# Linux frame offsets
ifdef COMPAT_LINUX
-define LINUX_SIGF_HANDLER offsetof(struct linux_sigframe, sf_handler)
-define LINUX_SIGF_SC offsetof(struct linux_sigframe, sf_sc)
-define LINUX_SC_FS offsetof(struct linux_sigcontext, sc_fs)
-define LINUX_SC_GS offsetof(struct linux_sigcontext, sc_gs)
-define LINUX_SC_EFLAGS offsetof(struct linux_sigcontext, sc_eflags)
+struct linux_sigframe LINUX_SIGF_
+member HANDLER sf_handler
+member SC sf_sc
+struct linux_sigcontext LINUX_
+member sc_fs
+member sc_gs
+member sc_eflags
endif
# FreeBSD frame offsets
ifdef COMPAT_FREEBSD
-define FREEBSD_SIGF_HANDLER offsetof(struct freebsd_sigframe, sf_handler)
-define FREEBSD_SIGF_SC offsetof(struct freebsd_sigframe, sf_sc)
+struct freebsd_sigframe FREEBSD_SIGF_
+member HANDLER sf_handler
+member SC sf_sc
endif
# Interrupt metering
if NISA > 0
-define IH_FUN offsetof(struct intrhand, ih_fun)
-define IH_ARG offsetof(struct intrhand, ih_arg)
-define IH_COUNT offsetof(struct intrhand, ih_count)
-define IH_NEXT offsetof(struct intrhand, ih_next)
+struct intrhand
+member ih_fun
+member ih_arg
+member ih_count
+member ih_next
endif
diff --git a/sys/arch/m68k/m68k/genassym.cf b/sys/arch/m68k/m68k/genassym.cf
index 326aa11f609..dc8aab8e0bb 100644
--- a/sys/arch/m68k/m68k/genassym.cf
+++ b/sys/arch/m68k/m68k/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.2 2001/08/31 00:37:20 miod Exp $
+# $OpenBSD: genassym.cf,v 1.3 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1995 Theo de Raadt
@@ -77,34 +77,37 @@ include <machine/cpu.h>
include <machine/psl.h>
# general constants
-define NBPG NBPG
+export NBPG
# proc fields and values
-define P_FORW offsetof(struct proc, p_forw)
-define P_BACK offsetof(struct proc, p_back)
-define P_PRIORITY offsetof(struct proc, p_priority)
-define P_STAT offsetof(struct proc, p_stat)
-define P_WCHAN offsetof(struct proc, p_wchan)
+struct proc
+member p_forw
+member p_back
+member p_priority
+member p_stat
+member p_wchan
-define SRUN SRUN
+export SRUN
# magic
-define FC_USERD FC_USERD
+export FC_USERD
# PSL values
-define PSL_HIGHIPL PSL_HIGHIPL
+export PSL_HIGHIPL
# pcb fields
-define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
+struct pcb
+member pcb_onfault
# exception frame offset/sizes
-define FR_SP offsetof(struct frame, f_regs[15])
-define FR_HW offsetof(struct frame, f_sr)
-define FR_ADJ offsetof(struct frame, f_stackadj)
+struct frame
+member FR_SP f_regs[15]
+member FR_HW f_sr
+member FR_ADJ f_stackadj
# system calls
-define SYS_sigreturn SYS_sigreturn
+export SYS_sigreturn
# errno
-define EFAULT EFAULT
-define ENAMETOOLONG ENAMETOOLONG
+export EFAULT
+export ENAMETOOLONG
diff --git a/sys/arch/mac68k/mac68k/genassym.cf b/sys/arch/mac68k/mac68k/genassym.cf
index f663b31634e..6eca3957415 100644
--- a/sys/arch/mac68k/mac68k/genassym.cf
+++ b/sys/arch/mac68k/mac68k/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.8 2001/08/31 00:37:20 miod Exp $
+# $OpenBSD: genassym.cf,v 1.9 2001/09/16 14:28:04 miod Exp $
# $NetBSD: genassym.cf,v 1.7 1998/01/06 08:46:16 thorpej Exp $
#
@@ -55,54 +55,57 @@ include <machine/psl.h>
include <machine/reg.h>
include <machine/pte.h>
-define P_ADDR offsetof(struct proc, p_addr)
-define P_MD_REGS offsetof(struct proc, p_md.md_regs)
-define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
+struct proc
+member p_addr
+member P_MD_REGS p_md.md_regs
+member P_MD_FLAGS p_md.md_flags
# interrupt/fault metering
-define UVMEXP_INTRS offsetof(struct uvmexp, intrs)
+struct uvmexp UVMEXP_
+member intrs
-define USPACE USPACE
-define PGSHIFT PGSHIFT
-define USRSTACK USRSTACK
+export USPACE
+export PGSHIFT
+export USRSTACK
-define PSL_S PSL_S
-define PSL_IPL7 PSL_IPL7
-define PSL_LOWIPL PSL_LOWIPL
-define PSL_USER PSL_USER
+export PSL_S
+export PSL_IPL7
+export PSL_LOWIPL
+export PSL_USER
define SPL1 (PSL_S | PSL_IPL1)
define SPL2 (PSL_S | PSL_IPL2)
-define FC_SUPERD FC_SUPERD
+export FC_SUPERD
-define CACHE_ON CACHE_ON
-define CACHE_OFF CACHE_OFF
-define CACHE_CLR CACHE_CLR
-define CACHE40_ON CACHE40_ON
-define CACHE40_OFF CACHE40_OFF
-define IC_CLEAR IC_CLEAR
-define DC_CLEAR DC_CLEAR
+export CACHE_ON
+export CACHE_OFF
+export CACHE_CLR
+export CACHE40_ON
+export CACHE40_OFF
+export IC_CLEAR
+export DC_CLEAR
-define PG_FRAME PG_FRAME
+export PG_FRAME
-define PCB_PS offsetof(struct pcb, pcb_ps)
-define PCB_USP offsetof(struct pcb, pcb_usp)
-define PCB_REGS offsetof(struct pcb, pcb_regs)
-define PCB_FPCTX offsetof(struct pcb, pcb_fpregs)
+struct pcb
+member pcb_ps
+member pcb_usp
+member pcb_regs
+member PCB_FPCTX pcb_fpregs
define SIZEOF_PCB sizeof(struct pcb)
define FR_SIZE sizeof(struct trapframe)
define CPUINFO_CLASS offsetof(struct cpu_model_info, class)
-define MACH_CLASSAV MACH_CLASSAV
+export MACH_CLASSAV
-define CPU_68020 CPU_68020
-define CPU_68030 CPU_68030
-define CPU_68040 CPU_68040
+export CPU_68020
+export CPU_68030
+export CPU_68040
-define MMU_68851 MMU_68851
-define MMU_68030 MMU_68030
-define MMU_68040 MMU_68040
+export MMU_68851
+export MMU_68030
+export MMU_68040
-define FPU_68882 FPU_68882
-define FPU_68040 FPU_68040
+export FPU_68882
+export FPU_68040
diff --git a/sys/arch/macppc/macppc/genassym.cf b/sys/arch/macppc/macppc/genassym.cf
index 7fc0925a997..9f649b1acf2 100644
--- a/sys/arch/macppc/macppc/genassym.cf
+++ b/sys/arch/macppc/macppc/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.2 2001/09/11 20:05:24 miod Exp $
+# $OpenBSD: genassym.cf,v 1.3 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -42,34 +42,35 @@ include <vm/vm.h>
include <machine/pcb.h>
include <machine/pmap.h>
-
-
-define FRAMELEN FRAMELEN
-define FRAME_0 offsetof(struct trapframe, fixreg[0])
-define FRAME_1 offsetof(struct trapframe, fixreg[1])
-define FRAME_2 offsetof(struct trapframe, fixreg[2])
-define FRAME_3 offsetof(struct trapframe, fixreg[3])
-define FRAME_LR offsetof(struct trapframe, lr)
-define FRAME_CR offsetof(struct trapframe, cr)
-define FRAME_CTR offsetof(struct trapframe, ctr)
-define FRAME_XER offsetof(struct trapframe, xer)
-define FRAME_SRR0 offsetof(struct trapframe, srr0)
-define FRAME_SRR1 offsetof(struct trapframe, srr1)
-define FRAME_DAR offsetof(struct trapframe, dar)
-define FRAME_DSISR offsetof(struct trapframe, dsisr)
-define FRAME_EXC offsetof(struct trapframe, exc)
+export FRAMELEN
+struct trapframe FRAME_
+member 0 fixreg[0]
+member 1 fixreg[1]
+member 2 fixreg[2]
+member 3 fixreg[3]
+member lr
+member cr
+member ctr
+member xer
+member srr0
+member srr1
+member dar
+member dsisr
+member exc
define SFRAMELEN roundup(sizeof(struct switchframe), 16)
-define PCB_PMR offsetof(struct pcb, pcb_pmreal)
-define PCB_SP offsetof(struct pcb, pcb_sp)
-define PCB_SPL offsetof(struct pcb, pcb_spl)
-define PCB_FAULT offsetof(struct pcb, pcb_onfault)
-
-define PM_USRSR offsetof(struct pmap, pm_sr[USER_SR])
-define PM_KERNELSR offsetof(struct pmap, pm_sr[KERNEL_SR])
+struct pcb
+member PCB_PMR pcb_pmreal
+member pcb_sp
+member pcb_spl
+member PCB_FAULT pcb_onfault
-define P_FORW offsetof(struct proc, p_forw)
-define P_BACK offsetof(struct proc, p_back)
-define P_ADDR offsetof(struct proc, p_addr)
+struct pmap
+member PM_USRSR pm_sr[USER_SR]
+member PM_KERNELSR pm_sr[KERNEL_SR]
+struct proc
+member p_forw
+member p_back
+member p_addr
diff --git a/sys/arch/mvme68k/mvme68k/genassym.cf b/sys/arch/mvme68k/mvme68k/genassym.cf
index 533d4b22be5..a0589f7736b 100644
--- a/sys/arch/mvme68k/mvme68k/genassym.cf
+++ b/sys/arch/mvme68k/mvme68k/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.11 2001/08/31 00:37:20 miod Exp $
+# $OpenBSD: genassym.cf,v 1.12 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1995 Theo de Raadt
@@ -86,81 +86,85 @@ include <machine/prom.h>
include <machine/pte.h>
# general constants
-define USPACE USPACE
-define PGSHIFT PGSHIFT
-define USRSTACK USRSTACK
+export USPACE
+export PGSHIFT
+export USRSTACK
# proc fields and values
-define P_ADDR offsetof(struct proc, p_addr)
-define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
-define P_MD_REGS offsetof(struct proc, p_md.md_regs)
+struct proc
+member p_addr
+member P_MD_FLAGS p_md.md_flags
+member P_MD_REGS p_md.md_regs
# interrupt/fault metering
-define UVMEXP_INTRS offsetof(struct uvmexp, intrs)
+struct uvmexp UVMEXP_
+member intrs
# PSL values
-define PSL_S PSL_S
-define PSL_IPL7 PSL_IPL7
-define PSL_LOWIPL PSL_LOWIPL
-define PSL_USER PSL_USER
+export PSL_S
+export PSL_IPL7
+export PSL_LOWIPL
+export PSL_USER
define SPL1 PSL_S | PSL_IPL1
# magic
-define CACHE_ON CACHE_ON
-define CACHE_OFF CACHE_OFF
-define CACHE_CLR CACHE_CLR
-define IC_CLEAR IC_CLEAR
-define DC_CLEAR DC_CLEAR
-define CACHE60_ON CACHE60_ON
-define IC60_CUBC IC60_CUBC
-define IC60_CABC IC60_CABC
+export CACHE_ON
+export CACHE_OFF
+export CACHE_CLR
+export IC_CLEAR
+export DC_CLEAR
+export CACHE60_ON
+export IC60_CUBC
+export IC60_CABC
# pte/ste bits
-define PG_FRAME PG_FRAME
+export PG_FRAME
# pcb fields
-define PCB_PS offsetof(struct pcb, pcb_ps)
-define PCB_USP offsetof(struct pcb, pcb_usp)
-define PCB_REGS offsetof(struct pcb, pcb_regs)
-define PCB_FPCTX offsetof(struct pcb, pcb_fpregs)
+struct pcb
+member pcb_ps
+member pcb_usp
+member pcb_regs
+member PCB_FPCTX pcb_fpregs
define SIZEOF_PCB sizeof(struct pcb)
# exception frame size
define FR_SIZE sizeof(struct trapframe)
-
define SIZEOF_MVMEPROM_BRDID sizeof(struct mvmeprom_brdid)
define MVMEPROM_BRDID_MODEL offsetof(struct mvmeprom_brdid, model)
-define NVRAM_147_ETHER offsetof(struct nvram_147, ether)
-define NVRAM_147_EMEM offsetof(struct nvram_147, emem)
-
-define INTIOBASE_147 INTIOBASE_147
-define INTIOBASE_162 INTIOBASE_162
-define INTIOSIZE_147 INTIOSIZE_147
-define INTIOSIZE_162 INTIOSIZE_162
-
-define CPU_147 CPU_147
-define CPU_162 CPU_162
-define CPU_166 CPU_166
-define CPU_167 CPU_167
-define CPU_172 CPU_172
-define CPU_177 CPU_177
-
-define MMU_68030 MMU_68030
-define MMU_68040 MMU_68040
-define MMU_68060 MMU_68060
-
-define CPU_68030 CPU_68030
-define CPU_68040 CPU_68040
-define CPU_68060 CPU_68060
-
-define FPU_68881 FPU_68881
-define FPU_68040 FPU_68040
-define FPU_68060 FPU_68060
-
-define NETCTRL_DEV offsetof(struct prom_netctrl, dev)
-define NETCTRL_CTRL offsetof(struct prom_netctrl, ctrl)
-define NETCTRL_CMD offsetof(struct prom_netctrl, cmd)
-define NETCTRL_ADDR offsetof(struct prom_netctrl, addr)
-define NETCTRL_LEN offsetof(struct prom_netctrl, len)
+struct nvram_147 NVRAM_147_
+member ether
+member emem
+
+export INTIOBASE_147
+export INTIOBASE_162
+export INTIOSIZE_147
+export INTIOSIZE_162
+
+export CPU_147
+export CPU_162
+export CPU_166
+export CPU_167
+export CPU_172
+export CPU_177
+
+export MMU_68030
+export MMU_68040
+export MMU_68060
+
+export CPU_68030
+export CPU_68040
+export CPU_68060
+
+export FPU_68881
+export FPU_68040
+export FPU_68060
+
+struct prom_netctrl NETCTRL_
+member dev
+member ctrl
+member cmd
+member addr
+member len
diff --git a/sys/arch/mvme88k/mvme88k/genassym.cf b/sys/arch/mvme88k/mvme88k/genassym.cf
index 938cd561c9e..a08ccbbe51c 100644
--- a/sys/arch/mvme88k/mvme88k/genassym.cf
+++ b/sys/arch/mvme88k/mvme88k/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.1 2001/05/20 05:51:22 miod Exp $
+# $OpenBSD: genassym.cf,v 1.2 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)genassym.c 7.8 (Berkeley) 5/7/91
-# $Id: genassym.cf,v 1.1 2001/05/20 05:51:22 miod Exp $
+# $Id: genassym.cf,v 1.2 2001/09/16 14:28:04 miod Exp $
#
include <sys/param.h>
@@ -49,26 +49,28 @@ include <sys/syscall.h>
include <sys/user.h>
# proc fields and values
-define P_FORW offsetof(struct proc, p_forw)
-define P_BACK offsetof(struct proc, p_back)
-define P_ADDR offsetof(struct proc, p_addr)
-define P_STAT offsetof(struct proc, p_stat)
-define P_WCHAN offsetof(struct proc, p_wchan)
+struct proc
+member p_forw
+member p_back
+member p_addr
+member p_stat
+member p_wchan
-define SRUN SRUN
+export SRUN
# general constants
-define UPAGES UPAGES
+export UPAGES
define USIZE USPACE
-define NBPG NBPG
+export NBPG
# pcb fields
-define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
-define PCB_USER_STATE offsetof(struct pcb, user_state)
+struct pcb
+member pcb_onfault
+member PCB_USER_STATE user_state
# system calls
-define SYS_exit SYS_exit
-define SYS_sigreturn SYS_sigreturn
+export SYS_exit
+export SYS_sigreturn
# m88100_saved_state element indexes
define EF_R0 offsetof(struct m88100_saved_state, r[0]) / sizeof(int)
@@ -116,23 +118,24 @@ define EF_CPU offsetof(struct m88100_saved_state, cpu) / sizeof(int)
define SIZEOF_EF sizeof(struct m88100_saved_state)
# more (machine-dependent) pcb fields
-define PCB_PC offsetof(struct m88100_pcb, pcb_pc)
-define PCB_IPL offsetof(struct m88100_pcb, pcb_ipl)
-define PCB_R14 offsetof(struct m88100_pcb, pcb_r14)
-define PCB_R15 offsetof(struct m88100_pcb, pcb_r15)
-define PCB_R16 offsetof(struct m88100_pcb, pcb_r16)
-define PCB_R17 offsetof(struct m88100_pcb, pcb_r17)
-define PCB_R18 offsetof(struct m88100_pcb, pcb_r18)
-define PCB_R19 offsetof(struct m88100_pcb, pcb_r19)
-define PCB_R20 offsetof(struct m88100_pcb, pcb_r20)
-define PCB_R21 offsetof(struct m88100_pcb, pcb_r21)
-define PCB_R22 offsetof(struct m88100_pcb, pcb_r22)
-define PCB_R23 offsetof(struct m88100_pcb, pcb_r23)
-define PCB_R24 offsetof(struct m88100_pcb, pcb_r24)
-define PCB_R25 offsetof(struct m88100_pcb, pcb_r25)
-define PCB_R26 offsetof(struct m88100_pcb, pcb_r26)
-define PCB_R27 offsetof(struct m88100_pcb, pcb_r27)
-define PCB_R28 offsetof(struct m88100_pcb, pcb_r28)
-define PCB_R29 offsetof(struct m88100_pcb, pcb_r29)
-define PCB_R30 offsetof(struct m88100_pcb, pcb_r30)
-define PCB_SP offsetof(struct m88100_pcb, pcb_sp)
+struct m88100_pcb
+member pcb_pc
+member pcb_ipl
+member pcb_r14
+member pcb_r15
+member pcb_r16
+member pcb_r17
+member pcb_r18
+member pcb_r19
+member pcb_r20
+member pcb_r21
+member pcb_r22
+member pcb_r23
+member pcb_r24
+member pcb_r25
+member pcb_r26
+member pcb_r27
+member pcb_r28
+member pcb_r29
+member pcb_r30
+member pcb_sp
diff --git a/sys/arch/mvmeppc/mvmeppc/genassym.cf b/sys/arch/mvmeppc/mvmeppc/genassym.cf
index 7fc0925a997..9f649b1acf2 100644
--- a/sys/arch/mvmeppc/mvmeppc/genassym.cf
+++ b/sys/arch/mvmeppc/mvmeppc/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.2 2001/09/11 20:05:24 miod Exp $
+# $OpenBSD: genassym.cf,v 1.3 2001/09/16 14:28:04 miod Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -42,34 +42,35 @@ include <vm/vm.h>
include <machine/pcb.h>
include <machine/pmap.h>
-
-
-define FRAMELEN FRAMELEN
-define FRAME_0 offsetof(struct trapframe, fixreg[0])
-define FRAME_1 offsetof(struct trapframe, fixreg[1])
-define FRAME_2 offsetof(struct trapframe, fixreg[2])
-define FRAME_3 offsetof(struct trapframe, fixreg[3])
-define FRAME_LR offsetof(struct trapframe, lr)
-define FRAME_CR offsetof(struct trapframe, cr)
-define FRAME_CTR offsetof(struct trapframe, ctr)
-define FRAME_XER offsetof(struct trapframe, xer)
-define FRAME_SRR0 offsetof(struct trapframe, srr0)
-define FRAME_SRR1 offsetof(struct trapframe, srr1)
-define FRAME_DAR offsetof(struct trapframe, dar)
-define FRAME_DSISR offsetof(struct trapframe, dsisr)
-define FRAME_EXC offsetof(struct trapframe, exc)
+export FRAMELEN
+struct trapframe FRAME_
+member 0 fixreg[0]
+member 1 fixreg[1]
+member 2 fixreg[2]
+member 3 fixreg[3]
+member lr
+member cr
+member ctr
+member xer
+member srr0
+member srr1
+member dar
+member dsisr
+member exc
define SFRAMELEN roundup(sizeof(struct switchframe), 16)
-define PCB_PMR offsetof(struct pcb, pcb_pmreal)
-define PCB_SP offsetof(struct pcb, pcb_sp)
-define PCB_SPL offsetof(struct pcb, pcb_spl)
-define PCB_FAULT offsetof(struct pcb, pcb_onfault)
-
-define PM_USRSR offsetof(struct pmap, pm_sr[USER_SR])
-define PM_KERNELSR offsetof(struct pmap, pm_sr[KERNEL_SR])
+struct pcb
+member PCB_PMR pcb_pmreal
+member pcb_sp
+member pcb_spl
+member PCB_FAULT pcb_onfault
-define P_FORW offsetof(struct proc, p_forw)
-define P_BACK offsetof(struct proc, p_back)
-define P_ADDR offsetof(struct proc, p_addr)
+struct pmap
+member PM_USRSR pm_sr[USER_SR]
+member PM_KERNELSR pm_sr[KERNEL_SR]
+struct proc
+member p_forw
+member p_back
+member p_addr
diff --git a/sys/arch/sparc/sparc/genassym.cf b/sys/arch/sparc/sparc/genassym.cf
index 5dd203edeea..cd93dcc93c5 100644
--- a/sys/arch/sparc/sparc/genassym.cf
+++ b/sys/arch/sparc/sparc/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.7 2001/05/10 10:34:45 art Exp $
+# $OpenBSD: genassym.cf,v 1.8 2001/09/16 14:28:04 miod Exp $
# $NetBSD: genassym.cf,v 1.2 1997/06/28 19:59:04 pk Exp $
#
@@ -81,122 +81,137 @@ include <sparc/dev/fdreg.h>
include <sparc/dev/fdvar.h>
# general constants
-define BSD BSD
-define SUN4_PGSHIFT SUN4_PGSHIFT
-define SUN4CM_PGSHIFT SUN4CM_PGSHIFT
-define USRSTACK USRSTACK
+export BSD
+export SUN4_PGSHIFT
+export SUN4CM_PGSHIFT
+export USRSTACK
# proc fields and values
-define P_ADDR offsetof(struct proc, p_addr)
-define P_STAT offsetof(struct proc, p_stat)
-define P_WCHAN offsetof(struct proc, p_wchan)
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define SRUN SRUN
+struct proc
+member p_addr
+member p_stat
+member p_wchan
+member p_vmspace
+
+export SRUN
# VM structure fields
define VM_PMAP offsetof(struct vmspace, vm_map.pmap)
-define PMAP_CTX offsetof(struct pmap, pm_ctx)
-define PMAP_CTXNUM offsetof(struct pmap, pm_ctxnum)
+struct pmap
+member PMAP_CTX pm_ctx
+member PMAP_CTXNUM pm_ctxnum
# interrupt/fault metering
-define V_SWTCH offsetof(struct uvmexp, swtch)
-define V_INTR offsetof(struct uvmexp, intrs)
-define V_FAULTS offsetof(struct uvmexp, faults)
+struct uvmexp V_
+member swtch
+member INTR intrs
+member faults
# CPU info structure
-define CPUINFO_GETSYNCFLT offsetof(struct cpu_softc, get_syncflt)
-define CPUINFO_GETASYNCFLT offsetof(struct cpu_softc, get_asyncflt)
-define CPUINFO_SYNCFLTDUMP offsetof(struct cpu_softc, syncfltdump)
-define CPUINFO_PURE_VCACHE_FLS offsetof(struct cpu_softc, pure_vcache_flush)
+struct cpu_softc
+member CPUINFO_GETSYNCFLT get_syncflt
+member CPUINFO_GETASYNCFLT get_asyncflt
+member CPUINFO_SYNCFLTDUMP syncfltdump
+member CPUINFO_PURE_VCACHE_FLS pure_vcache_flush
# PTE bits and related information
-define PG_W PG_W
-define PG_VSHIFT PG_VSHIFT
-define PG_PROTSHIFT PG_PROTSHIFT
-define PG_PROTUREAD PG_PROTUREAD
-define PG_PROTUWRITE PG_PROTUWRITE
+export PG_W
+export PG_VSHIFT
+export PG_PROTSHIFT
+export PG_PROTUREAD
+export PG_PROTUWRITE
if defined(SUN4M)
-define SRMMU_TETYPE SRMMU_TETYPE
-define SRMMU_TEPTE SRMMU_TEPTE
-define SRMMU_PROT_MASK SRMMU_PROT_MASK
-define PPROT_R_RW PPROT_R_RW
-define PPROT_RX_RX PPROT_RX_RX
-define PPROT_RWX_RWX PPROT_RWX_RWX
-define PPROT_WRITE PPROT_WRITE
+export SRMMU_TETYPE
+export SRMMU_TEPTE
+export SRMMU_PROT_MASK
+export PPROT_R_RW
+export PPROT_RX_RX
+export PPROT_RWX_RWX
+export PPROT_WRITE
endif
# FPU state
-define FS_REGS offsetof(struct fpstate, fs_regs)
-define FS_FSR offsetof(struct fpstate, fs_fsr)
-define FS_QSIZE offsetof(struct fpstate, fs_qsize)
-define FS_QUEUE offsetof(struct fpstate, fs_queue)
-define FSR_QNE FSR_QNE
+struct fpstate
+member fs_regs
+member fs_fsr
+member fs_qsize
+member fs_queue
+export FSR_QNE
# system calls
-define SYS_sigreturn SYS_sigreturn
-define SYS_execve SYS_execve
-define SYS_exit SYS_exit
+export SYS_sigreturn
+export SYS_execve
+export SYS_exit
# errno
-define EFAULT EFAULT
-define ENAMETOOLONG ENAMETOOLONG
+export EFAULT
+export ENAMETOOLONG
# PCB fields
-define PCB_NSAVED offsetof(struct pcb, pcb_nsaved)
-define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
-define PCB_PSR offsetof(struct pcb, pcb_psr)
-define PCB_RW offsetof(struct pcb, pcb_rw)
-define PCB_SP offsetof(struct pcb, pcb_sp)
-define PCB_PC offsetof(struct pcb, pcb_pc)
-define PCB_UW offsetof(struct pcb, pcb_uw)
-define PCB_WIM offsetof(struct pcb, pcb_wim)
+struct pcb
+member pcb_nsaved
+member pcb_onfault
+member pcb_psr
+member pcb_rw
+member pcb_sp
+member pcb_pc
+member pcb_uw
+member pcb_wim
# interrupt enable register PTE
define IE_REG_PTE_PG (PG_V | PG_W | PG_S | PG_NC | PG_OBIO)
ifdef notyet
# ZSCC interrupt fields
-define ZSC_A offsetof(struct zs_softc, sc_a)
-define ZSC_B offsetof(struct zs_softc, sc_b)
-define ZL_WREG offsetof(struct zs_line, zl_wreg)
-define ZL_TBC offsetof(struct zs_line, zl_tbc)
-define ZL_TBA offsetof(struct zs_line, zl_tba)
-define ZL_RBPUT offsetof(struct zs_line, zl_rbput)
-define ZL_RBUF offsetof(struct zs_line, zl_rbuf)
+struct zs_softc Z
+member sc_a
+member sc_b
+struct zs_line
+member zl_wreg
+member zl_tbc
+member zl_tba
+member zl_rbput
+member zl_rbuf
define ZSRR1_DO_bit ffs(ZSRR1_DO) - 1
endif
# audio trap handler fields
-define AU_AMD offsetof(struct auio, au_amd)
-define AU_RDATA offsetof(struct auio, au_rdata)
-define AU_REND offsetof(struct auio, au_rend)
-define AU_PDATA offsetof(struct auio, au_pdata)
-define AU_PEND offsetof(struct auio, au_pend)
+struct auio
+member au_amd
+member au_rdata
+member au_rend
+member au_pdata
+member au_pend
define AU_EVCNT offsetof(struct auio, au_intrcnt.ev_count)
-define AMD_IR offsetof(struct amd7930, ir)
-define AMD_BBRB offsetof(struct amd7930, bbrb)
-define AMD_BBTB offsetof(struct amd7930, bbtb)
+struct amd7930 AMD_
+member ir
+member bbrb
+member bbtb
-define PROM_BASE PROM_BASE
+export PROM_BASE
-define PV_NODEOPS offsetof(struct promvec, pv_nodeops)
-define PV_HALT offsetof(struct promvec, pv_halt)
-define PV_EVAL offsetof(struct promvec, pv_fortheval.v0_eval)
-define PV_ROMVEC_VERS offsetof(struct promvec, pv_romvec_vers)
+struct promvec
+member pv_nodeops
+member pv_halt
+member PV_EVAL pv_fortheval.v0_eval
+member pv_romvec_vers
-define NO_NEXTNODE offsetof(struct nodeops, no_nextnode)
-define NO_GETPROP offsetof(struct nodeops, no_getprop)
+struct nodeops
+member no_nextnode
+member no_getprop
-define OLDMON_PRINTF offsetof(struct om_vector, printf)
-define OLDMON_HALT offsetof(struct om_vector, exitToMon)
+struct om_vector OLDMON_
+member printf
+member HALT exitToMon
# floppy trap handler fields
-define FDC_REG_MSR offsetof(struct fdcio, fdcio_reg_msr)
-define FDC_REG_FIFO offsetof(struct fdcio, fdcio_reg_fifo)
-define FDC_ISTATE offsetof(struct fdcio, fdcio_istate)
-define FDC_STATUS offsetof(struct fdcio, fdcio_status)
-define FDC_NSTAT offsetof(struct fdcio, fdcio_nstat)
-define FDC_DATA offsetof(struct fdcio, fdcio_data)
-define FDC_TC offsetof(struct fdcio, fdcio_tc)
-define FDC_EVCNT offsetof(struct fdcio, fdcio_intrcnt.ev_count)
+struct fdcio
+member FDC_REG_MSR fdcio_reg_msr
+member FDC_REG_FIFO fdcio_reg_fifo
+member FDC_ISTATE fdcio_istate
+member FDC_STATUS fdcio_status
+member FDC_NSTAT fdcio_nstat
+member FDC_DATA fdcio_data
+member FDC_TC fdcio_tc
+member FDC_EVCNT fdcio_intrcnt.ev_count
diff --git a/sys/arch/sparc64/sparc64/genassym.cf b/sys/arch/sparc64/sparc64/genassym.cf
index 8be71d9a3fc..598d8bfbcd3 100644
--- a/sys/arch/sparc64/sparc64/genassym.cf
+++ b/sys/arch/sparc64/sparc64/genassym.cf
@@ -124,18 +124,20 @@ include <sparc64/dev/fdvar.h>
endif
# general constants
-define BSD BSD
-define USRSTACK USRSTACK
+export BSD
+export USRSTACK
define PADDRT sizeof(paddr_t)
# proc fields and values
-define P_ADDR offsetof(struct proc, p_addr)
-define P_STAT offsetof(struct proc, p_stat)
-define P_WCHAN offsetof(struct proc, p_wchan)
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define P_PID offsetof(struct proc, p_pid)
-define P_FPSTATE offsetof(struct proc, p_md.md_fpstate)
-define SRUN SRUN
+struct proc
+member p_addr
+member p_stat
+member p_wchan
+member p_vmspace
+member p_pid
+member P_FPSTATE p_md.md_fpstate
+
+export SRUN
# user structure fields
define USIZ sizeof(struct user)
@@ -147,140 +149,148 @@ define VM_PMAP offsetof(struct vmspace, vm_map.pmap)
define UVM_PAGE_IDLE_ZERO offsetof(struct uvm, page_idle_zero)
# pmap structure fields
-define PM_CTX offsetof(struct pmap, pm_ctx)
-define PM_SEGS offsetof(struct pmap, pm_segs)
-define PM_PHYS offsetof(struct pmap, pm_physaddr)
-
+struct pmap
+member pm_ctx
+member pm_segs
+member PM_PHYS pm_physaddr
# interrupt/fault metering
-define V_SWTCH offsetof(struct uvmexp, swtch)
-define V_INTR offsetof(struct uvmexp, intrs)
-define V_FAULTS offsetof(struct uvmexp, faults)
+struct uwmexp V_
+member swtch
+member INTR intrs
+member faults
# CPU info structure
-define CI_CURPROC offsetof(struct cpu_info, ci_curproc)
-define CI_CPCB offsetof(struct cpu_info, ci_cpcb)
-define CI_NEXT offsetof(struct cpu_info, ci_next)
-define CI_FPPROC offsetof(struct cpu_info, ci_fpproc)
-define CI_NUMBER offsetof(struct cpu_info, ci_number)
-define CI_UPAID offsetof(struct cpu_info, ci_upaid)
-define CI_SPINUP offsetof(struct cpu_info, ci_spinup)
-define CI_INITSTACK offsetof(struct cpu_info, ci_initstack)
-define CI_PADDR offsetof(struct cpu_info, ci_paddr)
+struct cpu_info
+member ci_curproc
+member ci_cpcb
+member ci_next
+member ci_fpproc
+member ci_number
+member ci_upaid
+member ci_spinup
+member ci_initstack
+member ci_paddr
# FPU state
-define FS_REGS offsetof(struct fpstate64, fs_regs)
-define FS_FSR offsetof(struct fpstate64, fs_fsr)
-define FS_GSR offsetof(struct fpstate64, fs_gsr)
-define FS_QSIZE offsetof(struct fpstate64, fs_qsize)
-define FS_QUEUE offsetof(struct fpstate64, fs_queue)
+struct fpstate64
+member fs_regs
+member fs_fsr
+member fs_gsr
+member fs_qsize
+member fs_queue
define FS_SIZE sizeof(struct fpstate64)
-define FSR_QNE FSR_QNE
-define FPRS_FEF FPRS_FEF
-define FPRS_DU FPRS_DU
-define FPRS_DL FPRS_DL
+export FSR_QNE
+export FPRS_FEF
+export FPRS_DU
+export FPRS_DL
# system calls
-define SYS_sigreturn SYS_sigreturn
-define SYS_execve SYS_execve
-define SYS_exit SYS_exit
+export SYS_sigreturn
+export SYS_execve
+export SYS_exit
# errno
-define EFAULT EFAULT
-define ENAMETOOLONG ENAMETOOLONG
+export EFAULT
+export ENAMETOOLONG
# PCB fields
-define PCB_NSAVED offsetof(struct pcb, pcb_nsaved)
-define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
-define PCB_PSTATE offsetof(struct pcb, pcb_pstate)
-define PCB_CWP offsetof(struct pcb, pcb_cwp)
-define PCB_PIL offsetof(struct pcb, pcb_pil)
-define PCB_RW offsetof(struct pcb, pcb_rw)
-define PCB_SP offsetof(struct pcb, pcb_sp)
-define PCB_PC offsetof(struct pcb, pcb_pc)
-define PCB_LASTCALL offsetof(struct pcb, lastcall)
+struct pcb
+member pcb_nsaved
+member pcb_onfault
+member pcb_pstate
+member pcb_cwp
+member pcb_pil
+member pcb_rw
+member pcb_sp
+member pcb_pc
+member PCB_LASTCALL lastcall
define PCB_SIZE sizeof(struct pcb)
-
# trapframe64 fields
-define TF_TSTATE offsetof(struct trapframe64, tf_tstate)
-define TF_PC offsetof(struct trapframe64, tf_pc)
-define TF_NPC offsetof(struct trapframe64, tf_npc)
-define TF_FAULT offsetof(struct trapframe64, tf_fault)
-define TF_KSTACK offsetof(struct trapframe64, tf_kstack)
-define TF_Y offsetof(struct trapframe64, tf_y)
-define TF_PIL offsetof(struct trapframe64, tf_pil)
-define TF_OLDPIL offsetof(struct trapframe64, tf_oldpil)
-define TF_TT offsetof(struct trapframe64, tf_tt)
-define TF_GLOBAL offsetof(struct trapframe64, tf_global)
-define TF_OUT offsetof(struct trapframe64, tf_out)
-define TF_LOCAL offsetof(struct trapframe64, tf_local)
-define TF_IN offsetof(struct trapframe64, tf_in)
+struct trapframe64
+member tf_tstate
+member tf_pc
+member tf_npc
+member tf_fault
+member tf_kstack
+member tf_y
+member tf_pil
+member tf_oldpil
+member tf_tt
+member tf_global
+member tf_out
+member tf_local
+member tf_in
# shortened versions
-define TF_G offsetof(struct trapframe64, tf_global)
-define TF_O offsetof(struct trapframe64, tf_out)
-define TF_L offsetof(struct trapframe64, tf_local)
-define TF_I offsetof(struct trapframe64, tf_in)
+member TF_G tf_global
+member TF_O tf_out
+member TF_L tf_local
+member TF_I tf_in
define TF_SIZE sizeof(struct trapframe64)
ifdef notyet
# clockframe fields
-define CF_TSTATE offsetof(struct clockframe, tstate)
-define CF_PC offsetof(struct clockframe, pc)
-define CF_NPC offsetof(struct clockframe, npc)
-define CF_PIL offsetof(struct clockframe, pil)
-define CF_OLDPIL offsetof(struct clockframe, oldpil)
-define CF_FP offsetof(struct clockframe, fp)
+struct clockframe CF_
+member tstate
+member pc
+member npc
+member pil
+member oldpil
+member fp
endif
# interrupt handler fields
-define IH_FUN offsetof(struct intrhand, ih_fun)
-define IH_ARG offsetof(struct intrhand, ih_arg)
-define IH_NUMBER offsetof(struct intrhand, ih_number)
-define IH_PIL offsetof(struct intrhand, ih_pil)
-define IH_PEND offsetof(struct intrhand, ih_pending)
-define IH_NEXT offsetof(struct intrhand, ih_next)
-define IH_MAP offsetof(struct intrhand, ih_map)
-define IH_CLR offsetof(struct intrhand, ih_clr)
+struct intrhand
+member ih_fun
+member ih_arg
+member ih_number
+member ih_pil
+member IH_PEND ih_pending
+member ih_next
+member ih_map
+member ih_clr
# mbuf fields of import
-define M_NEXT offsetof(struct mbuf, m_next)
-define M_DATA offsetof(struct mbuf, m_data)
-define M_LEN offsetof(struct mbuf, m_len)
+struct mbuf
+member m_next
+member m_data
+member m_len
ifdef notyet
# floppy trap handler fields
-define FDC_REG_MSR offsetof(struct fdcio, fdcio_reg_msr)
-define FDC_REG_FIFO offsetof(struct fdcio, fdcio_reg_fifo)
-define FDC_ISTATE offsetof(struct fdcio, fdcio_istate)
-define FDC_STATUS offsetof(struct fdcio, fdcio_status)
-define FDC_NSTAT offsetof(struct fdcio, fdcio_nstat)
-define FDC_DATA offsetof(struct fdcio, fdcio_data)
-define FDC_TC offsetof(struct fdcio, fdcio_tc)
-define FDC_EVCNT offsetof(struct fdcio, fdcio_intrcnt.ev_count)
+struct fdcio
+member FDC_REG_MSR fdcio_reg_msr
+member FDC_REG_FIFO fdcio_reg_fifo
+member FDC_ISTATE fdcio_istate
+member FDC_STATUS fdcio_status
+member FDC_NSTAT fdcio_nstat
+member FDC_DATA fdcio_data
+member FDC_TC fdcio_tc
+member FDC_EVCNT fdcio_intrcnt.ev_count
endif
ifdef notyet
# db_regs structure so we can save all registers
-define DBR_TRAPS offsetof(struct db_regs, dbr_traps)
-define DBR_Y offsetof(struct db_regs, dbr_y)
-define DBR_TL offsetof(struct db_regs, dbr_tl)
-define DBR_CANRESTORE offsetof(struct db_regs, dbr_canrestore)
-define DBR_CANSAVE offsetof(struct db_regs, dbr_cansave)
-define DBR_CLEANWIN offsetof(struct db_regs, dbr_cleanwin)
-define DBR_CWP offsetof(struct db_regs, dbr_cwp)
-define DBR_WSTATE offsetof(struct db_regs, dbr_wstate)
-define DBR_G offsetof(struct db_regs, dbr_g)
-define DBR_AG offsetof(struct db_regs, dbr_ag)
-define DBR_IG offsetof(struct db_regs, dbr_ig)
-define DBR_MG offsetof(struct db_regs, dbr_mg)
-define DBR_OUT offsetof(struct db_regs, dbr_out)
-define DBR_LOCAL offsetof(struct db_regs, dbr_local)
-define DBR_IN offsetof(struct db_regs, dbr_in)
+struct db_regs
+member dbr_traps
+member dbr_y
+member dbr_tl
+member dbr_canrestore
+member dbr_cansave
+member dbr_cleanwin
+member dbr_cwp
+member dbr_wstate
+member dbr_g
+member dbr_ag
+member dbr_ig
+member dbr_mg
+member dbr_out
+member dbr_local
+member dbr_in
endif
ifdef COMPAT_NETBSD
-define NETBSD_SYS___sigreturn14 NETBSD_SYS___sigreturn14
-define NETBSD_SYS_exit NETBSD_SYS_exit
+export NETBSD_SYS___sigreturn14
+export NETBSD_SYS_exit
endif
-
diff --git a/sys/arch/sun3/sun3/genassym.cf b/sys/arch/sun3/sun3/genassym.cf
index 5e9247503e0..ac1bd5ebc78 100644
--- a/sys/arch/sun3/sun3/genassym.cf
+++ b/sys/arch/sun3/sun3/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.5 2001/08/31 00:37:20 miod Exp $
+# $OpenBSD: genassym.cf,v 1.6 2001/09/16 14:28:04 miod Exp $
# $NetBSD: genassym.c,v 1.32 1996/10/23 16:39:27 gwr Exp $
#
@@ -64,65 +64,68 @@ include <sun3/sun3/interreg.h>
include <sun3/sun3/buserr.h>
# general constants
-define NBSG NBSG
-define KERNBASE KERNBASE
-define USPACE USPACE
-define USRSTACK USRSTACK
+export NBSG
+export KERNBASE
+export USPACE
+export USRSTACK
# intersil clock internals
-define IREG_CLOCK_ENAB_5 IREG_CLOCK_ENAB_5
+export IREG_CLOCK_ENAB_5
define INTERSIL_INTR_OFFSET offsetof(struct intersil7170, clk_intr_reg)
-define INTERSIL_INTER_CSECONDS INTERSIL_INTER_CSECONDS
+export INTERSIL_INTER_CSECONDS
# bus error
-define BUSERR_REG BUSERR_REG
-define BUSERR_MMU BUSERR_MMU
+export BUSERR_REG
+export BUSERR_MMU
# PSL values
-define PSL_S PSL_S
-define PSL_IPL7 PSL_IPL7
-define PSL_LOWIPL PSL_LOWIPL
-define PSL_USER PSL_USER
+export PSL_S
+export PSL_IPL7
+export PSL_LOWIPL
+export PSL_USER
# magic
-define FC_CONTROL FC_CONTROL
-define FC_SUPERD FC_SUPERD
-define IC_CLEAR IC_CLEAR
+export FC_CONTROL
+export FC_SUPERD
+export IC_CLEAR
# sun3 control space
-define CONTEXT_0 CONTEXT_0
-define CONTEXT_REG CONTEXT_REG
-define CONTEXT_NUM CONTEXT_NUM
-define SYSTEM_ENAB SYSTEM_ENAB
-define SYSTEM_ENAB_FPP SYSTEM_ENAB_FPP
-define SEGMAP_BASE SEGMAP_BASE
+export CONTEXT_0
+export CONTEXT_REG
+export CONTEXT_NUM
+export SYSTEM_ENAB
+export SYSTEM_ENAB_FPP
+export SEGMAP_BASE
# sun3 memory map
-define DVMA_SPACE_START DVMA_SPACE_START
-define MONSTART MONSTART
-define PROM_BASE PROM_BASE
+export DVMA_SPACE_START
+export MONSTART
+export PROM_BASE
# proc fields and values
-define P_VMSPACE offsetof(struct proc, p_vmspace)
-define P_ADDR offsetof(struct proc, p_addr)
-define P_FLAG offsetof(struct proc, p_flag)
-define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
-define P_MD_REGS offsetof(struct proc, p_md.md_regs)
+struct proc
+member p_vmspace
+member p_addr
+member p_flag
+member P_MD_FLAGS p_md.md_flags
+member P_MD_REGS p_md.md_regs
# VM structure fields
define VM_PMAP offsetof(struct vmspace, vm_map.pmap)
# pcb fields
-define PCB_FLAGS offsetof(struct pcb, pcb_flags)
-define PCB_PS offsetof(struct pcb, pcb_ps)
-define PCB_USP offsetof(struct pcb, pcb_usp)
-define PCB_REGS offsetof(struct pcb, pcb_regs)
-define PCB_FPCTX offsetof(struct pcb, pcb_fpregs)
+struct pcb
+member pcb_flags
+member pcb_ps
+member pcb_usp
+member pcb_regs
+member PCB_FPCTX pcb_fpregs
define SIZEOF_PCB sizeof(struct pcb)
# exception frame size
-define CFSIZE CFSIZE
+export CFSIZE
# FP frame offset
-define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
-define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
+struct fpframe
+member FPF_REGS fpf_regs[0]
+member fpf_fpcr
diff --git a/sys/arch/vax/vax/genassym.cf b/sys/arch/vax/vax/genassym.cf
index 888629311e0..9c8daf1ed81 100644
--- a/sys/arch/vax/vax/genassym.cf
+++ b/sys/arch/vax/vax/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.2 2001/08/25 13:33:37 hugh Exp $
+# $OpenBSD: genassym.cf,v 1.3 2001/09/16 14:28:04 miod Exp $
# $NetBSD: genassym.cf,v 1.10 1999/11/19 22:09:55 ragge Exp $
#
# Copyright (c) 1997 Ludd, University of Lule}, Sweden.
@@ -31,7 +31,6 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-
include <sys/param.h>
include <sys/proc.h>
include <sys/errno.h>
@@ -45,75 +44,79 @@ include <machine/sid.h>
include <machine/trap.h>
include <machine/cpu.h>
-define P_PRIORITY offsetof(struct proc, p_priority)
-define P_ADDR offsetof(struct proc, p_addr)
-define P_VMSPACE offsetof(struct proc, p_vmspace)
+struct proc
+member p_priority
+member p_addr
+member p_vmspace
-define P0BR offsetof(struct pcb, P0BR)
-define P0LR offsetof(struct pcb, P0LR)
-define P1BR offsetof(struct pcb, P1BR)
-define P1LR offsetof(struct pcb, P1LR)
-define IFTRAP offsetof(struct pcb, iftrap)
+struct pcb
+member P0BR
+member P0LR
+member P1BR
+member P1LR
+member iftrap
-define MCHK offsetof(struct cpu_dep, cpu_mchk)
-define MEMERR offsetof(struct cpu_dep, cpu_memerr)
+struct cpu_dep
+member MCHK cpu_mchk
+member MEMERR cpu_memerr
-define KERNBASE KERNBASE
+export KERNBASE
# mtpr register numbers
-define PR_KSP PR_KSP
-define PR_USP PR_USP
-define PR_ICCS PR_ICCS
-define PR_PCBB PR_PCBB
-define PR_IPL PR_IPL
-define PR_SBIFS PR_SBIFS
-define PR_EHSR PR_EHSR
-define PR_MCESR PR_MCESR
-define PR_P0BR PR_P0BR
-define PR_P1BR PR_P1BR
-define PR_P0LR PR_P0LR
-define PR_P1LR PR_P1LR
-define PR_SCBB PR_SCBB
+export PR_KSP
+export PR_USP
+export PR_ICCS
+export PR_PCBB
+export PR_IPL
+export PR_SBIFS
+export PR_EHSR
+export PR_MCESR
+export PR_P0BR
+export PR_P1BR
+export PR_P0LR
+export PR_P1LR
+export PR_SCBB
# trap numbering
-define T_KSPNOTVAL T_KSPNOTVAL
-define T_PRIVINFLT T_PRIVINFLT
-define T_XFCFLT T_XFCFLT
-define T_RESOPFLT T_RESOPFLT
-define T_RESADFLT T_RESADFLT
-define T_TRANSFLT T_TRANSFLT
-define T_PTEFETCH T_PTEFETCH
-define T_WRITE T_WRITE
-define T_ACCFLT T_ACCFLT
-define T_PTELEN T_PTELEN
-define T_TRCTRAP T_TRCTRAP
-define T_BPTFLT T_BPTFLT
-define T_ARITHFLT T_ARITHFLT
-define T_SYSCALL T_SYSCALL
-define T_ASTFLT T_ASTFLT
-define T_KDBTRAP T_KDBTRAP
+export T_KSPNOTVAL
+export T_PRIVINFLT
+export T_XFCFLT
+export T_RESOPFLT
+export T_RESADFLT
+export T_TRANSFLT
+export T_PTEFETCH
+export T_WRITE
+export T_ACCFLT
+export T_PTELEN
+export T_TRCTRAP
+export T_BPTFLT
+export T_ARITHFLT
+export T_SYSCALL
+export T_ASTFLT
+export T_KDBTRAP
# software net interrupts
-define NETISR_IP NETISR_IP
-define NETISR_ARP NETISR_ARP
-define NETISR_NS NETISR_NS
-define NETISR_ATALK NETISR_ATALK
-define NETISR_ISO NETISR_ISO
-define NETISR_CCITT NETISR_CCITT
-define NETISR_PPP NETISR_PPP
-define NETISR_IPV6 NETISR_IPV6
-define NETISR_BRIDGE NETISR_BRIDGE
-
-define USPACE USPACE
-
-define ENAMETOOLONG ENAMETOOLONG
-
-define EV_COUNT offsetof(struct evcnt, ev_count)
-
-define SYS_sigreturn SYS_sigreturn
-define SYS_exit SYS_exit
-
-define VAX_TYP_UV2 VAX_TYP_UV2
-define VAX_TYP_8SS VAX_TYP_8SS
-define VAX_BTYP_46 VAX_BTYP_46
-define VAX_BTYP_48 VAX_BTYP_48
+export NETISR_IP
+export NETISR_ARP
+export NETISR_NS
+export NETISR_ATALK
+export NETISR_ISO
+export NETISR_CCITT
+export NETISR_PPP
+export NETISR_IPV6
+export NETISR_BRIDGE
+
+export USPACE
+
+export ENAMETOOLONG
+
+struct evcnt
+member ev_count
+
+export SYS_sigreturn
+export SYS_exit
+
+export VAX_TYP_UV2
+export VAX_TYP_8SS
+export VAX_BTYP_46
+export VAX_BTYP_48