From 272e2eea0d1e584129ca97aba42cb104ea1072d5 Mon Sep 17 00:00:00 2001 From: Guillaume Emont Date: Wed, 12 Dec 2012 12:09:26 +0100 Subject: [PATCH] mips: convsuswb and convssswb: put results in lower half --- orc/orcrules-mips.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/orc/orcrules-mips.c b/orc/orcrules-mips.c index f9e13cd..5a15a51 100644 --- a/orc/orcrules-mips.c +++ b/orc/orcrules-mips.c @@ -240,8 +240,10 @@ mips_rule_convssswb (OrcCompiler *compiler, void *user, OrcInstruction *insn) orc_mips_emit_cmp_lt_ph (compiler, tmp, src); orc_mips_emit_pick_ph (compiler, dest, tmp, src); orc_mips_emit_repl_ph (compiler, tmp, ORC_SB_MIN); - orc_mips_emit_cmp_lt_ph (compiler, src, tmp); - orc_mips_emit_pick_ph (compiler, dest, tmp, src); + orc_mips_emit_cmp_lt_ph (compiler, dest, tmp); + orc_mips_emit_pick_ph (compiler, dest, tmp, dest); + if (compiler->insn_shift > 0) + orc_mips_emit_precr_qb_ph (compiler, dest, ORC_MIPS_ZERO, dest); } void @@ -254,8 +256,10 @@ mips_rule_convsuswb (OrcCompiler *compiler, void *user, OrcInstruction *insn) orc_mips_emit_repl_ph (compiler, tmp, ORC_UB_MAX); orc_mips_emit_cmp_lt_ph (compiler, tmp, src); orc_mips_emit_pick_ph (compiler, dest, tmp, src); - orc_mips_emit_cmp_lt_ph (compiler, src, ORC_MIPS_ZERO); - orc_mips_emit_pick_ph (compiler, dest, ORC_MIPS_ZERO, src); + orc_mips_emit_cmp_lt_ph (compiler, dest, ORC_MIPS_ZERO); + orc_mips_emit_pick_ph (compiler, dest, ORC_MIPS_ZERO, dest); + if (compiler->insn_shift > 0) + orc_mips_emit_precr_qb_ph (compiler, dest, ORC_MIPS_ZERO, dest); } -- 2.7.4