Author: Richard Plangger <planri...@gmail.com>
Branch: zarch-simd-support
Changeset: r87071:15d0e9941274
Date: 2016-09-13 12:40 +0200
http://bitbucket.org/pypy/pypy/changeset/15d0e9941274/

Log:    more changes to get first tests to fail at assembly

diff --git a/rpython/jit/backend/zarch/assembler.py 
b/rpython/jit/backend/zarch/assembler.py
--- a/rpython/jit/backend/zarch/assembler.py
+++ b/rpython/jit/backend/zarch/assembler.py
@@ -33,11 +33,13 @@
 from rpython.rtyper.annlowlevel import llhelper, cast_instance_to_gcref
 from rpython.rlib.jit import AsmInfo
 from rpython.rlib.rjitlog import rjitlog as jl
+from rpython.jit.backend.zarch import vector_ext
 
 class JitFrameTooDeep(Exception):
     pass
 
-class AssemblerZARCH(BaseAssembler, OpAssembler):
+class AssemblerZARCH(BaseAssembler, OpAssembler,
+                     vector_ext.VectorAssembler):
 
     def __init__(self, cpu, translate_support_code=False):
         BaseAssembler.__init__(self, cpu, translate_support_code)
diff --git a/rpython/jit/backend/zarch/runner.py 
b/rpython/jit/backend/zarch/runner.py
--- a/rpython/jit/backend/zarch/runner.py
+++ b/rpython/jit/backend/zarch/runner.py
@@ -2,6 +2,7 @@
 from rpython.jit.backend.zarch import registers as r
 from rpython.jit.backend.zarch.assembler import AssemblerZARCH
 from rpython.jit.backend.zarch.codebuilder import InstrBuilder
+from rpython.jit.backend.zarch import vector_ext
 from rpython.rlib import rgc
 from rpython.rtyper.lltypesystem import lltype, llmemory
 
@@ -16,7 +17,7 @@
     supports_floats = True
     from rpython.jit.backend.zarch.registers import JITFRAME_FIXED_SIZE
 
-    vector_ext = SIMDZVectorExt()
+    vector_ext = vector_ext.ZSIMDVectorExt()
 
     backend_name = 'zarch'
 
diff --git a/rpython/jit/backend/zarch/vector_ext.py 
b/rpython/jit/backend/zarch/vector_ext.py
--- a/rpython/jit/backend/zarch/vector_ext.py
+++ b/rpython/jit/backend/zarch/vector_ext.py
@@ -10,17 +10,14 @@
 from rpython.rlib.objectmodel import we_are_translated
 from rpython.rtyper.lltypesystem.lloperation import llop
 from rpython.rtyper.lltypesystem import lltype
-from rpython.jit.backend.ppc.locations import imm, RegisterLocation
-from rpython.jit.backend.ppc.arch import IS_BIG_ENDIAN
 from rpython.jit.backend.llsupport.vector_ext import VectorExt
-from rpython.jit.backend.ppc.arch import PARAM_SAVE_AREA_OFFSET
-import rpython.jit.backend.ppc.register as r
-import rpython.jit.backend.ppc.condition as c
-import rpython.jit.backend.ppc.locations as l
+from rpython.jit.backend.zarch.detect_feature import detect_simd_z
+import rpython.jit.backend.zarch.registers as r
+import rpython.jit.backend.zarch.conditions as c
+import rpython.jit.backend.zarch.locations as l
 from rpython.jit.backend.llsupport.asmmemmgr import MachineDataBlockWrapper
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.jit.codewriter import longlong
-from rpython.jit.backend.ppc.detect_feature import detect_vsx
 from rpython.rlib.objectmodel import always_inline
 
 def not_implemented(msg):
@@ -64,6 +61,7 @@
     #        asm.mc.load_imm(tloc, asm.VEC_DOUBLE_WORD_ONES)
     #        asm.mc.lvx(ones, 0, tloc.value)
     #    asm.mc.vsel(resval, zeros, ones, resval)
+    pass
 
 class ZSIMDVectorExt(VectorExt):
     def setup_once(self, asm):
@@ -91,6 +89,7 @@
         # TODO for i in range(len(data)):
         # TODO     addr[i] = data[i]
         # TODO self.VEC_DOUBLE_WORD_ONES = mem
+        pass
 
     def emit_vec_load_f(self, op, arglocs, regalloc):
         resloc, baseloc, indexloc, size_loc, ofs, integer_loc = arglocs
@@ -314,7 +313,7 @@
             self.mc.xvcmpeqdpx(tmp, loc1.value, loc2.value)
             self.mc.stxvd2x(tmp, off, r.SP.value)
         else:
-            not_implemented("[ppc/assembler] float == for size %d" % size)
+            not_implemented("[zarch/assembler] float == for size %d" % size)
         self.mc.lvx(resloc.value, off, r.SP.value)
         flush_vec_cc(self, regalloc, c.VEQI, op.bytesize, resloc)
 
@@ -583,10 +582,6 @@
         self.mc.load_imm(offloc, PARAM_SAVE_AREA_OFFSET)
         self.mc.xvcvdpsxds(res.value, l0.value)
 
-    # needed as soon as PPC's support_singlefloat is implemented!
-    #def genop_vec_cast_singlefloat_to_float(self, op, arglocs, regalloc):
-    #    self.mc.CVTPS2PD(resloc, arglocs[0])
-
     def emit_vec_f(self, op, arglocs, regalloc):
         pass
     emit_vec_i = emit_vec_f
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to