Author: Matti Picus <[email protected]>
Branch: align_float_cast
Changeset: r69130:43345880f21c
Date: 2013-12-27 12:30 +0200
http://bitbucket.org/pypy/pypy/changeset/43345880f21c/
Log: first pass - mark raw_load as xxx and remove non-aligned fast path
diff --git a/TODO b/TODO
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
- - fix jitted assembler
+ - add test for unaligned OP_RAW_LOAD in translator/c/funcgen
+ - fix jitted assembler, new opcode?
- add fast path for aligned float
- - test non-aligned write, fix
+ - repeat all this for raw_store
+ - use in pypy/module/_rawffi instead of write_ptr, read_ptr
diff --git a/rpython/jit/backend/arm/opassembler.py
b/rpython/jit/backend/arm/opassembler.py
--- a/rpython/jit/backend/arm/opassembler.py
+++ b/rpython/jit/backend/arm/opassembler.py
@@ -766,6 +766,7 @@
emit_op_getarrayitem_gc_pure = emit_op_getarrayitem_gc
def emit_op_raw_load(self, op, arglocs, regalloc, fcond):
+ xxx
res_loc, base_loc, ofs_loc, scale, ofs = arglocs
assert ofs_loc.is_core_reg()
# no base offset
diff --git a/rpython/jit/backend/x86/assembler.py
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -1409,6 +1409,7 @@
genop_getarrayitem_raw_pure = genop_getarrayitem_gc
def genop_raw_load(self, op, arglocs, resloc):
+ xxx # This seems to relate to pointers?
base_loc, ofs_loc, size_loc, ofs, sign_loc = arglocs
assert isinstance(ofs, ImmedLoc)
src_addr = addr_add(base_loc, ofs_loc, ofs.value, 0)
diff --git a/rpython/rlib/rawstorage.py b/rpython/rlib/rawstorage.py
--- a/rpython/rlib/rawstorage.py
+++ b/rpython/rlib/rawstorage.py
@@ -34,23 +34,6 @@
def free_raw_storage(storage, track_allocation=True):
lltype.free(storage, flavor='raw', track_allocation=track_allocation)
-class RawStorageGetitemEntryUnaligned(ExtRegistryEntry):
- _about_ = raw_storage_getitem_unaligned
-
- def compute_result_annotation(self, s_TP, s_storage, s_index):
- assert s_TP.is_constant()
- return annmodel.lltype_to_annotation(s_TP.const)
-
- def specialize_call(self, hop):
- assert hop.args_r[1].lowleveltype == RAW_STORAGE_PTR
- v_storage = hop.inputarg(hop.args_r[1], arg=1)
- v_index = hop.inputarg(lltype.Signed, arg=2)
- hop.exception_cannot_occur()
- v_addr = hop.genop('cast_ptr_to_adr', [v_storage],
- resulttype=llmemory.Address)
- return hop.genop('raw_load', [v_addr, v_index],
- resulttype=hop.r_result.lowleveltype)
-
class RawStorageGetitemEntry(ExtRegistryEntry):
_about_ = raw_storage_getitem
diff --git a/rpython/rtyper/llinterp.py b/rpython/rtyper/llinterp.py
--- a/rpython/rtyper/llinterp.py
+++ b/rpython/rtyper/llinterp.py
@@ -954,6 +954,7 @@
op_raw_memmove = op_raw_memcopy # this is essentially the same here
def op_raw_load(self, RESTYPE, addr, offset):
+ xxx
checkadr(addr)
if isinstance(offset, int):
from rpython.rtyper.lltypesystem import rffi
diff --git a/rpython/rtyper/lltypesystem/opimpl.py
b/rpython/rtyper/lltypesystem/opimpl.py
--- a/rpython/rtyper/lltypesystem/opimpl.py
+++ b/rpython/rtyper/lltypesystem/opimpl.py
@@ -670,6 +670,7 @@
p[0] = newvalue
def op_raw_load(TVAL, p, ofs):
+ xxx
from rpython.rtyper.lltypesystem import rffi
p = rffi.cast(llmemory.Address, p)
p = rffi.cast(rffi.CArrayPtr(TVAL), p + ofs)
diff --git a/rpython/translator/c/funcgen.py b/rpython/translator/c/funcgen.py
--- a/rpython/translator/c/funcgen.py
+++ b/rpython/translator/c/funcgen.py
@@ -695,6 +695,7 @@
OP_BARE_RAW_STORE = OP_RAW_STORE
def OP_RAW_LOAD(self, op):
+ xxx
addr = self.expr(op.args[0])
offset = self.expr(op.args[1])
result = self.expr(op.result)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit