debuggers.hg

view xen/include/asm-x86/x86_32/regs.h @ 3635:ed902e5c4b49

bitkeeper revision 1.1159.212.62 (41fff40aESe4aWS82z_rLHeonXpxuQ)

More x86/64 stuff.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Tue Feb 01 21:26:34 2005 +0000 (2005-02-01)
parents f913da82d617
children bbe8541361dd f504382b179f 9f7935ea4606
line source
1 #ifndef _I386_REGS_H
2 #define _I386_REGS_H
4 #include <asm/types.h>
6 /* So that we can use 'l' modifier in printf-style format strings. */
7 #define u32 unsigned long
9 struct xen_regs
10 {
11 /* All saved activations contain the following fields. */
12 u32 ebx;
13 u32 ecx;
14 u32 edx;
15 u32 esi;
16 u32 edi;
17 u32 ebp;
18 u32 eax;
19 u16 error_code;
20 u16 entry_vector;
21 u32 eip;
22 u32 cs;
23 u32 eflags;
25 /* Only saved guest activations contain the following fields. */
26 u32 esp;
27 u32 ss;
28 u32 es;
29 u32 ds;
30 u32 fs;
31 u32 gs;
32 } __attribute__ ((packed));
34 #undef u32
36 #define VM86_MODE(_r) ((_r)->eflags & EF_VM)
37 #define RING_0(_r) (((_r)->cs & 3) == 0)
38 #define RING_1(_r) (((_r)->cs & 3) == 1)
39 #define RING_2(_r) (((_r)->cs & 3) == 2)
40 #define RING_3(_r) (((_r)->cs & 3) == 3)
42 #endif