X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Femul%2Fswitch_i386.S;h=b605c15edde69ee29af960b6f9ce9bdcf4f76fe2;hb=32d1445272120a254d77ce8d1af1f527da7a2c17;hp=5032b31c2556d5fcb9bb60b0a7af8ad2d6a2ec59;hpb=fe0a14d1434098bfd0780d06a2a7e55f27940d27;p=bertos.git diff --git a/bertos/emul/switch_i386.S b/bertos/emul/switch_i386.S index 5032b31c..b605c15e 100644 --- a/bertos/emul/switch_i386.S +++ b/bertos/emul/switch_i386.S @@ -46,22 +46,16 @@ /* void asm_switch_context(void ** new_sp [sp+4], void ** save_sp [sp+8]) */ .globl SWITCH_CONTEXT SWITCH_CONTEXT: - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - pushl %esi - pushl %edi pushl %ebp + pushl %edi + pushl %esi + pushl %ebx movl 0x24(%esp),%ebp /* ebp = save_sp */ movl %esp,(%ebp) /* *save_sp = esp */ movl 0x20(%esp),%ebp /* ebp = new_sp */ movl (%ebp),%esp /* esp = *new_sp */ - popl %ebp - popl %edi - popl %esi - popl %edx - popl %ecx popl %ebx - popl %eax + popl %esi + popl %edi + popl %ebp ret