about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-12-01 18:33:06 -0800
committerBrian Anderson <banderson@mozilla.com>2011-12-01 19:44:14 -0800
commit3e5b314c0b342d893e2937321000b55376fdbaa4 (patch)
tree5b54dd39edb1807131aeb0abf142d28d032d1c07 /src/rt
parent8bf3d85b9d501881ed737437204564b2c7a90d5e (diff)
downloadrust-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.S15
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