[pypy-commit] pypy ppc-jit-backend: add emit_call_malloc_nursery

hager noreply at buildbot.pypy.org
Tue Feb 14 16:48:09 CET 2012


Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r52458:01a80f3d0122
Date: 2012-02-14 16:47 +0100
http://bitbucket.org/pypy/pypy/changeset/01a80f3d0122/

Log:	add emit_call_malloc_nursery

diff --git a/pypy/jit/backend/ppc/opassembler.py b/pypy/jit/backend/ppc/opassembler.py
--- a/pypy/jit/backend/ppc/opassembler.py
+++ b/pypy/jit/backend/ppc/opassembler.py
@@ -859,6 +859,17 @@
         self.emit_call(op, arglocs, regalloc)
         self.propagate_memoryerror_if_r3_is_null()
 
+    def emit_call_malloc_nursery(self, op, arglocs, regalloc):
+        # registers r3 and r4 are allocated for this call
+        assert len(arglocs) == 1
+        size = arglocs[0].value
+        gc_ll_descr = self.cpu.gc_ll_descr
+        self.malloc_cond(
+            gc_ll_descr.get_nursery_free_addr(),
+            gc_ll_descr.get_nursery_top_addr(),
+            size
+            )
+
     def set_vtable(self, box, vtable):
         if self.cpu.vtable_offset is not None:
             adr = rffi.cast(lltype.Signed, vtable)


More information about the pypy-commit mailing list