5 // LLVM generates a call to this to allocate more stack space in a functiono
6 // prolog when we run out.
8 #if defined(__APPLE__) || defined(_WIN32)
9 #define RUST_NEW_STACK _rust_new_stack
10 #define RUST_DEL_STACK _rust_del_stack
12 #define RUST_NEW_STACK rust_new_stack
13 #define RUST_DEL_STACK rust_del_stack
16 // Naturally, nobody can agree as to
17 // which arguments should go in which
35 // Hastily and probably incorrectly ported from i386 version.
36 // Actually this calling convention doens't make so much sense
38 mov %rcx, ARG0 // param 0: amount of space needed
39 mov %rdx, ARG2 // param 2: size of arguments
43 mov (%rsp),%rdx // Grab the return pointer.
44 inc %rdx // Skip past the `ret`.
45 mov %rax,%rsp // Switch to the new stack.
46 call *%rdx // Enter the new function.
48 // Now the function that called us has returned, so we need to delete the
51 mov %rax,%rsp // Switch back to the old stack.