Move pc assembly code to emul dir.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 May 2008 15:32:10 +0000 (15:32 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 May 2008 15:32:10 +0000 (15:32 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1389 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/kern/switch.S [deleted file]
bertos/kern/switch_i386.s [deleted file]
bertos/kern/switch_win32.s [deleted file]
bertos/kern/switch_x86_64.s [deleted file]

diff --git a/bertos/kern/switch.S b/bertos/kern/switch.S
deleted file mode 100644 (file)
index 93d9b7c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#if defined(__i386__)
-       #include "switch_i386.s"
-#elif defined(__x86_64__)
-       #include "switch_x86_64.s"
-#else
-       #error Unknown CPU
-#endif
-
diff --git a/bertos/kern/switch_i386.s b/bertos/kern/switch_i386.s
deleted file mode 100644 (file)
index 6931d45..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
- * \file
- * <!--
- * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
- * This file is part of DevLib - See devlib/README for information.
- * -->
- *
- * \brief i386 context switch
- *
- * \version $Id$
- *
- * \author Bernardo Innocenti <bernie@develer.com>
- */
-
-/* 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/kern/switch_win32.s b/bertos/kern/switch_win32.s
deleted file mode 100644 (file)
index 5891ae9..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*!
- * \file
- * <!--
- * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
- * This file is part of DevLib - See devlib/README for information.
- * -->
- *
- * \brief i386 context switch for WIN32
- *
- * \version $Id$
- *
- * \author Bernardo Innocenti <bernie@develer.com>
- */
-
-!!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
-
-__declspec(naked) void AsmSwitchContext(void * new_sp, void ** save_sp)
-{
-       __asm
-       {
-               push    eax
-               push    ebx
-               push    ecx
-               push    edx
-               push    esi
-               push    edi
-               push    ebp
-               mov             ebp,dword ptr [esp+24h] ; ebp <- save_sp
-               mov             dword ptr [ebp],esp             ; *save_sp = esp
-               mov             esp,dword ptr [esp+20h] ; new_sp
-               pop             ebp
-               pop             edi
-               pop             esi
-               pop             edx
-               pop             ecx
-               pop             ebx
-               pop             eax
-               ret
-       }
-}
-
-__declspec(naked) void AsmReplaceContext(void * new_sp, void ** dummy)
-{
-       __asm
-       {
-               mov             esp,dword ptr [esp + 4] ; new_sp
-               pop             ebp
-               pop             edi
-               pop             esi
-               pop             edx
-               pop             ecx
-               pop             ebx
-               pop             eax
-               ret
-       }
-}
-
diff --git a/bertos/kern/switch_x86_64.s b/bertos/kern/switch_x86_64.s
deleted file mode 100644 (file)
index 5fb4da6..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*!
- * \file
- * <!--
- * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
- * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
- * This file is part of DevLib - See devlib/README for information.
- * -->
- *
- * \brief i386 context switch
- *
- * \version $Id$
- *
- * \author Bernardo Innocenti <bernie@develer.com>
- */
-
-/*
- * $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.
- *
- */
-
-/* I know it's ugly... */
-/* .intel_syntax */
-
-/* void AsmSwitchContext(void **new_sp, void **save_sp) */
-/*                       %rdi           %rsi            */
-.globl asm_switch_context
-asm_switch_context:
-       pushq   %rax
-       pushq   %rbx
-       pushq   %rcx
-       pushq   %rdx
-       pushq   %rsi
-       pushq   %rdi
-       pushq   %rbp
-       movq    %rsp,(%rsi)             /* *save_sp = rsp */
-       movq    (%rdi),%rsp             /* rsp = *new_sp */
-       popq    %rbp
-       popq    %rdi
-       popq    %rsi
-       popq    %rdx
-       popq    %rcx
-       popq    %rbx
-       popq    %rax
-       ret
-
-/* int asm_switch_version(void) */
-.globl asm_switch_version
-asm_switch_version:
-       mov     $1,%rax
-       ret
-