From: batt Date: Tue, 29 Jul 2008 10:48:56 +0000 (+0000) Subject: Rename assembly file. X-Git-Tag: 2.0.0~408 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=313117db717ca63c3fb036c0aed11b35785e2797;p=bertos.git Rename assembly file. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1526 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/emul/switch_i386.S b/bertos/emul/switch_i386.S new file mode 100644 index 00000000..6931d45c --- /dev/null +++ b/bertos/emul/switch_i386.S @@ -0,0 +1,44 @@ +/*! + * \file + * + * + * \brief i386 context switch + * + * \version $Id$ + * + * \author Bernardo Innocenti + */ + +/* void asm_switch_context(void ** new_sp, void ** save_sp) */ +.globl asm_switch_context +asm_switch_context: + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + pushl %esi + pushl %edi + pushl %ebp + 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 + ret + +/* int asm_switch_version(void) */ +.globl asm_switch_version +asm_switch_version: + mov $1,%eax + ret + diff --git a/bertos/emul/switch_i386.s b/bertos/emul/switch_i386.s deleted file mode 100644 index 6931d45c..00000000 --- a/bertos/emul/switch_i386.s +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * \file - * - * - * \brief i386 context switch - * - * \version $Id$ - * - * \author Bernardo Innocenti - */ - -/* void asm_switch_context(void ** new_sp, void ** save_sp) */ -.globl asm_switch_context -asm_switch_context: - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - pushl %esi - pushl %edi - pushl %ebp - 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 - ret - -/* int asm_switch_version(void) */ -.globl asm_switch_version -asm_switch_version: - mov $1,%eax - ret -