diff contextSwitch.s @ 75:f6990e1ba998

new sequential version
author Merten Sach <msach@mailbox.tu-berlin.de>
date Thu, 02 Jun 2011 13:55:51 +0200
parents d8f12351f7cc
children 9ddbb071142d
line diff
     1.1 --- a/contextSwitch.s	Thu Jun 02 12:45:02 2011 +0200
     1.2 +++ b/contextSwitch.s	Thu Jun 02 13:55:51 2011 +0200
     1.3 @@ -121,5 +121,22 @@
     1.4      movl    0x20(%ecx), %esp         #restore stack pointer
     1.5      movl    0x1c(%ecx), %ebp         #restore frame pointer
     1.6      movl    $terminateCoreLoop, %eax
     1.7 -    jmp     *%eax                    #jmp to CoreLoop 
     1.8 +    jmp     *%eax                    #jmp to CoreLoop
     1.9 +
    1.10 +
    1.11 +/*
    1.12 + * This one for the sequential version is special. It discards the current stack
    1.13 + * and returns directly from the coreLoop after VMS__dissipate_procr was called
    1.14 + */
    1.15 +.globl asmTerminateCoreLoopSeq
    1.16 +asmTerminateCoreLoopSeq:
    1.17 +    movl    0x4(%esp) , %ecx         #get VirtProcr
    1.18 +    movl    0x20(%ecx), %esp         #restore stack pointer
    1.19 +    movl    0x1c(%ecx), %ebp         #restore frame pointer
    1.20 +    sub     $0x4      , %esp
    1.21 +    movl    %ecx      , (%esp)       #put argument on stack
    1.22 +    call    VMS__dissipate_procr
    1.23 +    movl    %ebp      , %esp        #goto the coreLoops stack
    1.24 +    pop     %ebp        #restore the old framepointer
    1.25 +    ret                 #return from core loop
    1.26