2003-01-22 16:52:48 +03:00
|
|
|
# $NetBSD: genassym.cf,v 1.3 2003/01/22 13:52:48 scw Exp $
|
2003-01-21 03:34:56 +03:00
|
|
|
|
|
|
|
# Copyright (c) 2001 The NetBSD Foundation, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
# by Nathan J. Williams and Steve C. Woodford.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
# 3. All advertising materials mentioning features or use of this software
|
|
|
|
# must display the following acknowledgement:
|
|
|
|
# This product includes software developed by the NetBSD
|
|
|
|
# Foundation, Inc. and its contributors.
|
|
|
|
# 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived
|
|
|
|
# from this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# 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 <ucontext.h>
|
|
|
|
include <sys/queue.h>
|
|
|
|
include <sh5/conreg.h>
|
|
|
|
include "pthread.h"
|
|
|
|
include "pthread_int.h"
|
|
|
|
include "pthread_md.h"
|
|
|
|
|
|
|
|
define PT_NEXT offsetof(struct pthread_st, pt_next)
|
|
|
|
define PT_STATE offsetof(struct pthread_st, pt_state)
|
|
|
|
define PT_SWITCHTO offsetof(struct pthread_st, pt_switchto)
|
|
|
|
define PT_SWITCHTOUC offsetof(struct pthread_st, pt_switchtouc)
|
|
|
|
define PT_SLEEPUC offsetof(struct pthread_st, pt_sleepuc)
|
|
|
|
define PT_SPINLOCKS offsetof(struct pthread_st, pt_spinlocks)
|
|
|
|
define PT_HELDLOCK offsetof(struct pthread_st, pt_heldlock)
|
|
|
|
define PT_UC offsetof(struct pthread_st, pt_uc)
|
|
|
|
|
|
|
|
define UC_FLAGS offsetof(ucontext_t, uc_flags)
|
|
|
|
define UC_REGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC])
|
|
|
|
define UC_REGS_SP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_SP])
|
|
|
|
define UC_REGS_USR offsetof(ucontext_t, uc_mcontext.__gregs[_REG_USR])
|
2003-01-22 16:52:48 +03:00
|
|
|
define UC_REGS_R2 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(2)])
|
2003-01-21 03:34:56 +03:00
|
|
|
define UC_REGS_R10 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(10)])
|
|
|
|
define UC_REGS_R11 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(11)])
|
|
|
|
define UC_REGS_R12 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(12)])
|
|
|
|
define UC_REGS_R13 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(13)])
|
|
|
|
define UC_REGS_R14 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(14)])
|
2003-01-22 16:52:48 +03:00
|
|
|
define UC_REGS_R18 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(18)])
|
2003-01-21 03:34:56 +03:00
|
|
|
define UC_REGS_R26 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(26)])
|
|
|
|
define UC_REGS_R27 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(27)])
|
|
|
|
define UC_REGS_R28 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(28)])
|
|
|
|
define UC_REGS_R29 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(29)])
|
|
|
|
define UC_REGS_R30 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(30)])
|
|
|
|
define UC_REGS_R31 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(31)])
|
|
|
|
define UC_REGS_R32 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(32)])
|
|
|
|
define UC_REGS_R33 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(33)])
|
|
|
|
define UC_REGS_R34 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(34)])
|
|
|
|
define UC_REGS_R35 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(35)])
|
|
|
|
define UC_REGS_R44 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(44)])
|
|
|
|
define UC_REGS_R45 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(45)])
|
|
|
|
define UC_REGS_R46 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(46)])
|
|
|
|
define UC_REGS_R47 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(47)])
|
|
|
|
define UC_REGS_R48 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(48)])
|
|
|
|
define UC_REGS_R49 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(49)])
|
|
|
|
define UC_REGS_R50 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(50)])
|
|
|
|
define UC_REGS_R51 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(51)])
|
|
|
|
define UC_REGS_R52 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(52)])
|
|
|
|
define UC_REGS_R53 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(53)])
|
|
|
|
define UC_REGS_R54 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(54)])
|
|
|
|
define UC_REGS_R55 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(55)])
|
|
|
|
define UC_REGS_R56 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(56)])
|
|
|
|
define UC_REGS_R57 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(57)])
|
|
|
|
define UC_REGS_R58 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(58)])
|
|
|
|
define UC_REGS_R59 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R(59)])
|
|
|
|
define UC_REGS_TR5 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_TR(5)])
|
|
|
|
define UC_REGS_TR6 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_TR(6)])
|
|
|
|
define UC_REGS_TR7 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_TR(7)])
|
|
|
|
define UC_FPREGS_FPSCR offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_scr)
|
|
|
|
define UC_FPREGS_DR12 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[6])
|
|
|
|
define UC_FPREGS_DR14 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[7])
|
|
|
|
define UC_FPREGS_DR36 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[18])
|
|
|
|
define UC_FPREGS_DR38 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[19])
|
|
|
|
define UC_FPREGS_DR40 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[20])
|
|
|
|
define UC_FPREGS_DR42 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[21])
|
|
|
|
define UC_FPREGS_DR44 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[22])
|
|
|
|
define UC_FPREGS_DR46 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[23])
|
|
|
|
define UC_FPREGS_DR48 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[24])
|
|
|
|
define UC_FPREGS_DR50 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[25])
|
|
|
|
define UC_FPREGS_DR52 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[26])
|
|
|
|
define UC_FPREGS_DR54 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[27])
|
|
|
|
define UC_FPREGS_DR56 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[28])
|
|
|
|
define UC_FPREGS_DR58 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[29])
|
|
|
|
define UC_FPREGS_DR60 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[30])
|
|
|
|
define UC_FPREGS_DR62 offsetof(ucontext_t, uc_mcontext.__fpregs.__fp_double[31])
|
|
|
|
|
|
|
|
define PT_STATE_RECYCLABLE PT_STATE_RECYCLABLE
|
|
|
|
define RND_CTXSIZE ((sizeof(ucontext_t) + 7) & ~7)
|
|
|
|
define STACKSPACE STACKSPACE
|
|
|
|
|
|
|
|
define _UC_CPU _UC_CPU
|
|
|
|
define _UC_FPU _UC_FPU
|
|
|
|
define _UC_USER _UC_USER
|
2003-01-21 14:30:52 +03:00
|
|
|
define _UC_USER_BIT _UC_USER_BIT
|
2003-01-21 03:34:56 +03:00
|
|
|
|
|
|
|
define SH5_CONREG_USR_FPRS_SHIFT SH5_CONREG_USR_FPRS_SHIFT
|
|
|
|
define SH5_CONREG_USR_FPRS_MASK SH5_CONREG_USR_FPRS_MASK
|
|
|
|
|