Skip to content

Commit 1cebb01

Browse files
committed
---
yaml --- r: 6541 b: refs/heads/master c: 3e5b314 h: refs/heads/master i: 6539: c936566 v: v3
1 parent 2592a26 commit 1cebb01

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
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: 8bf3d85b9d501881ed737437204564b2c7a90d5e
2+
refs/heads/master: 3e5b314c0b342d893e2937321000b55376fdbaa4

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,12 @@
4848
.type MORESTACK,@function
4949
#endif
5050

51-
#if defined(__linux__)
51+
#if defined(__linux__) || defined(__APPLE__)
5252
MORESTACK:
53-
.cfi_startproc
5453

5554
# Set up a normal backtrace
5655
pushq %rbp
57-
.cfi_def_cfa_offset 16
58-
.cfi_offset %rbp, -16
5956
movq %rsp, %rbp
60-
.cfi_def_cfa_register %rbp
6157

6258
// FIXME: libgcc also saves rax. not sure if we need to
6359

@@ -79,9 +75,9 @@ MORESTACK:
7975
pushq %rcx // Address of stack arguments
8076
pushq %r10 // The amount of stack needed
8177

82-
leaq UPCALL_NEW_STACK@PLT(%rip), %rsi
78+
movq UPCALL_NEW_STACK@GOTPCREL(%rip), %rsi
8379
movq %rsp, %rdi
84-
call UPCALL_CALL_C@PLT
80+
call UPCALL_CALL_C@GOTPCREL
8581

8682
// Pop the new_stack_args struct
8783
addq $24, %rsp
@@ -106,15 +102,14 @@ MORESTACK:
106102
// Align the stack again
107103
pushq $0
108104

109-
leaq UPCALL_DEL_STACK@PLT(%rip), %rsi
105+
movq UPCALL_DEL_STACK@GOTPCREL(%rip), %rsi
110106
movq $0, %rdi
111-
call UPCALL_CALL_C@PLT
107+
call UPCALL_CALL_C@GOTPCREL
112108

113109
addq $8, %rsp
114110
popq %rbp
115111
ret
116112

117-
.cfi_endproc
118113
#else
119114
MORESTACK:
120115
ret

0 commit comments

Comments
 (0)