debuggers.hg

view xen/include/asm-x86/x86_64/regs.h @ 3641:e6af5d8f8b39

bitkeeper revision 1.1159.236.1 (42000d46U0ZeCEM9d6oFhwqrTrOgDg)

Merge ssh://kaf24@scramble.cl.cam.ac.uk//usr/groups/xeno/BK/xen-unstable.bk
into viper.(none):/home/kaf24/xen-unstable.bk
author kaf24@viper.(none)
date Tue Feb 01 23:14:14 2005 +0000 (2005-02-01)
parents ed902e5c4b49 9a9c5a491401
children fd1dd0663b09
line source
1 #ifndef _X86_64_REGS_H
2 #define _X86_64_REGS_H
4 #include <asm/types.h>
6 struct xen_regs
7 {
8 u64 r15;
9 u64 r14;
10 u64 r13;
11 u64 r12;
12 u64 rbp;
13 u64 rbx;
14 /* NB. Above here is C callee-saves. */
15 u64 r11;
16 u64 r10;
17 u64 r9;
18 u64 r8;
19 union { u64 rax; u32 eax; } __attribute__ ((packed));
20 union { u64 rcx; u32 ecx; } __attribute__ ((packed));
21 union { u64 rdx; u32 edx; } __attribute__ ((packed));
22 union { u64 rsi; u32 esi; } __attribute__ ((packed));
23 union { u64 rdi; u32 edi; } __attribute__ ((packed));
24 u32 error_code;
25 u32 entry_vector;
26 union { u64 rip; u64 eip; } __attribute__ ((packed));
27 u64 cs;
28 u64 eflags;
29 u64 rsp;
30 u64 ss;
31 } __attribute__ ((packed));
33 #define VM86_MODE(_r) ((_r)->eflags & EF_VM)
34 #define RING_0(_r) (((_r)->cs & 3) == 0)
35 #define RING_1(_r) (((_r)->cs & 3) == 1)
36 #define RING_2(_r) (((_r)->cs & 3) == 2)
37 #define RING_3(_r) (((_r)->cs & 3) == 3)
39 #endif