Commits

Armin Rigo committed 434a90e

Comments

  • Participants
  • Parent commits 03c66c0
  • Branches emit-call-x86

Comments (0)

Files changed (1)

rpython/jit/backend/x86/callbuilder.py

         self.resloc = resloc
         self.restype = restype
         self.ressize = ressize
-        self.current_esp = 0
+        self.current_esp = 0     # 0 or (usually) negative, counted in bytes
 
     def emit_no_collect(self):
         """Emit a call that cannot collect."""
 
     def restore_esp(self, target_esp=0):
         if self.current_esp != target_esp:
-            self.mc.SUB_ri(esp.value, self.current_esp - target_esp)
+            self.mc.ADD_ri(esp.value, target_esp - self.current_esp)
             self.current_esp = target_esp
 
     def load_result(self):