Merged from external project:
[bertos.git] / bertos / emul / switch_x86_64.s
index df511d669de79683a2094deba00709012fd2e77e..1632c816d4b01512c7fb554043aed9d7b8a259aa 100644 (file)
@@ -1,48 +1,42 @@
-/*!
+/**
  * \file
  * <!--
- * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernie Innocenti <bernie@codewiz.org>
- * This file is part of DevLib - See devlib/README for information.
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2004, 2008 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999, 2000, 2001 Bernie Innocenti <bernie@codewiz.org>
  * -->
  *
- * \brief i386 context switch
- *
  * \version $Id$
- *
  * \author Bernie Innocenti <bernie@codewiz.org>
- */
-
-/*
- * $Log$
- * Revision 1.4  2006/09/20 14:02:49  marco
- * C-style comment.
- *
- * Revision 1.3  2006/02/24 01:35:40  bernie
- * Update for new emulator.
- *
- * Revision 1.2  2006/02/24 01:17:05  bernie
- * Update for new emulator.
- *
- * Revision 1.1  2005/11/27 03:06:15  bernie
- * Add x86_64 task switching (to be updated to new-style scheduler).
- *
- * Revision 1.1  2005/11/14 21:06:38  bernie
- * Add x86_64 support.
- *
- * Revision 1.2  2004/06/06 16:14:12  bernie
- * Add DevLib license information.
- *
- * Revision 1.1  2004/05/23 17:27:00  bernie
- * Import kern/ subdirectory.
  *
+ * \brief i386 context switch
  */
 
-/* I know it's ugly... */
-/* .intel_syntax */
-
-/* void AsmSwitchContext(void **new_sp, void **save_sp) */
-/*                       %rdi           %rsi            */
+/* void asm_switch_context(void **new_sp [%rdi], void **save_sp [%rsi]) */
 .globl asm_switch_context
 asm_switch_context:
        pushq   %rax
@@ -62,10 +56,3 @@ asm_switch_context:
        popq    %rbx
        popq    %rax
        ret
-
-/* int asm_switch_version(void) */
-.globl asm_switch_version
-asm_switch_version:
-       mov     $1,%rax
-       ret
-