File tree Expand file tree Collapse file tree 3 files changed +0
-34
lines changed Expand file tree Collapse file tree 3 files changed +0
-34
lines changed Original file line number Diff line number Diff line change 4
4
#define RECORD_SP_LIMIT _record_sp_limit
5
5
#define GET_SP_LIMIT _get_sp_limit
6
6
#define GET_SP _get_sp
7
- #define CHECK_STACK _check_stack_alignment
8
7
#else
9
8
#define RECORD_SP_LIMIT record_sp_limit
10
9
#define GET_SP_LIMIT get_sp_limit
11
10
#define GET_SP get_sp
12
- #define CHECK_STACK check_stack_alignment
13
11
#endif
14
12
15
13
.globl RECORD_SP_LIMIT
16
14
.globl GET_SP_LIMIT
17
15
.globl GET_SP
18
- .globl CHECK_STACK
19
16
20
17
#if defined(__linux__) || defined(__FreeBSD__)
21
18
RECORD_SP_LIMIT:
@@ -61,10 +58,3 @@ GET_SP_LIMIT:
61
58
GET_SP:
62
59
movl %esp , %eax
63
60
ret
64
-
65
- // This will segfault if not called on a 16-byte boundary
66
- CHECK_STACK:
67
- subl $28 , %esp
68
- movaps %xmm0 , (%esp )
69
- addl $28 , %esp
70
- ret
Original file line number Diff line number Diff line change 4
4
#define RECORD_SP_LIMIT _record_sp_limit
5
5
#define GET_SP_LIMIT _get_sp_limit
6
6
#define GET_SP _get_sp
7
- #define CHECK_STACK _check_stack_alignment
8
7
#else
9
8
#define RECORD_SP_LIMIT record_sp_limit
10
9
#define GET_SP_LIMIT get_sp_limit
11
10
#define GET_SP get_sp
12
- #define CHECK_STACK check_stack_alignment
13
11
#endif
14
12
15
13
.globl RECORD_SP_LIMIT
16
14
.globl GET_SP_LIMIT
17
15
.globl GET_SP
18
- .globl CHECK_STACK
19
16
20
17
#if defined(__linux__)
21
18
RECORD_SP_LIMIT:
@@ -53,10 +50,3 @@ GET_SP_LIMIT:
53
50
GET_SP:
54
51
movq %rsp , %rax
55
52
ret
56
-
57
- // This will segfault if not called on a 16-byte boundary
58
- CHECK_STACK:
59
- subq $24 , %rsp
60
- movaps %xmm0 , (%rsp )
61
- addq $24 , %rsp
62
- ret
Original file line number Diff line number Diff line change 28
28
(task)->name, (task));
29
29
#endif
30
30
31
- // This is called to ensure we've set up our rust stacks
32
- // correctly. Strategically placed at entry to upcalls because they begin on
33
- // the rust stack and happen frequently enough to catch most stack changes,
34
- // including at the beginning of all landing pads.
35
- // FIXME: Enable this for windows
36
- #if (defined __linux__ || defined __APPLE__ || defined __FreeBSD__) \
37
- && (defined(GCC_VERSION) && GCC_VERSION > 40300 )
38
- extern " C" void
39
- check_stack_alignment () __attribute__ ((aligned (16 )));
40
- #else
41
- static void check_stack_alignment () { }
42
- #endif
43
-
44
31
#define UPCALL_SWITCH_STACK (A, F ) call_upcall_on_c_stack((void *)A, (void *)F)
45
32
46
33
inline void
47
34
call_upcall_on_c_stack (void *args, void *fn_ptr) {
48
- check_stack_alignment ();
49
35
rust_task *task = rust_get_current_task ();
50
36
task->call_on_c_stack (args, fn_ptr);
51
37
}
You can’t perform that action at this time.
0 commit comments