/*
* $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
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 %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