projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add randpool test program.
[bertos.git]
/
kern
/
switch_x86_64.s
diff --git
a/kern/switch_x86_64.s
b/kern/switch_x86_64.s
index 60a31e286b6bd50db1adb04ddd12fbe0fec62b12..5fb4da658d1663d461c4fb91218285d212fb82f2 100755
(executable)
--- a/
kern/switch_x86_64.s
+++ b/
kern/switch_x86_64.s
@@
-15,6
+15,15
@@
/*
* $Log$
/*
* $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/27 03:06:15 bernie
* Add x86_64 task switching (to be updated to new-style scheduler).
*
@@
-29,14
+38,13
@@
*
*/
*
*/
-!!!!!! THIS FILE HAS NOT BEEN REVISED FOR THE NEW SCHEDULER API !!!!!!
-
/* I know it's ugly... */
/* 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
pushq %rax
pushq %rbx
pushq %rcx
@@
-45,7
+53,7
@@
AsmSwitchContext:
pushq %rdi
pushq %rbp
movq %rsp,(%rsi) /* *save_sp = rsp */
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
popq %rbp
popq %rdi
popq %rsi
@@
-55,16
+63,9
@@
AsmSwitchContext:
popq %rax
ret
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
ret