Author: Richard Plangger <[email protected]>
Branch:
Changeset: r88218:b1e0b4162789
Date: 2016-11-08 14:11 +0100
http://bitbucket.org/pypy/pypy/changeset/b1e0b4162789/
Log: add intmask to arith in llgraph runner (was looking at the x86
backend all the time)
diff --git a/rpython/jit/backend/llgraph/runner.py
b/rpython/jit/backend/llgraph/runner.py
--- a/rpython/jit/backend/llgraph/runner.py
+++ b/rpython/jit/backend/llgraph/runner.py
@@ -18,7 +18,7 @@
from rpython.rtyper import rclass
from rpython.rlib.clibffi import FFI_DEFAULT_ABI
-from rpython.rlib.rarithmetic import ovfcheck, r_uint, r_ulonglong
+from rpython.rlib.rarithmetic import ovfcheck, r_uint, r_ulonglong, intmask
from rpython.rlib.objectmodel import Symbolic
class LLAsmInfo(object):
@@ -840,7 +840,7 @@
vector_arith_code = """
def bh_vec_{0}_{1}(self, vx, vy, count):
assert len(vx) == len(vy) == count
- return [_vx {2} _vy for _vx,_vy in zip(vx,vy)]
+ return [intmask(_vx {2} _vy) for _vx,_vy in zip(vx,vy)]
"""
exec py.code.Source(vector_arith_code.format('int','add','+')).compile()
exec py.code.Source(vector_arith_code.format('int','sub','-')).compile()
@@ -891,9 +891,6 @@
return [longlong.getfloatstorage(float(longlong.int2singlefloat(v)))
for v in vx]
- a = float(a)
- return longlong.getfloatstorage(a)
-
def bh_vec_cast_float_to_int(self, vx, count):
return [int(x) for x in vx]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit