File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 6dece91ed3883a4b81986404004d90b6a6f0b30a
2
+ refs/heads/master: e31849fb7920cdd3a46758bb8c6fbd61cde22988
Original file line number Diff line number Diff line change 1
1
.text
2
2
3
3
// upcall_call_c_stack(void (*fn)(), void *new_esp)
4
+ //
5
+ // Note that we could use |enter| and |leave| but the manuals tell me they're
6
+ // slower.
4
7
.globl _upcall_call_c_stack
5
8
_upcall_call_c_stack:
6
- movl %esp ,%ecx // grab esp
7
- movl 8 (%esp ),%eax // save fn
9
+ pushl %ebp
10
+ movl %esp ,%ebp // save esp
11
+ movl 8 (%esp ),%eax // eax = callee
8
12
movl 12 (%esp ),%esp // switch stack
9
- pushl %ecx // save esp on stack
10
13
calll *%eax
11
- popl %esp // restore esp
14
+ movl %ebp ,%esp // would like to use "leave" but it's slower
15
+ popl %ebp
12
16
ret
13
17
14
-
You can’t perform that action at this time.
0 commit comments