xref: /netbsd-src/lib/libc/arch/x86_64/genassym.cf (revision 5b3d48337baea2318d2d76d74991491e8bd360e8)
1*5b3d4833Skamil#	$NetBSD: genassym.cf,v 1.2 2020/10/12 21:33:46 kamil Exp $
2749e6dfcSkamil#
3749e6dfcSkamil# Copyright (c) 2020 The NetBSD Foundation, Inc.
4749e6dfcSkamil# All rights reserved.
5749e6dfcSkamil#
6749e6dfcSkamil# Redistribution and use in source and binary forms, with or without
7749e6dfcSkamil# modification, are permitted provided that the following conditions
8749e6dfcSkamil# are met:
9749e6dfcSkamil# 1. Redistributions of source code must retain the above copyright
10749e6dfcSkamil#    notice, this list of conditions and the following disclaimer.
11749e6dfcSkamil# 2. Redistributions in binary form must reproduce the above copyright
12749e6dfcSkamil#    notice, this list of conditions and the following disclaimer in the
13749e6dfcSkamil#    documentation and/or other materials provided with the distribution.
14749e6dfcSkamil#
15749e6dfcSkamil# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16749e6dfcSkamil# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17749e6dfcSkamil# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18749e6dfcSkamil# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19749e6dfcSkamil# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20749e6dfcSkamil# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21749e6dfcSkamil# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22749e6dfcSkamil# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23749e6dfcSkamil# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24749e6dfcSkamil# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25749e6dfcSkamil# POSSIBILITY OF SUCH DAMAGE.
26749e6dfcSkamil#
27749e6dfcSkamil
28749e6dfcSkamilinclude <ucontext.h>
29749e6dfcSkamil
30749e6dfcSkamildefine UC_GREGS_RAX offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RAX])
31749e6dfcSkamildefine UC_GREGS_RDX offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RDX])
32749e6dfcSkamildefine UC_GREGS_RCX offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RCX])
33749e6dfcSkamildefine UC_GREGS_RBX offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RBX])
34749e6dfcSkamildefine UC_GREGS_RSI offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RSI])
35749e6dfcSkamildefine UC_GREGS_RDI offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RDI])
36749e6dfcSkamildefine UC_GREGS_RBP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RBP])
37749e6dfcSkamildefine UC_GREGS_RSP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RSP])
38749e6dfcSkamildefine UC_GREGS_R8  offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R8])
39749e6dfcSkamildefine UC_GREGS_R9  offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R9])
40749e6dfcSkamildefine UC_GREGS_R10 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R10])
41749e6dfcSkamildefine UC_GREGS_R11 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R11])
42749e6dfcSkamildefine UC_GREGS_R12 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R12])
43749e6dfcSkamildefine UC_GREGS_R13 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R13])
44749e6dfcSkamildefine UC_GREGS_R14 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R14])
45749e6dfcSkamildefine UC_GREGS_R15 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R15])
46749e6dfcSkamildefine UC_GREGS_RIP offsetof(ucontext_t, uc_mcontext.__gregs[_REG_RIP])
47