1 /* 2 * These register names and offsets correspond to definitions in 3 * compiler/x86/vm.lisp. They map into accessors in the OS-dependent 4 * POSIX signal context structure os_context_t via the 5 * os_context_register_addr(..) OS-dependent function. 6 */ 7 8 /* 9 * This software is part of the SBCL system. See the README file for 10 * more information. 11 * 12 * This software is derived from the CMU CL system, which was 13 * written at Carnegie Mellon University and released into the 14 * public domain. The software is in the public domain and is 15 * provided with absolutely no warranty. See the COPYING and CREDITS 16 * files for more information. 17 */ 18 19 /* the number of registers visible as registers in the virtual machine 20 * (excludes stuff like segment registers) */ 21 #define NREGS (16) 22 23 #ifdef LANGUAGE_ASSEMBLY 24 #define REG(num) $ ## num 25 #else 26 #define REG(num) num 27 #endif 28 29 #define reg_RAX REG( 0) 30 #define reg_RCX REG( 2) 31 #define reg_RDX REG( 4) 32 #define reg_RBX REG( 6) 33 #define reg_RSP REG( 8) 34 #define reg_RBP REG(10) 35 #define reg_RSI REG(12) 36 #define reg_RDI REG(14) 37 #define reg_R8 REG(16) 38 #define reg_R9 REG(18) 39 #define reg_R10 REG(20) 40 #define reg_R11 REG(22) 41 #define reg_R12 REG(24) 42 #define reg_R13 REG(26) 43 #define reg_R14 REG(28) 44 #define reg_R15 REG(30) 45 46 #define REGNAMES "RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI", \ 47 "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15" 48 49 /* reg_SP = the register used by Lisp as stack pointer */ 50 #define reg_SP reg_RSP 51