rt: Make __morestack work on win32
This commit is contained in:
parent
0e74121ddb
commit
9e6ff44d93
@ -21,7 +21,7 @@
|
||||
#define UPCALL_DEL_STACK _upcall_del_stack
|
||||
#define RUST_GET_TASK _rust_get_task
|
||||
#define UPCALL_CALL_C _upcall_call_shim_on_c_stack
|
||||
#define MORESTACK __morestack
|
||||
#define MORESTACK ___morestack
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -44,7 +44,6 @@
|
||||
.type MORESTACK,@function
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
MORESTACK:
|
||||
#ifdef __linux__
|
||||
.cfi_startproc
|
||||
@ -144,11 +143,6 @@ MORESTACK:
|
||||
.cfi_endproc
|
||||
#endif
|
||||
|
||||
#else
|
||||
MORESTACK:
|
||||
ret
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
.section __IMPORT,__pointers,non_lazy_symbol_pointers
|
||||
|
@ -16,17 +16,21 @@ RECORD_SP:
|
||||
movl 4(%esp), %eax
|
||||
movl %eax, %gs:48
|
||||
ret
|
||||
#else
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
RECORD_SP:
|
||||
movl $0x48+90*4, %eax
|
||||
movl 4(%esp), %ecx
|
||||
movl %ecx, %gs:(%eax)
|
||||
ret
|
||||
#else
|
||||
RECORD_SP:
|
||||
ret
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
RECORD_SP:
|
||||
movl 4(%esp), %eax
|
||||
movl %eax, %fs:0x14
|
||||
ret
|
||||
#endif
|
||||
|
||||
GET_SP:
|
||||
|
@ -394,6 +394,7 @@ void
|
||||
rust_scheduler::place_task_in_tls(rust_task *task) {
|
||||
BOOL result = TlsSetValue(task_key, task);
|
||||
assert(result && "Couldn't place the task in TLS!");
|
||||
task->record_stack_limit();
|
||||
}
|
||||
|
||||
rust_task *
|
||||
|
Loading…
x
Reference in New Issue
Block a user