[pypy-svn] r75881 - in pypy/trunk/pypy/jit/backend: llsupport x86
fijal at codespeak.net
fijal at codespeak.net
Tue Jul 6 08:53:53 CEST 2010
Author: fijal
Date: Tue Jul 6 08:53:52 2010
New Revision: 75881
Modified:
pypy/trunk/pypy/jit/backend/llsupport/llmodel.py
pypy/trunk/pypy/jit/backend/x86/assembler.py
pypy/trunk/pypy/jit/backend/x86/regalloc.py
Log:
support raw arrays in x86 backend
Modified: pypy/trunk/pypy/jit/backend/llsupport/llmodel.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/llsupport/llmodel.py (original)
+++ pypy/trunk/pypy/jit/backend/llsupport/llmodel.py Tue Jul 6 08:53:52 2010
@@ -311,6 +311,12 @@
items[itemindex] = newvalue
# --- end of GC unsafe code ---
+ bh_setarrayitem_raw_i = bh_setarrayitem_gc_i
+ bh_setarrayitem_raw_f = bh_setarrayitem_gc_f
+
+ bh_getarrayitem_raw_i = bh_getarrayitem_gc_i
+ bh_getarrayitem_raw_f = bh_getarrayitem_gc_f
+
def bh_strlen(self, string):
s = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
return len(s.chars)
Modified: pypy/trunk/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/assembler.py (original)
+++ pypy/trunk/pypy/jit/backend/x86/assembler.py Tue Jul 6 08:53:52 2010
@@ -815,6 +815,7 @@
raise NotImplementedError()
genop_getarrayitem_gc_pure = genop_getarrayitem_gc
+ genop_getarrayitem_raw = genop_getarrayitem_gc
def genop_discard_setfield_gc(self, op, arglocs):
base_loc, ofs_loc, size_loc, value_loc = arglocs
Modified: pypy/trunk/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/regalloc.py (original)
+++ pypy/trunk/pypy/jit/backend/x86/regalloc.py Tue Jul 6 08:53:52 2010
@@ -867,6 +867,7 @@
result_loc = self.force_allocate_reg(op.result)
self.Perform(op, [base_loc, ofs_loc, imm(scale), imm(ofs)], result_loc)
+ consider_getarrayitem_raw = consider_getarrayitem_gc
consider_getarrayitem_gc_pure = consider_getarrayitem_gc
def consider_int_is_true(self, op, guard_op):
More information about the Pypy-commit
mailing list