Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/context_offset.h

    rdc0b964 r7397c73  
    2727 */
    2828
    29 /** @addtogroup ia32
     29/** @addtogroup ia32   
    3030 * @{
    3131 */
     
    3636#define KERN_ia32_CONTEXT_OFFSET_H_
    3737
    38 #define OFFSET_SP   0x00
    39 #define OFFSET_PC   0x04
    40 #define OFFSET_EBX  0x08
    41 #define OFFSET_ESI  0x0C
    42 #define OFFSET_EDI  0x10
    43 #define OFFSET_EBP  0x14
     38#define OFFSET_SP  0x0
     39#define OFFSET_PC  0x4
     40#define OFFSET_EBX 0x8
     41#define OFFSET_ESI 0xC
     42#define OFFSET_EDI 0x10
     43#define OFFSET_EBP 0x14
    4444
    45 #ifdef KERNEL
    46         #define OFFSET_IPL 0x18
     45#ifdef KERNEL 
     46# define OFFSET_IPL 0x18
    4747#else
    48         #define OFFSET_TLS 0x18
     48# define OFFSET_TLS 0x18
    4949#endif
    5050
    51 #ifdef __ASM__
    5251
    53 # ctx: address of the structure with saved context
     52#ifdef __ASM__
     53
     54# ctx: address of the structure with saved context
    5455# pc: return address
    5556
    5657.macro CONTEXT_SAVE_ARCH_CORE ctx:req pc:req
    57         movl %esp,OFFSET_SP(\ctx)       # %esp -> ctx->sp
     58        movl %esp,OFFSET_SP(\ctx)       # %esp -> ctx->sp       
    5859        movl \pc,OFFSET_PC(\ctx)        # %eip -> ctx->pc
    59         movl %ebx,OFFSET_EBX(\ctx)      # %ebx -> ctx->ebx
    60         movl %esi,OFFSET_ESI(\ctx)      # %esi -> ctx->esi
    61         movl %edi,OFFSET_EDI(\ctx)      # %edi -> ctx->edi
    62         movl %ebp,OFFSET_EBP(\ctx)      # %ebp -> ctx->ebp
     60        movl %ebx,OFFSET_EBX(\ctx)      # %ebx -> ctx->ebx     
     61        movl %esi,OFFSET_ESI(\ctx)      # %esi -> ctx->esi     
     62        movl %edi,OFFSET_EDI(\ctx)      # %edi -> ctx->edi     
     63        movl %ebp,OFFSET_EBP(\ctx)      # %ebp -> ctx->ebp     
    6364.endm
    6465
    65 # ctx: address of the structure with saved context
     66# ctx: address of the structure with saved context 
    6667
    6768.macro CONTEXT_RESTORE_ARCH_CORE ctx:req pc:req
     
    7475.endm
    7576
    76 #endif /* __ASM__ */
     77#endif /* __ASM__ */ 
    7778
    7879#endif
     
    8081/** @}
    8182 */
     83
Note: See TracChangeset for help on using the changeset viewer.