summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-02-14 15:34:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-02-14 15:34:32 +0000
commit1fdf7775baccb2e4f80a02102c20333bbd5f43a4 (patch)
tree3a6c07387343219c408394fee77d2a13c79500f7 /sys
parentada8886100a78040c259db734cf7818b49c81fdc (diff)
Use as much syntaxic sugar from genassym.sh to make this file more readable.
ok drahn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/arm/genassym.cf179
1 files changed, 97 insertions, 82 deletions
diff --git a/sys/arch/arm/arm/genassym.cf b/sys/arch/arm/arm/genassym.cf
index 0a4dff53536..6803c524393 100644
--- a/sys/arch/arm/arm/genassym.cf
+++ b/sys/arch/arm/arm/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.1 2004/02/01 05:09:48 drahn Exp $
+# $OpenBSD: genassym.cf,v 1.2 2004/02/14 15:34:31 miod Exp $
# $NetBSD: genassym.cf,v 1.27 2003/11/04 10:33:16 dsl Exp$
# Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -65,104 +65,119 @@ ifdef __ARM_FIQ_INDIRECT
define __ARM_FIQ_INDIRECT 1
endif
-define VM_MIN_ADDRESS VM_MIN_ADDRESS
-define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS
+export VM_MIN_ADDRESS
+export VM_MAXUSER_ADDRESS
-define DOMAIN_CLIENT DOMAIN_CLIENT
-define PMAP_DOMAIN_KERNEL PMAP_DOMAIN_KERNEL
+export DOMAIN_CLIENT
+export PMAP_DOMAIN_KERNEL
ifdef PMAP_INCLUDE_PTE_SYNC
define PMAP_INCLUDE_PTE_SYNC 1
endif
-define PAGE_SIZE PAGE_SIZE
-define UPAGES UPAGES
-define PAGE_SHIFT PAGE_SHIFT
+export PAGE_SIZE
+export UPAGES
+export PAGE_SHIFT
# Important offsets into the lwp and proc structs & associated constants
-define P_TRACED P_TRACED
-define P_PROFIL P_PROFIL
-
-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_PRIORITY offsetof(struct proc, p_priority)
-define P_WCHAN offsetof(struct proc, p_wchan)
-define P_STAT offsetof(struct proc, p_stat)
-
-define PCB_TF offsetof(struct pcb, pcb_tf)
-define PCB_PAGEDIR offsetof(struct pcb, pcb_pagedir)
-define PCB_PL1VEC offsetof(struct pcb, pcb_pl1vec)
-define PCB_L1VEC offsetof(struct pcb, pcb_l1vec)
-define PCB_DACR offsetof(struct pcb, pcb_dacr)
-define PCB_CSTATE offsetof(struct pcb, pcb_cstate)
-define PCB_FLAGS offsetof(struct pcb, pcb_flags)
-define PCB_R8 offsetof(struct pcb, pcb_un.un_32.pcb32_r8)
-define PCB_R9 offsetof(struct pcb, pcb_un.un_32.pcb32_r9)
-define PCB_R10 offsetof(struct pcb, pcb_un.un_32.pcb32_r10)
-define PCB_R11 offsetof(struct pcb, pcb_un.un_32.pcb32_r11)
-define PCB_R12 offsetof(struct pcb, pcb_un.un_32.pcb32_r12)
-define PCB_SP offsetof(struct pcb, pcb_un.un_32.pcb32_sp)
-define PCB_LR offsetof(struct pcb, pcb_un.un_32.pcb32_lr)
-define PCB_PC offsetof(struct pcb, pcb_un.un_32.pcb32_pc)
-define PCB_UND_SP offsetof(struct pcb, pcb_un.un_32.pcb32_und_sp)
-define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
-define PCB_NOALIGNFLT PCB_NOALIGNFLT
+export P_TRACED
+export P_PROFIL
+
+struct proc
+member p_forw
+member p_back
+member p_addr
+member p_priority
+member p_wchan
+member p_stat
+# XXX use PROC_SIZEOF in new code whenever possible
+define PROCSIZE sizeof(struct proc)
+struct pcb
+member pcb_tf
+member pcb_pagedir
+member pcb_pl1vec
+member pcb_l1vec
+member pcb_dacr
+member pcb_cstate
+member pcb_flags
+member PCB_R8 pcb_un.un_32.pcb32_r8
+member PCB_R9 pcb_un.un_32.pcb32_r9
+member PCB_R10 pcb_un.un_32.pcb32_r10
+member PCB_R11 pcb_un.un_32.pcb32_r11
+member PCB_R12 pcb_un.un_32.pcb32_r12
+member PCB_SP pcb_un.un_32.pcb32_sp
+member PCB_LR pcb_un.un_32.pcb32_lr
+member PCB_PC pcb_un.un_32.pcb32_pc
+member PCB_UND_SP pcb_un.un_32.pcb32_und_sp
+member pcb_onfault
+export PCB_NOALIGNFLT
+# XXX use USER_SIZEOF in new code whenever possible
define USER_SIZE sizeof(struct user)
-define V_TRAP offsetof(struct uvmexp, traps)
-define V_INTR offsetof(struct uvmexp, intrs)
-define V_SOFT offsetof(struct uvmexp, softs)
-
-define VM_MAP offsetof(struct vmspace, vm_map)
-define VM_PMAP offsetof(struct vmspace, vm_map.pmap)
-
-define CS_TLB_ID offsetof(union pmap_cache_state, cs_tlb_id)
-define CS_TLB_D offsetof(union pmap_cache_state, cs_tlb_d)
-define CS_TLB offsetof(union pmap_cache_state, cs_tlb)
-define CS_CACHE_ID offsetof(union pmap_cache_state, cs_cache_id)
-define CS_CACHE_D offsetof(union pmap_cache_state, cs_cache_d)
-define CS_CACHE offsetof(union pmap_cache_state, cs_cache)
-define CS_ALL offsetof(union pmap_cache_state, cs_all)
-define PMAP_CSTATE offsetof(struct pmap, pm_cstate)
-
-define PR_BASE offsetof(struct uprof, pr_base)
-define PR_SIZE offsetof(struct uprof, pr_size)
-define PR_OFF offsetof(struct uprof, pr_off)
-define PR_SCALE offsetof(struct uprof, pr_scale)
-
-define SIGTRAP SIGTRAP
-define SIGEMT SIGEMT
-
-define SIGF_SC offsetof(struct sigframe, sf_sc)
-
-define TF_R0 offsetof(struct trapframe, tf_r0)
-define TF_R10 offsetof(struct trapframe, tf_r10)
-define TF_PC offsetof(struct trapframe, tf_pc)
-
-define PROCSIZE sizeof(struct proc)
+struct uvmexp
+member V_TRAP traps
+member V_INTR intrs
+member V_SOFT softs
+
+struct vmspace
+member vm_map
+member VM_PMAP vm_map.pmap
+
+union pmap_cache_state
+member cs_tlb_id
+member cs_tlb_d
+member cs_tlb
+member cs_cache_id
+member cs_cache_d
+member cs_cache
+member cs_all
+
+struct pmap
+member PMAP_CSTATE pm_cstate
+
+struct uprof
+member pr_base
+member pr_size
+member pr_off
+member pr_scale
+
+export SIGTRAP
+export SIGEMT
+
+struct sigframe
+member SIGF_SC sf_sc
+
+struct trapframe
+member tf_r0
+member tf_r10
+member tf_pc
+# XXX use TRAFRAME_SIZEOF in new code whenever possible
define TRAPFRAMESIZE sizeof(struct trapframe)
-define CF_IDCACHE_WBINV_ALL offsetof(struct cpu_functions, cf_idcache_wbinv_all)
-define CF_DCACHE_WB_RANGE offsetof(struct cpu_functions, cf_dcache_wb_range)
-define CF_TLB_FLUSHID_SE offsetof(struct cpu_functions, cf_tlb_flushID_SE)
-define CF_CONTEXT_SWITCH offsetof(struct cpu_functions, cf_context_switch)
-define CF_SLEEP offsetof(struct cpu_functions, cf_sleep)
-define CF_CONTROL offsetof(struct cpu_functions, cf_control)
+struct cpu_functions
+member cf_idcache_wbinv_all
+member cf_dcache_wb_range
+member cf_tlb_flushID_SE
+member cf_context_switch
+member cf_sleep
+member cf_control
-#define CI_CURPRIORITY offsetof(struct cpu_info, ci_schedstate.spc_curpriority)
+struct cpu_info
+#member CI_CURPRIORITY ci_schedstate.spc_curpriority
ifdef MULTIPROCESSOR
-define CI_CURLWP offsetof(struct cpu_info, ci_curlwp)
-define CI_CURPCB offsetof(struct cpu_info, ci_curpcb)
+member ci_curlwp
+member ci_curpcb
endif
if defined(COMPAT_15) && defined(EXEC_AOUT)
-define CI_CTRL offsetof(struct cpu_info, ci_ctrl)
+member ci_ctrl
endif
# Constants required for in_cksum() and friends.
-define M_LEN offsetof(struct mbuf, m_len)
-define M_DATA offsetof(struct mbuf, m_data)
-define M_NEXT offsetof(struct mbuf, m_next)
-define IP_SRC offsetof(struct ip, ip_src)
-define IP_DST offsetof(struct ip, ip_dst)
+struct mbuf
+member m_len
+member m_data
+member m_next
+struct ip
+member ip_src
+member ip_dst