File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ RUNTIME_CS := rt/sync/timer.cpp \
37
37
38
38
RUNTIME_LL :=
39
39
40
- RUNTIME_S := rt/arch/i386/_context.S
40
+ RUNTIME_S := rt/arch/i386/_context.S \
41
+ rt/arch/i386/ccall.S
41
42
42
43
RUNTIME_HDR := rt/globals.h \
43
44
rt/rust.h \
Original file line number Diff line number Diff line change
1
+ .text
2
+
3
+ // upcall_call_c_stack(void (*fn)(), void *new_esp)
4
+ .globl _upcall_call_c_stack
5
+ _upcall_call_c_stack:
6
+ movl %esp ,%ecx // grab esp
7
+ movl 8 (%esp ),%eax // save fn
8
+ movl 12 (%esp ),%esp // switch stack
9
+ pushl %ecx // save esp on stack
10
+ calll *%eax
11
+ popl %esp // restore esp
12
+ ret
13
+
14
+
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ class context {
37
37
38
38
void swap (context &out);
39
39
void call (void *f, void *arg, void *sp);
40
+ void call (void *f, void *sp);
40
41
41
42
// Note that this doesn't actually adjust esp. Instead, we adjust esp when
42
43
// we actually do the call. This is needed for exception safety -- if the
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ task_yield
66
66
task_join
67
67
unsupervise
68
68
upcall_alloc_c_stack
69
+ upcall_call_c_stack
69
70
upcall_cmp_type
70
71
upcall_dynastack_alloc
71
72
upcall_dynastack_alloc_2
You can’t perform that action at this time.
0 commit comments