summaryrefslogtreecommitdiff
path: root/arch/um/include/sysdep-x86_64/sc.h
blob: a160d9fcc59621b2bc04593df8059f9133a89576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef __SYSDEP_X86_64_SC_H
#define __SYSDEP_X86_64_SC_H

/* Copyright (C) 2003 - 2004 PathScale, Inc
 * Released under the GPL
 */

#include <user_constants.h>

#define SC_OFFSET(sc, field) \
	 *((unsigned long *) &(((char *) (sc))[HOST_##field]))

#define SC_RBX(sc) SC_OFFSET(sc, SC_RBX)
#define SC_RCX(sc) SC_OFFSET(sc, SC_RCX)
#define SC_RDX(sc) SC_OFFSET(sc, SC_RDX)
#define SC_RSI(sc) SC_OFFSET(sc, SC_RSI)
#define SC_RDI(sc) SC_OFFSET(sc, SC_RDI)
#define SC_RBP(sc) SC_OFFSET(sc, SC_RBP)
#define SC_RAX(sc) SC_OFFSET(sc, SC_RAX)
#define SC_R8(sc) SC_OFFSET(sc, SC_R8)
#define SC_R9(sc) SC_OFFSET(sc, SC_R9)
#define SC_R10(sc) SC_OFFSET(sc, SC_R10)
#define SC_R11(sc) SC_OFFSET(sc, SC_R11)
#define SC_R12(sc) SC_OFFSET(sc, SC_R12)
#define SC_R13(sc) SC_OFFSET(sc, SC_R13)
#define SC_R14(sc) SC_OFFSET(sc, SC_R14)
#define SC_R15(sc) SC_OFFSET(sc, SC_R15)
#define SC_IP(sc) SC_OFFSET(sc, SC_IP)
#define SC_SP(sc) SC_OFFSET(sc, SC_SP)
#define SC_CR2(sc) SC_OFFSET(sc, SC_CR2)
#define SC_ERR(sc) SC_OFFSET(sc, SC_ERR)
#define SC_TRAPNO(sc) SC_OFFSET(sc, SC_TRAPNO)
#define SC_CS(sc) SC_OFFSET(sc, SC_CS)
#define SC_FS(sc) SC_OFFSET(sc, SC_FS)
#define SC_GS(sc) SC_OFFSET(sc, SC_GS)
#define SC_EFLAGS(sc) SC_OFFSET(sc, SC_EFLAGS)
#define SC_SIGMASK(sc) SC_OFFSET(sc, SC_SIGMASK)
#if 0
#define SC_ORIG_RAX(sc) SC_OFFSET(sc, SC_ORIG_RAX)
#define SC_DS(sc) SC_OFFSET(sc, SC_DS)
#define SC_ES(sc) SC_OFFSET(sc, SC_ES)
#define SC_SS(sc) SC_OFFSET(sc, SC_SS)
#endif

#endif