direct-io.hg

diff xen/include/asm-x86/x86_32/asm_defns.h @ 15417:015d9abeacfb

i386: Simplify failsafe callback handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Jun 21 21:36:26 2007 +0100 (2007-06-21)
parents acb7aa72fac7
children
line diff
     1.1 --- a/xen/include/asm-x86/x86_32/asm_defns.h	Thu Jun 21 18:02:50 2007 +0100
     1.2 +++ b/xen/include/asm-x86/x86_32/asm_defns.h	Thu Jun 21 21:36:26 2007 +0100
     1.3 @@ -26,6 +26,17 @@ 1:      addl  $4,%esp;
     1.4  #define ASSERT_INTERRUPTS_ENABLED  ASSERT_INTERRUPT_STATUS(nz)
     1.5  #define ASSERT_INTERRUPTS_DISABLED ASSERT_INTERRUPT_STATUS(z)
     1.6  
     1.7 +#define SAVE_ALL_GPRS                                   \
     1.8 +        cld;                                            \
     1.9 +        pushl %eax;                                     \
    1.10 +        pushl %ebp;                                     \
    1.11 +        SETUP_EXCEPTION_FRAME_POINTER;                  \
    1.12 +        pushl %edi;                                     \
    1.13 +        pushl %esi;                                     \
    1.14 +        pushl %edx;                                     \
    1.15 +        pushl %ecx;                                     \
    1.16 +        pushl %ebx
    1.17 +
    1.18  /*
    1.19   * Saves all register state into an exception/interrupt stack frame.
    1.20   * Returns to the caller at <xen_lbl> if the interrupted context is within
    1.21 @@ -36,15 +47,7 @@ 1:      addl  $4,%esp;
    1.22   * the caller is reponsible for validity of %ds/%es.
    1.23   */
    1.24  #define SAVE_ALL(xen_lbl, vm86_lbl)                     \
    1.25 -        cld;                                            \
    1.26 -        pushl %eax;                                     \
    1.27 -        pushl %ebp;                                     \
    1.28 -        SETUP_EXCEPTION_FRAME_POINTER;                  \
    1.29 -        pushl %edi;                                     \
    1.30 -        pushl %esi;                                     \
    1.31 -        pushl %edx;                                     \
    1.32 -        pushl %ecx;                                     \
    1.33 -        pushl %ebx;                                     \
    1.34 +        SAVE_ALL_GPRS;                                  \
    1.35          testl $(X86_EFLAGS_VM),UREGS_eflags(%esp);      \
    1.36          mov   %ds,%edi;                                 \
    1.37          mov   %es,%esi;                                 \