Skip to content

Commit 5f76652

Browse files
committed
---
yaml --- r: 6859 b: refs/heads/master c: 05bf105 h: refs/heads/master i: 6857: 9b97a3f 6855: 07879e0 v: v3
1 parent 9dc11cc commit 5f76652

File tree

6 files changed

+31
-15
lines changed

6 files changed

+31
-15
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: f302b79d61165641fb090986a607d8d7e6c317c8
2+
refs/heads/master: 05bf105c90e7f0dee866fb15f6616afe25fe209f

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
.text
1+
/*
2+
The function for switching to the C stack. It is called
3+
__morestack because gdb allows any frame with that name to
4+
move the stack pointer to a different stack, which it usually
5+
considers an error.
6+
*/
7+
8+
.text
29

310
#if defined(__APPLE__) || defined(_WIN32)
4-
.globl _asm_call_on_stack
5-
_asm_call_on_stack:
11+
.globl ___morestack
12+
___morestack:
613
#else
7-
.globl asm_call_on_stack
8-
asm_call_on_stack:
14+
.globl __morestack
15+
.hidden __morestack
16+
__morestack:
917
#endif
1018

1119
#if defined(__linux__) || defined(__APPLE__)

trunk/src/rt/arch/i386/context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct registers_t {
2929
uint32_t eip;
3030
};
3131

32-
extern "C" void asm_call_on_stack(void *args, void *fn_ptr, uintptr_t stack_ptr);
32+
extern "C" void __morestack(void *args, void *fn_ptr, uintptr_t stack_ptr);
3333

3434
class context {
3535
public:
@@ -57,7 +57,7 @@ class context {
5757
}
5858

5959
void call_shim_on_c_stack(void *args, void *fn_ptr) {
60-
asm_call_on_stack(args, fn_ptr, regs.esp);
60+
__morestack(args, fn_ptr, regs.esp);
6161
}
6262
};
6363

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
The function for switching to the C stack. It is called
3+
__morestack because gdb allows any frame with that name to
4+
move the stack pointer to a different stack, which it usually
5+
considers an error.
6+
*/
7+
18
#include "regs.h"
29

310
#define ARG0 RUSTRT_ARG0_S
@@ -7,11 +14,13 @@
714
.text
815

916
#if defined(__APPLE__) || defined(_WIN32)
10-
.globl _asm_call_on_stack
11-
_asm_call_on_stack:
17+
.globl ___morestack
18+
.private_extern MORESTACK
19+
___morestack:
1220
#else
13-
.globl asm_call_on_stack
14-
asm_call_on_stack:
21+
.globl __morestack
22+
.hidden __morestack
23+
__morestack:
1524
#endif
1625

1726
#if defined(__linux__) || defined(__APPLE__)

trunk/src/rt/arch/x86_64/context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct registers_t {
2727
uint64_t data[RUSTRT_MAX];
2828
};
2929

30-
extern "C" void asm_call_on_stack(void *args, void *fn_ptr, uintptr_t stack_ptr);
30+
extern "C" void __morestack(void *args, void *fn_ptr, uintptr_t stack_ptr);
3131

3232
class context {
3333
public:
@@ -55,7 +55,7 @@ class context {
5555
}
5656

5757
void call_shim_on_c_stack(void *args, void *fn_ptr) {
58-
asm_call_on_stack(args, fn_ptr, regs.data[RUSTRT_RSP]);
58+
__morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);
5959
}
6060
};
6161

trunk/src/rt/rustrt.def.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ upcall_call_shim_on_c_stack
7373
upcall_new_stack
7474
upcall_del_stack
7575
upcall_reset_stack_limit
76-
asm_call_on_stack
7776
rust_uv_default_loop
7877
rust_uv_loop_new
7978
rust_uv_loop_delete

0 commit comments

Comments
 (0)