diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-12-01 18:33:06 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-12-01 19:44:14 -0800 |
| commit | 3e5b314c0b342d893e2937321000b55376fdbaa4 (patch) | |
| tree | 5b54dd39edb1807131aeb0abf142d28d032d1c07 /src/rt | |
| parent | 8bf3d85b9d501881ed737437204564b2c7a90d5e (diff) | |
| download | rust-3e5b314c0b342d893e2937321000b55376fdbaa4.tar.gz rust-3e5b314c0b342d893e2937321000b55376fdbaa4.zip | |
rt: Implement __morestack for 64-bit mac. Doesn't unwind yet
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/arch/x86_64/morestack.S | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/rt/arch/x86_64/morestack.S b/src/rt/arch/x86_64/morestack.S index 556a12b4ecb..9b8f2fe9180 100644 --- a/src/rt/arch/x86_64/morestack.S +++ b/src/rt/arch/x86_64/morestack.S @@ -48,16 +48,12 @@ .type MORESTACK,@function #endif -#if defined(__linux__) +#if defined(__linux__) || defined(__APPLE__) MORESTACK: - .cfi_startproc # Set up a normal backtrace pushq %rbp - .cfi_def_cfa_offset 16 - .cfi_offset %rbp, -16 movq %rsp, %rbp - .cfi_def_cfa_register %rbp // FIXME: libgcc also saves rax. not sure if we need to @@ -79,9 +75,9 @@ MORESTACK: pushq %rcx // Address of stack arguments pushq %r10 // The amount of stack needed - leaq UPCALL_NEW_STACK@PLT(%rip), %rsi + movq UPCALL_NEW_STACK@GOTPCREL(%rip), %rsi movq %rsp, %rdi - call UPCALL_CALL_C@PLT + call UPCALL_CALL_C@GOTPCREL // Pop the new_stack_args struct addq $24, %rsp @@ -106,15 +102,14 @@ MORESTACK: // Align the stack again pushq $0 - leaq UPCALL_DEL_STACK@PLT(%rip), %rsi + movq UPCALL_DEL_STACK@GOTPCREL(%rip), %rsi movq $0, %rdi - call UPCALL_CALL_C@PLT + call UPCALL_CALL_C@GOTPCREL addq $8, %rsp popq %rbp ret - .cfi_endproc #else MORESTACK: ret |
