rt: Rename record_sp to record_sp_limit
This commit is contained in:
parent
ba322b0a70
commit
1cb35c9b26
@ -1,28 +1,28 @@
|
||||
.text
|
||||
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
#define RECORD_SP _record_sp
|
||||
#define RECORD_SP_LIMIT _record_sp_limit
|
||||
#define GET_SP _get_sp
|
||||
#define CHECK_STACK _check_stack_alignment
|
||||
#else
|
||||
#define RECORD_SP record_sp
|
||||
#define RECORD_SP_LIMIT record_sp_limit
|
||||
#define GET_SP get_sp
|
||||
#define CHECK_STACK check_stack_alignment
|
||||
#endif
|
||||
|
||||
.globl RECORD_SP
|
||||
.globl RECORD_SP_LIMIT
|
||||
.globl GET_SP
|
||||
.globl CHECK_STACK
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
movl 4(%esp), %eax
|
||||
movl %eax, %gs:48
|
||||
ret
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
movl $0x48+90*4, %eax
|
||||
movl 4(%esp), %ecx
|
||||
movl %ecx, %gs:(%eax)
|
||||
@ -30,7 +30,7 @@ RECORD_SP:
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
movl 4(%esp), %eax
|
||||
movl %eax, %fs:0x14
|
||||
ret
|
||||
|
@ -1,34 +1,34 @@
|
||||
.text
|
||||
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
#define RECORD_SP _record_sp
|
||||
#define RECORD_SP_LIMIT _record_sp_limit
|
||||
#define GET_SP _get_sp
|
||||
#define CHECK_STACK _check_stack_alignment
|
||||
#else
|
||||
#define RECORD_SP record_sp
|
||||
#define RECORD_SP_LIMIT record_sp_limit
|
||||
#define GET_SP get_sp
|
||||
#define CHECK_STACK check_stack_alignment
|
||||
#endif
|
||||
|
||||
.globl RECORD_SP
|
||||
.globl RECORD_SP_LIMIT
|
||||
.globl GET_SP
|
||||
.globl CHECK_STACK
|
||||
|
||||
#if defined(__linux__)
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
movq %rdi, %fs:112
|
||||
ret
|
||||
#elif defined(__APPLE__)
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
movq $0x60+90*8, %rsi
|
||||
movq %rdi, %gs:(%rsi)
|
||||
ret
|
||||
#elif defined(__FreeBSD__)
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
movq %rdi, %fs:24
|
||||
ret
|
||||
#else
|
||||
RECORD_SP:
|
||||
RECORD_SP_LIMIT:
|
||||
ret
|
||||
#endif
|
||||
|
||||
|
@ -427,7 +427,7 @@ rust_task::prev_stack() {
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
record_sp(void *limit);
|
||||
record_sp_limit(void *limit);
|
||||
|
||||
inline void
|
||||
rust_task::record_stack_limit() {
|
||||
@ -442,7 +442,7 @@ rust_task::record_stack_limit() {
|
||||
(uintptr_t)stk->end - RED_ZONE_SIZE
|
||||
- (uintptr_t)stk->data >= LIMIT_OFFSET,
|
||||
"Stack size must be greater than LIMIT_OFFSET");
|
||||
record_sp(stk->data + LIMIT_OFFSET + RED_ZONE_SIZE);
|
||||
record_sp_limit(stk->data + LIMIT_OFFSET + RED_ZONE_SIZE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ call_upcall_on_c_stack(void *args, void *fn_ptr) {
|
||||
task->call_on_c_stack(args, fn_ptr);
|
||||
}
|
||||
|
||||
extern "C" void record_sp(void *limit);
|
||||
extern "C" void record_sp_limit(void *limit);
|
||||
|
||||
/**********************************************************************
|
||||
* Switches to the C-stack and invokes |fn_ptr|, passing |args| as argument.
|
||||
@ -66,7 +66,7 @@ upcall_call_shim_on_c_stack(void *args, void *fn_ptr) {
|
||||
// FIXME (1226) - The shim functions generated by rustc contain the
|
||||
// morestack prologue, so we need to let them know they have enough
|
||||
// stack.
|
||||
record_sp(0);
|
||||
record_sp_limit(0);
|
||||
|
||||
try {
|
||||
task->call_on_c_stack(args, fn_ptr);
|
||||
@ -102,7 +102,7 @@ upcall_call_shim_on_rust_stack(void *args, void *fn_ptr) {
|
||||
}
|
||||
|
||||
// FIXME: As above
|
||||
record_sp(0);
|
||||
record_sp_limit(0);
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user