NetBSD-5.0.2/sys/arch/sh3/sh3/genassym.cf

#	$NetBSD: genassym.cf,v 1.17 2008/06/01 01:43:20 uwe Exp $

#-
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

include <sys/param.h>
include <sys/proc.h>
include <sys/mbuf.h>
include <sys/user.h>
include <sys/errno.h>
include <uvm/uvm_extern.h>
include <sh3/vmparam.h>
include <sh3/pte.h>

define	CI_IDEPTH		offsetof(struct cpu_info, ci_idepth)

define	TF_SIZE			sizeof(struct trapframe)
define	TF_EXPEVT		offsetof(struct trapframe, tf_expevt)
define	TF_UBC			offsetof(struct trapframe, tf_ubc)
define	TF_SPC			offsetof(struct trapframe, tf_spc)
define	TF_SSR			offsetof(struct trapframe, tf_ssr)
define	TF_GBR			offsetof(struct trapframe, tf_gbr)
define	TF_MACL			offsetof(struct trapframe, tf_macl)
define	TF_MACH			offsetof(struct trapframe, tf_mach)
define	TF_PR			offsetof(struct trapframe, tf_pr)
define	TF_R14			offsetof(struct trapframe, tf_r14)
define	TF_R13			offsetof(struct trapframe, tf_r13)
define	TF_R12			offsetof(struct trapframe, tf_r12)
define	TF_R11			offsetof(struct trapframe, tf_r11)
define	TF_R10			offsetof(struct trapframe, tf_r10)
define	TF_R9			offsetof(struct trapframe, tf_r9)
define	TF_R8			offsetof(struct trapframe, tf_r8)
define	TF_R7			offsetof(struct trapframe, tf_r7)
define	TF_R6			offsetof(struct trapframe, tf_r6)
define	TF_R5			offsetof(struct trapframe, tf_r5)
define	TF_R4			offsetof(struct trapframe, tf_r4)
define	TF_R3			offsetof(struct trapframe, tf_r3)
define	TF_R2			offsetof(struct trapframe, tf_r2)
define	TF_R1			offsetof(struct trapframe, tf_r1)
define	TF_R0			offsetof(struct trapframe, tf_r0)
define	TF_R15			offsetof(struct trapframe, tf_r15)

define	SF_SIZE			sizeof(struct switchframe)
define	SF_GBR			offsetof(struct switchframe, sf_gbr)
define	SF_SR			offsetof(struct switchframe, sf_sr)
define	SF_R15			offsetof(struct switchframe, sf_r15)
define	SF_R14			offsetof(struct switchframe, sf_r14)
define	SF_R13			offsetof(struct switchframe, sf_r13)
define	SF_R12			offsetof(struct switchframe, sf_r12)
define	SF_R10			offsetof(struct switchframe, sf_r10)
define	SF_R9			offsetof(struct switchframe, sf_r9)
define	SF_R8			offsetof(struct switchframe, sf_r8)
define	SF_PR			offsetof(struct switchframe, sf_pr)
define	SF_R6_BANK		offsetof(struct switchframe, sf_r6_bank)
define	SF_R7_BANK		offsetof(struct switchframe, sf_r7_bank)

define	L_MD_UPTE		offsetof(struct lwp, l_md.md_upte)
define	L_MD_PCB		offsetof(struct lwp, l_md.md_pcb)

define	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
define	PCB_FAULTBAIL		offsetof(struct pcb, pcb_faultbail)

define	UVMEXP_INTRS		offsetof(struct uvmexp, intrs)

define	VM_MAXUSER_ADDRESS	VM_MAXUSER_ADDRESS
define	VM_MIN_KERNEL_ADDRESS	VM_MIN_KERNEL_ADDRESS

define	EFAULT			EFAULT
define	ENAMETOOLONG		ENAMETOOLONG

#
# in_cksum.S
#
define	M_DATA			offsetof(struct mbuf, m_data)
define	M_LEN			offsetof(struct mbuf, m_len)
define	M_NEXT			offsetof(struct mbuf, m_next)