[pypy-commit] pypy s390x-backend: removed size info from call builder when assembling call_assembler (it is not needed),
plan_rich
pypy.commits at gmail.com
Thu Jan 28 05:32:58 EST 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch: s390x-backend
Changeset: r81992:e6d4a987b802
Date: 2016-01-28 11:32 +0100
http://bitbucket.org/pypy/pypy/changeset/e6d4a987b802/
Log: removed size info from call builder when assembling call_assembler
(it is not needed), removed several not necessary stack frame
allocations in the jit
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
@@ -44,7 +44,6 @@
self.current_clt = None
self._regalloc = None
self.datablockwrapper = None
- self.subject_op = None # needed in call assembler to pass by the operation
self.propagate_exception_path = 0
self.stack_check_slowpath = 0
self.loop_run_counters = []
@@ -332,10 +331,8 @@
# Do the call
adr = rffi.cast(lltype.Signed, self.cpu.realloc_frame)
- mc.push_std_frame()
mc.load_imm(mc.RAW_CALL_REG, adr)
mc.raw_call()
- mc.pop_std_frame()
# The result is stored back into SPP (= r31)
mc.LGR(r.SPP, r.r2)
@@ -595,11 +592,9 @@
# LGHI r0, ... (4 bytes)
# sum -> (14 bytes)
mc.write('\x00'*14)
- mc.push_std_frame()
mc.load_imm(r.RETURN, self._frame_realloc_slowpath)
self.load_gcmap(mc, r.r1, gcmap)
mc.raw_call()
- mc.pop_std_frame()
self.frame_depth_to_patch.append((patch_pos, mc.currpos()))
diff --git a/rpython/jit/backend/zarch/opassembler.py b/rpython/jit/backend/zarch/opassembler.py
--- a/rpython/jit/backend/zarch/opassembler.py
+++ b/rpython/jit/backend/zarch/opassembler.py
@@ -1034,10 +1034,8 @@
if basesize != 0:
self.mc.AGHI(r.r2, l.imm(basesize))
- self.mc.push_std_frame()
self.mc.load_imm(self.mc.RAW_CALL_REG, self.memcpy_addr)
self.mc.raw_call()
- self.mc.pop_std_frame()
def emit_zero_array(self, op, arglocs, regalloc):
base_loc, startindex_loc, length_loc, \
@@ -1090,9 +1088,7 @@
vloc = imm(0)
self._store_force_index(self._find_nearby_operation(regalloc, +1))
# 'result_loc' is either r2, f0 or None
- self.subject_op = op
self.call_assembler(op, argloc, vloc, result_loc, r.r2)
- self.subject_op = None
self.mc.LARL(r.POOL, l.halfword(self.pool.pool_start - self.mc.get_relative_pos()))
emit_call_assembler_i = _genop_call_assembler
@@ -1106,13 +1102,11 @@
self.regalloc_mov(argloc, r.r2)
self.mc.LG(r.r3, l.addr(THREADLOCAL_ADDR_OFFSET, r.SP))
- descr = self.subject_op.getdescr()
- cb = callbuilder.CallBuilder(self, addr, [r.r2, r.r3], r.r2, descr)
+ cb = callbuilder.CallBuilder(self, addr, [r.r2, r.r3], r.r2, None)
cb.emit()
def _call_assembler_emit_helper_call(self, addr, arglocs, result_loc):
- descr = self.subject_op.getdescr()
- cb = callbuilder.CallBuilder(self, addr, arglocs, result_loc, descr)
+ cb = callbuilder.CallBuilder(self, addr, arglocs, result_loc, None)
cb.emit()
def _call_assembler_check_descr(self, value, tmploc):
diff --git a/rpython/jit/backend/zarch/test/test_ztranslation_call_assembler.py b/rpython/jit/backend/zarch/test/test_ztranslation_call_assembler.py
--- a/rpython/jit/backend/zarch/test/test_ztranslation_call_assembler.py
+++ b/rpython/jit/backend/zarch/test/test_ztranslation_call_assembler.py
@@ -1,10 +1,11 @@
from rpython.jit.backend.llsupport.test.ztranslation_test import TranslationTestCallAssembler
from rpython.translator.translator import TranslationContext
from rpython.config.translationoption import DEFL_GC
-from rpython.jit.backend.zarch.arch import WORD
-import sys
class TestTranslationCallAssemblerZARCH(TranslationTestCallAssembler):
- def _check_cbuilder(self, cbuilder):
- pass
+ def _get_TranslationContext(self):
+ t = TranslationContext()
+ t.config.translation.gc = DEFL_GC # 'hybrid' or 'minimark'
+ t.config.translation.list_comprehension_operations = True
+ return t
diff --git a/rpython/jit/backend/zarch/test/test_ztranslation_external_exception.py b/rpython/jit/backend/zarch/test/test_ztranslation_external_exception.py
--- a/rpython/jit/backend/zarch/test/test_ztranslation_external_exception.py
+++ b/rpython/jit/backend/zarch/test/test_ztranslation_external_exception.py
@@ -1,19 +1,11 @@
from rpython.jit.backend.llsupport.test.ztranslation_test import TranslationRemoveTypePtrTest
from rpython.translator.translator import TranslationContext
from rpython.config.translationoption import DEFL_GC
-from rpython.translator.platform import platform as compiler
-if compiler.name == 'msvc':
- _MSVC = True
-else:
- _MSVC = False
-
-class TestTranslationRemoveTypePtrX86(TranslationRemoveTypePtrTest):
+class TestTranslationRemoveTypePtrZARCH(TranslationRemoveTypePtrTest):
def _get_TranslationContext(self):
t = TranslationContext()
t.config.translation.gc = DEFL_GC # 'hybrid' or 'minimark'
- if not _MSVC:
- t.config.translation.gcrootfinder = 'asmgcc'
t.config.translation.list_comprehension_operations = True
t.config.translation.gcremovetypeptr = True
return t
More information about the pypy-commit
mailing list