[pypy-commit] pypy backend-vector-ops: start declaring what we need
fijal
noreply at buildbot.pypy.org
Wed Feb 1 12:24:21 CET 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: backend-vector-ops
Changeset: r52007:52478d84d718
Date: 2012-01-31 22:08 +0200
http://bitbucket.org/pypy/pypy/changeset/52478d84d718/
Log: start declaring what we need
diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -3140,6 +3140,11 @@
fail = self.cpu.execute_token(looptoken2, -9)
assert fail.identifier == 42
+ def test_vector_ops(self):
+ ops = """
+ [p0]
+ guard_array_aligned(p0) []
+ """
class OOtypeBackendTest(BaseBackendTest):
diff --git a/pypy/jit/metainterp/history.py b/pypy/jit/metainterp/history.py
--- a/pypy/jit/metainterp/history.py
+++ b/pypy/jit/metainterp/history.py
@@ -17,6 +17,7 @@
INT = 'i'
REF = 'r'
FLOAT = 'f'
+VECTOR = 'e'
STRUCT = 's'
HOLE = '_'
VOID = 'v'
@@ -481,6 +482,18 @@
def repr_rpython(self):
return repr_rpython(self, 'bi')
+class BoxFloatVector(Box):
+ type = VECTOR
+
+ def __init__(self, floats):
+ self.floats = floats
+
+class BoxIntVector(Box):
+ type = VECTOR
+
+ def __init__(self, ints):
+ self.ints = ints
+
class BoxFloat(Box):
type = FLOAT
_attrs_ = ('value',)
diff --git a/pypy/jit/metainterp/resoperation.py b/pypy/jit/metainterp/resoperation.py
--- a/pypy/jit/metainterp/resoperation.py
+++ b/pypy/jit/metainterp/resoperation.py
@@ -393,6 +393,7 @@
'GUARD_OVERFLOW/0d',
'GUARD_NOT_FORCED/0d', # may be called with an exception currently set
'GUARD_NOT_INVALIDATED/0d',
+ 'GUARD_ARRAY_ALIGNED/1d',
'_GUARD_LAST', # ----- end of guard operations -----
'_NOSIDEEFFECT_FIRST', # ----- start of no_side_effect operations -----
@@ -415,6 +416,7 @@
'FLOAT_TRUEDIV/2',
'FLOAT_NEG/1',
'FLOAT_ABS/1',
+ 'FLOAT_VECTOR_ADD/2',
'CAST_FLOAT_TO_INT/1', # don't use for unsigned ints; we would
'CAST_INT_TO_FLOAT/1', # need some messy code in the backend
'CAST_FLOAT_TO_SINGLEFLOAT/1',
@@ -467,6 +469,7 @@
'_ALWAYS_PURE_LAST', # ----- end of always_pure operations -----
'GETARRAYITEM_GC/2d',
+ 'GETARRAYITEM_VECTOR_RAW/2d',
'GETARRAYITEM_RAW/2d',
'GETINTERIORFIELD_GC/2d',
'GETINTERIORFIELD_RAW/2d',
@@ -487,6 +490,7 @@
'SETARRAYITEM_GC/3d',
'SETARRAYITEM_RAW/3d',
+ 'SETARRAYITEM_VECTOR_RAW/2d',
'SETINTERIORFIELD_GC/3d',
'SETINTERIORFIELD_RAW/3d',
'SETFIELD_GC/2d',
More information about the pypy-commit
mailing list