about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/rt/arch/i386/context.h14
-rw-r--r--src/rt/arch/x86_64/context.h14
2 files changed, 0 insertions, 28 deletions
diff --git a/src/rt/arch/i386/context.h b/src/rt/arch/i386/context.h
index 516632fe38f..9d5d0f6d4ee 100644
--- a/src/rt/arch/i386/context.h
+++ b/src/rt/arch/i386/context.h
@@ -41,20 +41,6 @@ public:
 
   void swap(context &out);
   void call(void *f, void *arg, void *sp);
-  void call(void *f, void *sp);
-
-  // Note that this doesn't actually adjust esp. Instead, we adjust esp when
-  // we actually do the call. This is needed for exception safety -- if the
-  // function being called causes the task to fail, then we have to avoid
-  // leaking space on the C stack.
-  inline void *alloc_stack(size_t nbytes) {
-    uint32_t bot = regs.esp;
-    uint32_t top = align_down(bot - nbytes);
-
-    (void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
-
-    return reinterpret_cast<void *>(top);
-  }
 
   void call_shim_on_c_stack(void *args, void *fn_ptr) {
       __morestack(args, fn_ptr, regs.esp);
diff --git a/src/rt/arch/x86_64/context.h b/src/rt/arch/x86_64/context.h
index bb35486dbc1..651c3e93d02 100644
--- a/src/rt/arch/x86_64/context.h
+++ b/src/rt/arch/x86_64/context.h
@@ -40,20 +40,6 @@ public:
     
     void swap(context &out);
     void call(void *f, void *arg, void *sp);
-    void call(void *f, void *sp);
-    
-    // Note that this doesn't actually adjust esp. Instead, we adjust esp when
-    // we actually do the call. This is needed for exception safety -- if the
-    // function being called causes the task to fail, then we have to avoid
-    // leaking space on the C stack.
-    inline void *alloc_stack(size_t nbytes) {
-        uint64_t bot = regs.data[RUSTRT_RSP];
-        uint64_t top = align_down(bot - nbytes);
-
-        (void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
-
-        return reinterpret_cast<void *>(top);
-    }
 
     void call_shim_on_c_stack(void *args, void *fn_ptr) {
         __morestack(args, fn_ptr, regs.data[RUSTRT_RSP]);