[pypy-commit] pypy default: For clarity. It used to work before too with a too-short array on 64-bits,

arigo noreply at buildbot.pypy.org
Fri Jan 20 17:14:39 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r51542:437f207e58f0
Date: 2012-01-20 17:13 +0100
http://bitbucket.org/pypy/pypy/changeset/437f207e58f0/

Log:	For clarity. It used to work before too with a too-short array on
	64-bits, but that's only because it would only need to read 'rax' or
	'xmm0', which were both in the array.

diff --git a/pypy/jit/backend/x86/runner.py b/pypy/jit/backend/x86/runner.py
--- a/pypy/jit/backend/x86/runner.py
+++ b/pypy/jit/backend/x86/runner.py
@@ -6,7 +6,7 @@
 from pypy.jit.codewriter import longlong
 from pypy.jit.metainterp import history, compile
 from pypy.jit.backend.x86.assembler import Assembler386
-from pypy.jit.backend.x86.arch import FORCE_INDEX_OFS
+from pypy.jit.backend.x86.arch import FORCE_INDEX_OFS, IS_X86_32
 from pypy.jit.backend.x86.profagent import ProfileAgent
 from pypy.jit.backend.llsupport.llmodel import AbstractLLCPU
 from pypy.jit.backend.x86 import regloc
@@ -142,7 +142,9 @@
     cast_ptr_to_int._annspecialcase_ = 'specialize:arglltype(0)'
     cast_ptr_to_int = staticmethod(cast_ptr_to_int)
 
-    all_null_registers = lltype.malloc(rffi.LONGP.TO, 24,
+    all_null_registers = lltype.malloc(rffi.LONGP.TO,
+                                       IS_X86_32 and (16+8)  # 16 + 8 regs
+                                                 or (16+16), # 16 + 16 regs
                                        flavor='raw', zero=True,
                                        immortal=True)
 


More information about the pypy-commit mailing list