debuggers.hg

view xen/arch/x86/x86_64/asm-offsets.c @ 3333:c65b544a8c4e

bitkeeper revision 1.1159.1.488 (41c1acbbhUN0iUWmupmPB85ghWRehg)

Many files:
x86/64 fixes.
author kaf24@pb001.cl.cam.ac.uk
date Thu Dec 16 15:41:47 2004 +0000 (2004-12-16)
parents dda5ab69e74a
children ed902e5c4b49 bbe8541361dd
line source
1 /*
2 * Generate definitions needed by assembly language modules.
3 * This code generates raw asm output which is post-processed
4 * to extract and format the required data.
5 */
7 #include <xen/sched.h>
9 #define DEFINE(_sym, _val) \
10 __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
11 #define BLANK() \
12 __asm__ __volatile__ ( "\n->" : : )
13 #define OFFSET(_sym, _str, _mem) \
14 DEFINE(_sym, offsetof(_str, _mem));
16 void __dummy__(void)
17 {
18 OFFSET(XREGS_r15, struct xen_regs, r15);
19 OFFSET(XREGS_r14, struct xen_regs, r14);
20 OFFSET(XREGS_r13, struct xen_regs, r13);
21 OFFSET(XREGS_r12, struct xen_regs, r12);
22 OFFSET(XREGS_rbp, struct xen_regs, rbp);
23 OFFSET(XREGS_rbx, struct xen_regs, rbx);
24 OFFSET(XREGS_r11, struct xen_regs, r11);
25 OFFSET(XREGS_r10, struct xen_regs, r10);
26 OFFSET(XREGS_r9, struct xen_regs, r9);
27 OFFSET(XREGS_r8, struct xen_regs, r8);
28 OFFSET(XREGS_rax, struct xen_regs, rax);
29 OFFSET(XREGS_rcx, struct xen_regs, rcx);
30 OFFSET(XREGS_rdx, struct xen_regs, rdx);
31 OFFSET(XREGS_rsi, struct xen_regs, rsi);
32 OFFSET(XREGS_rdi, struct xen_regs, rdi);
33 OFFSET(XREGS_orig_rax, struct xen_regs, orig_rax);
34 OFFSET(XREGS_rip, struct xen_regs, rip);
35 OFFSET(XREGS_cs, struct xen_regs, cs);
36 OFFSET(XREGS_eflags, struct xen_regs, eflags);
37 OFFSET(XREGS_rsp, struct xen_regs, rsp);
38 OFFSET(XREGS_ss, struct xen_regs, ss);
39 BLANK();
41 OFFSET(EDOMAIN_processor, struct exec_domain, processor);
42 OFFSET(EDOMAIN_vcpu_info, struct exec_domain, vcpu_info);
43 OFFSET(EDOMAIN_event_sel, struct exec_domain, thread.event_selector);
44 OFFSET(EDOMAIN_event_addr, struct exec_domain, thread.event_address);
45 OFFSET(EDOMAIN_failsafe_sel, struct exec_domain, thread.failsafe_selector);
46 OFFSET(EDOMAIN_failsafe_addr, struct exec_domain, thread.failsafe_address);
47 OFFSET(EDOMAIN_trap_bounce, struct exec_domain, thread.trap_bounce);
48 OFFSET(EDOMAIN_thread_flags, struct exec_domain, thread.flags);
49 BLANK();
51 OFFSET(SHINFO_upcall_pending, shared_info_t,
52 vcpu_data[0].evtchn_upcall_pending);
53 OFFSET(SHINFO_upcall_mask, shared_info_t,
54 vcpu_data[0].evtchn_upcall_mask);
55 BLANK();
57 OFFSET(TRAPBOUNCE_error_code, struct trap_bounce, error_code);
58 OFFSET(TRAPBOUNCE_cr2, struct trap_bounce, cr2);
59 OFFSET(TRAPBOUNCE_flags, struct trap_bounce, flags);
60 OFFSET(TRAPBOUNCE_cs, struct trap_bounce, cs);
61 OFFSET(TRAPBOUNCE_eip, struct trap_bounce, eip);
62 BLANK();
64 OFFSET(MULTICALL_op, multicall_entry_t, op);
65 OFFSET(MULTICALL_arg0, multicall_entry_t, args[0]);
66 OFFSET(MULTICALL_arg1, multicall_entry_t, args[1]);
67 OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
68 OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
69 OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
70 OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
71 }