kfile_genericSeek: fix seek_end start position.
[bertos.git] / kern / switch_x86_64.s
old mode 100755 (executable)
new mode 100644 (file)
index 60a31e2..5fb4da6
 
 /*
  * $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).
  *
  *
  */
 
-!!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
-
 /* I know it's ugly... */
-#.intel_syntax
+/* .intel_syntax */
 
-/* void AsmSwitchContext(void * new_sp, void ** save_sp) */
-.globl AsmSwitchContext
-AsmSwitchContext:
+/* void AsmSwitchContext(void **new_sp, void **save_sp) */
+/*                       %rdi           %rsi            */
+.globl asm_switch_context
+asm_switch_context:
        pushq   %rax
        pushq   %rbx
        pushq   %rcx
@@ -45,7 +53,7 @@ AsmSwitchContext:
        pushq   %rdi
        pushq   %rbp
        movq    %rsp,(%rsi)             /* *save_sp = rsp */
-       movq    %rdi,%rsp               /* rsp = new_sp */
+       movq    (%rdi),%rsp             /* rsp = *new_sp */
        popq    %rbp
        popq    %rdi
        popq    %rsi
@@ -55,16 +63,9 @@ AsmSwitchContext:
        popq    %rax
        ret
 
-/* void AsmReplaceContext(void * new_sp, void ** dummy) */
-.globl AsmReplaceContext
-AsmReplaceContext:
-       movq    %rdi,%rsp                /* rsp = new_sp */
-       popq    %rbp
-       popq    %rdi
-       popq    %rsi
-       popq    %rdx
-       popq    %rcx
-       popq    %rbx
-       popq    %rax
+/* int asm_switch_version(void) */
+.globl asm_switch_version
+asm_switch_version:
+       mov     $1,%rax
        ret