Al Viro | ecba97d | 2005-09-28 22:27:23 +0100 | [diff] [blame] | 1 | #ifndef __SYSDEP_X86_64_SC_H |
| 2 | #define __SYSDEP_X86_64_SC_H |
| 3 | |
| 4 | /* Copyright (C) 2003 - 2004 PathScale, Inc |
| 5 | * Released under the GPL |
| 6 | */ |
| 7 | |
| 8 | #include <user_constants.h> |
| 9 | |
| 10 | #define SC_OFFSET(sc, field) \ |
| 11 | *((unsigned long *) &(((char *) (sc))[HOST_##field])) |
| 12 | |
| 13 | #define SC_RBX(sc) SC_OFFSET(sc, SC_RBX) |
| 14 | #define SC_RCX(sc) SC_OFFSET(sc, SC_RCX) |
| 15 | #define SC_RDX(sc) SC_OFFSET(sc, SC_RDX) |
| 16 | #define SC_RSI(sc) SC_OFFSET(sc, SC_RSI) |
| 17 | #define SC_RDI(sc) SC_OFFSET(sc, SC_RDI) |
| 18 | #define SC_RBP(sc) SC_OFFSET(sc, SC_RBP) |
| 19 | #define SC_RAX(sc) SC_OFFSET(sc, SC_RAX) |
| 20 | #define SC_R8(sc) SC_OFFSET(sc, SC_R8) |
| 21 | #define SC_R9(sc) SC_OFFSET(sc, SC_R9) |
| 22 | #define SC_R10(sc) SC_OFFSET(sc, SC_R10) |
| 23 | #define SC_R11(sc) SC_OFFSET(sc, SC_R11) |
| 24 | #define SC_R12(sc) SC_OFFSET(sc, SC_R12) |
| 25 | #define SC_R13(sc) SC_OFFSET(sc, SC_R13) |
| 26 | #define SC_R14(sc) SC_OFFSET(sc, SC_R14) |
| 27 | #define SC_R15(sc) SC_OFFSET(sc, SC_R15) |
| 28 | #define SC_IP(sc) SC_OFFSET(sc, SC_IP) |
| 29 | #define SC_SP(sc) SC_OFFSET(sc, SC_SP) |
| 30 | #define SC_CR2(sc) SC_OFFSET(sc, SC_CR2) |
| 31 | #define SC_ERR(sc) SC_OFFSET(sc, SC_ERR) |
| 32 | #define SC_TRAPNO(sc) SC_OFFSET(sc, SC_TRAPNO) |
| 33 | #define SC_CS(sc) SC_OFFSET(sc, SC_CS) |
| 34 | #define SC_FS(sc) SC_OFFSET(sc, SC_FS) |
| 35 | #define SC_GS(sc) SC_OFFSET(sc, SC_GS) |
| 36 | #define SC_EFLAGS(sc) SC_OFFSET(sc, SC_EFLAGS) |
| 37 | #define SC_SIGMASK(sc) SC_OFFSET(sc, SC_SIGMASK) |
Jeff Dike | a8b4fc4 | 2006-09-27 01:50:35 -0700 | [diff] [blame] | 38 | #define SC_SS(sc) SC_OFFSET(sc, SC_SS) |
Al Viro | ecba97d | 2005-09-28 22:27:23 +0100 | [diff] [blame] | 39 | #if 0 |
| 40 | #define SC_ORIG_RAX(sc) SC_OFFSET(sc, SC_ORIG_RAX) |
| 41 | #define SC_DS(sc) SC_OFFSET(sc, SC_DS) |
| 42 | #define SC_ES(sc) SC_OFFSET(sc, SC_ES) |
Al Viro | ecba97d | 2005-09-28 22:27:23 +0100 | [diff] [blame] | 43 | #endif |
| 44 | |
| 45 | #endif |