[pypy-commit] pypy ppc-vsx-support: simplification, distinct between integer and float case at update_at_exit
plan_rich
pypy.commits at gmail.com
Tue Nov 1 07:06:41 EDT 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch: ppc-vsx-support
Changeset: r88023:cd016619fb7f
Date: 2016-11-01 12:06 +0100
http://bitbucket.org/pypy/pypy/changeset/cd016619fb7f/
Log: simplification, distinct between integer and float case at
update_at_exit
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
@@ -693,11 +693,6 @@
self.fixup_target_tokens(rawstart)
self.teardown()
- # oprofile support
- #if self.cpu.profile_agent is not None:
- # name = "Loop # %s: %s" % (looptoken.number, loopname)
- # self.cpu.profile_agent.native_code_written(name,
- # rawstart, full_size)
#print(hex(rawstart+looppos))
#import pdb; pdb.set_trace()
return AsmInfo(ops_offset, rawstart + looppos,
@@ -1006,7 +1001,7 @@
return
# move from fp register to memory
elif loc.is_stack():
- assert loc.type == FLOAT, "target not float location"
+ assert prev_loc.type == FLOAT, "source is not a float location"
offset = loc.value
self.mc.STDY(prev_loc, l.addr(offset, r.SPP))
return
@@ -1600,8 +1595,7 @@
remap_frame_layout_mixed(self, src_locations1, dst_locations1, r.SCRATCH,
src_locations2, dst_locations2, r.FP_SCRATCH, WORD)
- offset = self.mc.get_relative_pos()
- self.mc.b_abs(asminfo.rawstart)
+ self.mc.b_abs(asminfo.asmaddr)
rawstart = self.materialize_loop(looptoken)
# update the guard to jump right to this custom piece of assembler
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
@@ -168,11 +168,15 @@
scalar_arg = accum_info.getoriginal()
orig_scalar_loc = scalar_loc
if not scalar_loc.is_reg():
- scalar_loc = r.FP_SCRATCH
+ if scalar_arg.type == FLOAT:
+ scalar_loc = r.FP_SCRATCH
+ else:
+ scalar_loc = r.SCRATCH2
+ self.regalloc_mov(orig_scalar_loc, scalar_loc)
assert scalar_arg is not None
op = accum_info.accum_operation
self._accum_reduce(op, scalar_arg, vector_loc, scalar_loc)
- if scalar_loc is r.FP_SCRATCH:
+ if scalar_loc is not orig_scalar_loc:
self.regalloc_mov(scalar_loc, orig_scalar_loc)
accum_info = accum_info.next()
@@ -268,9 +272,8 @@
else:
assert arg.type == INT
# store the vector onto the stack, just below the stack pointer
- self.mc.VST(accumloc, l.addr(0, r.SP))
- self.mc.LG(r.SCRATCH, l.addr(0, r.SP))
- self.mc.LG(targetloc, l.addr(8, r.SP))
+ self.mc.VLGV(r.SCRATCH, accumloc, l.addr(0), l.itemsize_to_mask(8))
+ self.mc.VLGV(targetloc, accumloc, l.addr(1), l.itemsize_to_mask(8))
if op == '+':
self.mc.AGR(targetloc, r.SCRATCH)
return
More information about the pypy-commit
mailing list