Sven Hager avatar Sven Hager committed b7a4abd

Implemented INT_AND, INT_OR, INT_XOR.

Comments (0)

Files changed (2)

pypy/jit/backend/ppc/ppcgen/opassembler.py

         self.mc.subf(r.r0.value, r.r0.value, l0.value)
         self.mc.mr(res.value, r.r0.value)
 
+    def emit_int_and(self, op, arglocs, regalloc):
+        l0, l1, res = arglocs
+        self.mc.and_(res.value, l0.value, l1.value)
+
+    def emit_int_or(self, op, arglocs, regalloc):
+        l0, l1, res = arglocs
+        self.mc.or_(res.value, l0.value, l1.value)
+
+    def emit_int_xor(self, op, arglocs, regalloc):
+        l0, l1, res = arglocs
+        self.mc.xor(res.value, l0.value, l1.value)
+
     emit_int_le = gen_emit_cmp_op(c.LE)   
 
     def _emit_guard(self, op, arglocs, fcond, save_exc=False,

pypy/jit/backend/ppc/ppcgen/regalloc.py

     def prepare_int_mod(self, op):
         return self.prepare_int_mul(op)
 
+    def prepare_int_and(self, op):
+        return self.prepare_int_mul(op)
+
+    def prepare_int_or(self, op):
+        return self.prepare_int_mul(op)
+
+    def prepare_int_xor(self, op):
+        return self.prepare_int_mul(op)
+
     def prepare_finish(self, op):
         args = [locations.imm(self.frame_manager.frame_depth)]
         for i in range(op.numargs()):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.