[pypy-svn] r64116 - pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86

fijal at codespeak.net fijal at codespeak.net
Wed Apr 15 20:04:48 CEST 2009


Author: fijal
Date: Wed Apr 15 20:04:47 2009
New Revision: 64116

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py
Log:
Some sanity checks


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py	Wed Apr 15 20:04:47 2009
@@ -821,6 +821,7 @@
                                  eax)
         self.places_to_patch_framesize.append(self.mc.tell())
         self.mc.ADD(esp, imm32(0))
+        assert guard_index >= 0
         self.mc.MOV(eax, imm(guard_index))
         self.mc.RET()
 

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py	Wed Apr 15 20:04:47 2009
@@ -640,6 +640,7 @@
 
     @staticmethod
     def cast_int_to_adr(x):
+        assert x == 0 or x > (1<<20)
         if we_are_translated():
             return rffi.cast(llmemory.Address, x)
         else:
@@ -650,6 +651,7 @@
         return rffi.cast(lltype.Signed, x)
 
     def cast_int_to_gcref(self, x):
+        assert x == 0 or x > (1<<20)
         return rffi.cast(llmemory.GCREF, x)
 
     # ---------------------------- tests ------------------------



More information about the Pypy-commit mailing list