projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch "preempt" in "trunk".
[bertos.git]
/
bertos
/
emul
/
switch_x86_64.s
diff --git
a/bertos/emul/switch_x86_64.s
b/bertos/emul/switch_x86_64.s
index 1632c816d4b01512c7fb554043aed9d7b8a259aa..de0f8f65ad4315cb77974ddf67718233fed2c8de 100644
(file)
--- a/
bertos/emul/switch_x86_64.s
+++ b/
bertos/emul/switch_x86_64.s
@@
-39,20
+39,22
@@
/* void asm_switch_context(void **new_sp [%rdi], void **save_sp [%rsi]) */
.globl asm_switch_context
asm_switch_context:
/* void asm_switch_context(void **new_sp [%rdi], void **save_sp [%rsi]) */
.globl asm_switch_context
asm_switch_context:
- pushq %rax
- pushq %rbx
- pushq %rcx
- pushq %rdx
- pushq %rsi
- pushq %rdi
pushq %rbp
pushq %rbp
+ pushq %rdi
+ pushq %rsi
+ pushq %rbx
+ pushq %r8
+ pushq %r9
+ pushq %r10
+ pushq %r11
movq %rsp,(%rsi) /* *save_sp = rsp */
movq (%rdi),%rsp /* rsp = *new_sp */
movq %rsp,(%rsi) /* *save_sp = rsp */
movq (%rdi),%rsp /* rsp = *new_sp */
- popq %rbp
- popq %rdi
- popq %rsi
- popq %rdx
- popq %rcx
+ popq %r11
+ popq %r10
+ popq %r9
+ popq %r8
popq %rbx
popq %rbx
- popq %rax
+ popq %rsi
+ popq %rdi
+ popq %rbp
ret
ret