4 * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
6 * This file is part of DevLib - See devlib/README for information.
9 * \brief i386 context switch
13 * \author Bernardo Innocenti <bernie@develer.com>
16 /* void asm_switch_context(void ** new_sp, void ** save_sp) */
17 .globl asm_switch_context
26 movl 0x24(%esp),%ebp /* ebp = save_sp */
27 movl %esp,(%ebp) /* *save_sp = esp */
28 movl 0x20(%esp),%ebp /* ebp = new_sp */
29 movl (%ebp),%esp /* esp = *new_sp */
39 /* int asm_switch_version(void) */
40 .globl asm_switch_version