debuggers.hg

view xen/include/asm-x86/x86_64/regs.h @ 3668:d55d523078f7

bitkeeper revision 1.1159.212.77 (4202221693AFbvFZWeMHHIjQfbzTIQ)

More x86_64 prgress. Many more gaps filled in. Next step is DOM0
construction.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Thu Feb 03 13:07:34 2005 +0000 (2005-02-03)
parents fd1dd0663b09
children bbe8541361dd f504382b179f 9f7935ea4606
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 union { u64 rbp; u32 ebp; } __attribute__ ((packed));
13 union { u64 rbx; u32 ebx; } __attribute__ ((packed));
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 union { u64 rflags; u64 eflags; } __attribute__ ((packed));
29 union { u64 rsp; u64 esp; } __attribute__ ((packed));
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