debuggers.hg

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