Author: Richard Plangger <planri...@gmail.com> Branch: s390x-backend Changeset: r80397:6f08bc334a9b Date: 2015-10-22 16:15 +0200 http://bitbucket.org/pypy/pypy/changeset/6f08bc334a9b/
Log: floating point comparison operations diff --git a/rpython/jit/backend/zarch/instructions.py b/rpython/jit/backend/zarch/instructions.py --- a/rpython/jit/backend/zarch/instructions.py +++ b/rpython/jit/backend/zarch/instructions.py @@ -146,6 +146,11 @@ 'DIEBR': ('rrf', ['\xB3','\x53'], 'r,r,r,m'), 'DIDBR': ('rrf', ['\xB3','\x5B'], 'r,r,r,m'), + # COMPARISON + 'CEBR': ('rre', ['\xB3','\x09']), + 'CDBR': ('rre', ['\xB3','\x19']), + 'CEB': ('rxe', ['\xED','\x09'], 'r,bidl,-'), + 'CDB': ('rxe', ['\xED','\x19'], 'r,bidl,-'), } all_mnemonic_codes = { diff --git a/rpython/jit/backend/zarch/test/test_assembler.py b/rpython/jit/backend/zarch/test/test_assembler.py --- a/rpython/jit/backend/zarch/test/test_assembler.py +++ b/rpython/jit/backend/zarch/test/test_assembler.py @@ -351,3 +351,16 @@ run_asm(self.a) assert isclose(mem[0], 12345.0) + def test_float_cmp(self): + with ActivationRecordCtx(self): + with LiteralPoolCtx(self) as pool: + pool.float(1.0) + pool.float(2.0) + self.mc.LD(reg.f0, loc.addr(0, reg.r13)) + self.mc.LD(reg.f1, loc.addr(8, reg.r13)) + self.mc.CDBR(reg.f0, reg.f1) + self.mc.LGHI(reg.r2, loc.imm(0)) + self.mc.BCR(con.EQ, reg.r14) # must not branch + self.mc.LGHI(reg.r2, loc.imm(1)) + self.a.jmpto(reg.r14) + assert run_asm(self.a) == 1 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit