1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 53058f4

Untested: implement increment_debug_counter for ARM

  • Participants
  • Parent commits f6f44dc
  • Branches default

Comments (0)

Files changed (2)

File rpython/jit/backend/arm/opassembler.py

View file
  • Ignore whitespace
     emit_op_getfield_gc_pure = emit_op_getfield_gc
 
     def emit_op_increment_debug_counter(self, op, arglocs, regalloc, fcond):
-        # XXX implement me
+        base_loc, value_loc = arglocs
+        self.mc.LDR_ri(value_loc.value, base_loc.value, 0, cond=fcond)
+        self.mc.ADD_ri(value_loc.value, value_loc.value, 1, cond=fcond)
+        self.mc.STR_ri(value_loc.value, base_loc.value, 0, cond=fcond)
         return fcond
 
     def emit_op_getinteriorfield_gc(self, op, arglocs, regalloc, fcond):

File rpython/jit/backend/arm/regalloc.py

View file
  • Ignore whitespace
     prepare_op_getfield_gc_pure = prepare_op_getfield_gc
 
     def prepare_op_increment_debug_counter(self, op, fcond):
-        # XXX implement me
-        return []
+        boxes = op.getarglist()
+        a0, = boxes
+        base_loc = self.make_sure_var_in_reg(a0, boxes)
+        value_loc = self.get_scratch_reg(INT, boxes)
+        self.free_temp_vars()
+        return [base_loc, value_loc]
 
     def prepare_op_getinteriorfield_gc(self, op, fcond):
         t = unpack_interiorfielddescr(op.getdescr())