[pypy-svn] r62688 - pypy/branch/pyjitpl5/pypy/jit/backend/x86
fijal at codespeak.net
fijal at codespeak.net
Sat Mar 7 11:27:14 CET 2009
Author: fijal
Date: Sat Mar 7 11:27:14 2009
New Revision: 62688
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
Log:
I were right. We're not suppose to do such tricks here. Move it to assembler
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py Sat Mar 7 11:27:14 2009
@@ -432,6 +432,16 @@
if loc is not eax:
self.mc.MOV(eax, loc)
self.mc.ADD(esp, imm(FRAMESIZE))
+ # copy exception to some safe place and clean the original
+ # one
+ self.mc.MOV(ecx, heap(self._exception_addr))
+ self.mc.MOV(heap(self._exception_bck_addr), ecx)
+ self.mc.MOV(ecx, addr_add(imm(self._exception_addr), imm(WORD)))
+ self.mc.MOV(addr_add(imm(self._exception_bck_addr), imm(WORD)),
+ ecx)
+ # clean up the original exception, we don't want
+ # to enter more rpython code with exc set
+ self.mc.MOV(heap(self._exception_addr), imm(0))
self.mc.RET()
def genop_jump(self, op, locs):
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py Sat Mar 7 11:27:14 2009
@@ -551,10 +551,6 @@
else:
self.return_value_type = INT
result = self.execute_operations_in_new_frame('call', mp, args)
- # XXX I'm not sure if we're supposed to do that here, probably only
- # in assembler
- self.assembler._exception_bck[0] = self.assembler._exception_data[0]
- self.assembler._exception_bck[1] = self.assembler._exception_data[1]
return result
# ------------------- helpers and descriptions --------------------
More information about the Pypy-commit
mailing list