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>
18 * Revision 1.1 2005/11/27 03:06:15 bernie
19 * Add x86_64 task switching (to be updated to new-style scheduler).
21 * Revision 1.1 2005/11/14 21:06:38 bernie
24 * Revision 1.2 2004/06/06 16:14:12 bernie
25 * Add DevLib license information.
27 * Revision 1.1 2004/05/23 17:27:00 bernie
28 * Import kern/ subdirectory.
32 !!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
34 /* I know it's ugly... */
37 /* void AsmSwitchContext(void * new_sp, void ** save_sp) */
38 .globl AsmSwitchContext
47 movq %rsp,(%rsi) /* *save_sp = rsp */
48 movq %rdi,%rsp /* rsp = new_sp */
58 /* void AsmReplaceContext(void * new_sp, void ** dummy) */
59 .globl AsmReplaceContext
61 movq %rdi,%rsp /* rsp = new_sp */