Author: David Malcolm <dmalc...@redhat.com> Branch: libgccjit-backend Changeset: r75246:207274050e18 Date: 2014-12-24 05:30 -0500 http://bitbucket.org/pypy/pypy/changeset/207274050e18/
Log: Get test_ooops/test_ooops_non_gc to pass diff --git a/rpython/jit/backend/libgccjit/assembler.py b/rpython/jit/backend/libgccjit/assembler.py --- a/rpython/jit/backend/libgccjit/assembler.py +++ b/rpython/jit/backend/libgccjit/assembler.py @@ -998,6 +998,29 @@ # + def _impl_ptr_cmp(self, resop, gcc_jit_comparison): + rval0 = self.expr_to_rvalue(resop._arg0) + rval1 = self.expr_to_rvalue(resop._arg1) + lvalres = self.expr_to_lvalue(resop.result) + resop_cmp = ( + self.ctxt.new_cast( + self.ctxt.new_comparison(gcc_jit_comparison, + rval0, rval1), + self.t_Signed) + ) + self.b_current.add_assignment(lvalres, + resop_cmp) + def emit_ptr_eq(self, resop): + self._impl_ptr_cmp(resop, self.lib.GCC_JIT_COMPARISON_EQ) + def emit_ptr_ne(self, resop): + self._impl_ptr_cmp(resop, self.lib.GCC_JIT_COMPARISON_NE) + def emit_instance_ptr_eq(self, resop): + self._impl_ptr_cmp(resop, self.lib.GCC_JIT_COMPARISON_EQ) + def emit_instance_ptr_ne(self, resop): + self._impl_ptr_cmp(resop, self.lib.GCC_JIT_COMPARISON_NE) + + # + def impl_get_lvalue_at_offset_from_ptr(self, ptr_expr, ll_offset, t_field): ptr = self.expr_to_rvalue(ptr_expr) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit