]> git.lizzy.rs Git - rust.git/commitdiff
rt: Make morestack link on x86_64. Still utterly broken
authorBrian Anderson <banderson@mozilla.com>
Thu, 17 Nov 2011 19:12:59 +0000 (11:12 -0800)
committerBrian Anderson <banderson@mozilla.com>
Thu, 17 Nov 2011 19:12:59 +0000 (11:12 -0800)
src/rt/arch/x86_64/morestack.S

index b19ec15153708422803754e3cd6d093ccdf922b4..e7464dfdc0e5b9547ad223f12a2177df74f06e52 100644 (file)
@@ -8,9 +8,11 @@
 #if defined(__APPLE__) || defined(_WIN32)
 #define RUST_NEW_STACK      _rust_new_stack
 #define RUST_DEL_STACK      _rust_del_stack
+#define MORESTACK           __morestack
 #else
 #define RUST_NEW_STACK      rust_new_stack
 #define RUST_DEL_STACK      rust_del_stack
+#define MORESTACK           __morestack
 #endif
 
         // Naturally, nobody can agree as to
 .globl RUST_NEW_STACK
 .globl RUST_DEL_STACK
 
-.globl __morestack
+.globl MORESTACK
 
-__morestack:
+MORESTACK:
         // Hastily and probably incorrectly ported from i386 version.
         // Actually this calling convention doens't make so much sense
         // for x86_64...
         mov %rcx, ARG0      // param 0: amount of space needed
         mov %rdx, ARG2      // param 2: size of arguments
         lea 8(%rsp),ARG1
-        call RUST_NEW_STACK
+        call rust_new_stack_sym
 
         mov (%rsp),%rdx        // Grab the return pointer.
         inc %rdx               // Skip past the `ret`.
@@ -47,6 +49,10 @@ __morestack:
 
         // Now the function that called us has returned, so we need to delete the
         // old stack space.
-        call RUST_DEL_STACK
+        call rust_new_stack_sym
         mov %rax,%rsp          // Switch back to the old stack.
         ret
+
+// This is totally broken
+rust_new_stack_sym:
+rust_del_stack_sym:
\ No newline at end of file