about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorJyun-Yan You <jyyou@cs.nctu.edu.tw>2012-01-01 14:36:48 +0800
committerBrian Anderson <banderson@mozilla.com>2012-01-01 20:18:55 -0800
commit21eadbe6f1f3390e61e4be58b277c35f590d4f76 (patch)
treeb2be61a3bf4db80b4873ae527dbf8d521ae4f686 /src/rt
parentd4884b6c6e3ea6b4b9da305eb48250179448ad31 (diff)
add missing library, enable segmented stacks for freebsd
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/arch/x86_64/record_sp.S10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rt/arch/x86_64/record_sp.S b/src/rt/arch/x86_64/record_sp.S
index 4330d4cfb76..3b238d33c77 100644
--- a/src/rt/arch/x86_64/record_sp.S
+++ b/src/rt/arch/x86_64/record_sp.S
@@ -14,21 +14,23 @@
 .globl GET_SP
 .globl CHECK_STACK
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__)
 RECORD_SP:
 	movq %rdi, %fs:112
 	ret
-#else
-#if defined(__APPLE__)
+#elif defined(__APPLE__)
 RECORD_SP:
 	movq $0x60+90*8, %rsi
 	movq %rdi, %gs:(%rsi)
 	ret
+#elif defined(__FreeBSD__)
+RECORD_SP:
+	movq %rdi, %fs:24
+	ret
 #else
 RECORD_SP:
 	ret
 #endif
-#endif
 
 GET_SP:
 	movq %rsp, %rax