[pypy-commit] pypy default: arm support
arigo
pypy.commits at gmail.com
Mon Jul 18 10:55:12 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r85759:efbe6e613897
Date: 2016-07-18 16:18 +0200
http://bitbucket.org/pypy/pypy/changeset/efbe6e613897/
Log: arm support
diff --git a/rpython/jit/backend/arm/assembler.py b/rpython/jit/backend/arm/assembler.py
--- a/rpython/jit/backend/arm/assembler.py
+++ b/rpython/jit/backend/arm/assembler.py
@@ -82,9 +82,6 @@
self.failure_recovery_code = [0, 0, 0, 0]
def _build_propagate_exception_path(self):
- if not self.cpu.propagate_exception_descr:
- return # not supported (for tests, or non-translated)
- #
mc = InstrBuilder(self.cpu.cpuinfo.arch_version)
self._store_and_reset_exception(mc, r.r0)
ofs = self.cpu.get_ofs_of_frame_field('jf_guard_exc')
@@ -372,9 +369,9 @@
self._write_barrier_fastpath(mc, wbdescr, [r.fp], array=False,
is_frame=True)
- def propagate_memoryerror_if_r0_is_null(self):
- # see ../x86/assembler.py:propagate_memoryerror_if_eax_is_null
- self.mc.CMP_ri(r.r0.value, 0)
+ def propagate_memoryerror_if_reg_is_null(self, reg_loc):
+ # see ../x86/assembler.py:genop_discard_check_memory_error()
+ self.mc.CMP_ri(reg_loc.value, 0)
self.mc.B(self.propagate_exception_path, c=c.EQ)
def _push_all_regs_to_jitframe(self, mc, ignored_regs, withfloats,
diff --git a/rpython/jit/backend/arm/opassembler.py b/rpython/jit/backend/arm/opassembler.py
--- a/rpython/jit/backend/arm/opassembler.py
+++ b/rpython/jit/backend/arm/opassembler.py
@@ -1050,9 +1050,8 @@
regalloc = self._regalloc
return regalloc.operations[regalloc.rm.position + delta]
- def emit_op_call_malloc_gc(self, op, arglocs, regalloc, fcond):
- self._emit_call(op, arglocs, fcond=fcond)
- self.propagate_memoryerror_if_r0_is_null()
+ def emit_op_check_memory_error(self, op, arglocs, regalloc, fcond):
+ self.propagate_memoryerror_if_reg_is_null(arglocs[0])
self._alignment_check()
return fcond
diff --git a/rpython/jit/backend/arm/regalloc.py b/rpython/jit/backend/arm/regalloc.py
--- a/rpython/jit/backend/arm/regalloc.py
+++ b/rpython/jit/backend/arm/regalloc.py
@@ -594,8 +594,9 @@
resloc = self.after_call(op)
return resloc
- def prepare_op_call_malloc_gc(self, op, fcond):
- return self._prepare_call(op)
+ def prepare_op_check_memory_error(self, op, fcond):
+ argloc = self.make_sure_var_in_reg(op.getarg(0))
+ return [argloc]
def _prepare_llong_binop_xx(self, op, fcond):
# arg 0 is the address of the function
More information about the pypy-commit
mailing list