mips: convubw: extract bytes into 2 halfwords when shift==1
authorGuillaume Emont <guijemont@igalia.com>
Wed, 12 Dec 2012 11:10:31 +0000 (12:10 +0100)
committerGuillaume Emont <guijemont@igalia.com>
Fri, 28 Dec 2012 14:23:38 +0000 (15:23 +0100)
orc/orcrules-mips.c

index 5a15a51..58e68b0 100644 (file)
@@ -517,13 +517,11 @@ mips_rule_avgub (OrcCompiler *compiler, void *user, OrcInstruction *insn)
 void
 mips_rule_convubw (OrcCompiler *compiler, void *user, OrcInstruction *insn)
 {
-#if 0
   int src = ORC_SRC_ARG (compiler, insn, 0);
   int dest = ORC_DEST_ARG (compiler, insn, 0);
 
-  orc_mips_emit_replv_ph (compiler, ORC_MIPS_T3, 0xff);
-  orc_mips_emit_and (compiler, dest, src, ORC_MIPS_T3);
-#endif
+  if (compiler->insn_shift == 1)
+    orc_mips_emit_preceu_ph_qbr (compiler, dest, src);
 }
 
 void