linux/arch/um/include/sysdep-x86_64/sc.h
Al Viro ecba97d4aa [PATCH] uml makefiles sanitized
UML makefiles sanitized:
 - number of generated headers reduced to 2 (from user-offsets.c and
   kernel-offsets.c resp.).  The rest is made constant and simply
   includes those two.
 - mk_... helpers are gone now that we don't need to generate these
   headers
 - arch/um/include2 removed since everything under arch/um/include/sysdep
   is constant now and symlink can point straight to source tree.
 - dependencies seriously simplified.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29 08:46:26 -07:00

46 lines
1.4 KiB
C

#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