Skip to content

Commit 2940bae

Browse files
committed
---
yaml --- r: 5615 b: refs/heads/master c: e31849f h: refs/heads/master i: 5613: 20811e1 5611: 141f8eb 5607: 46a03f6 5599: 5003891 v: v3
1 parent ec87ac3 commit 2940bae

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 6dece91ed3883a4b81986404004d90b6a6f0b30a
2+
refs/heads/master: e31849fb7920cdd3a46758bb8c6fbd61cde22988

trunk/src/rt/arch/i386/ccall.S

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
.text
22

33
// 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.
47
.globl _upcall_call_c_stack
58
_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
812
movl 12(%esp),%esp // switch stack
9-
pushl %ecx // save esp on stack
1013
calll *%eax
11-
popl %esp // restore esp
14+
movl %ebp,%esp // would like to use "leave" but it's slower
15+
popl %ebp
1216
ret
1317

14-

0 commit comments

Comments
 (0)