about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2011-10-13 12:23:50 -0700
committerBrian Anderson <banderson@mozilla.com>2011-11-02 14:13:22 -0700
commit8011e3fabb38e5bbc40038b540459595cce7a995 (patch)
treef4e5e59cce6db49091f8613dab24cffc383d6cfa /src/rt/rust_upcall.cpp
parent020cd360e1e4406c3dae93004b45104a2324d3c7 (diff)
downloadrust-8011e3fabb38e5bbc40038b540459595cce7a995.tar.gz
rust-8011e3fabb38e5bbc40038b540459595cce7a995.zip
hack around on makefiles trying to get a 64 bit build
right now there are many temporary hacks, search for NDM to find them
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 82d82323ae5..c0544383d23 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -8,11 +8,15 @@
 
 // Upcalls.
 
-#ifdef __i386__
+#if defined(__i386__) || defined(__x86_64__) || defined(_M_X64)
 void
 check_stack(rust_task *task) {
     void *esp;
+#   ifdef __i386__
     asm volatile("movl %%esp,%0" : "=r" (esp));
+#   else
+    asm volatile("mov %%rsp,%0" : "=r" (esp));
+#   endif
     if (esp < task->stk->data)
         task->kernel->fatal("Out of stack space, sorry");
 }