Changeset 1aede82 in mainline


Ignore:
Timestamp:
2008-03-15T09:21:51Z (17 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
baac911
Parents:
7397c73
Message:

Added missing ia32/context.S from last commit.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/context.S

    r7397c73 r1aede82  
    2727#
    2828
     29#include <arch/context_offset.h>
     30
    2931.text
    3032
     
    3941#
    4042context_save_arch:
    41         movl 0(%esp),%eax       # the caller's return %eip
    42         movl 4(%esp),%edx       # address of the context variable to save context to
     43        movl 0(%esp),%eax       # save pc value into eax       
     44        movl 4(%esp),%edx       # address of the context variable to save context to 
    4345
    44         movl %esp,0(%edx)       # %esp -> ctx->sp
    45         movl %eax,4(%edx)       # %eip -> ctx->pc
    46         movl %ebx,8(%edx)       # %ebx -> ctx->ebx
    47         movl %esi,12(%edx)      # %esi -> ctx->esi
    48         movl %edi,16(%edx)      # %edi -> ctx->edi
    49         movl %ebp,20(%edx)      # %ebp -> ctx->ebp
     46                # save registers to given structure
     47        CONTEXT_SAVE_ARCH_CORE %edx %eax
    5048
    5149        xorl %eax,%eax          # context_save returns 1
     
    6159context_restore_arch:
    6260        movl 4(%esp),%eax       # address of the context variable to restore context from
    63         movl 0(%eax),%esp       # ctx->sp -> %esp
    64         movl 4(%eax),%edx       # ctx->pc -> %edx
    65         movl 8(%eax),%ebx       # ctx->ebx -> %ebx
    66         movl 12(%eax),%esi      # ctx->esi -> %esi
    67         movl 16(%eax),%edi      # ctx->edi -> %edi
    68         movl 20(%eax),%ebp      # ctx->ebp -> %ebp
    6961
    70         movl %edx,0(%esp)       # ctx->pc -> saver's return %eip
     62                # restore registers from given structure
     63        CONTEXT_RESTORE_ARCH_CORE %eax %edx
     64
     65        movl %edx,0(%esp)       # put saved pc on stack
    7166        xorl %eax,%eax          # context_restore returns 0
    7267        ret
Note: See TracChangeset for help on using the changeset viewer.