summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Emont <guijemont@igalia.com>2012-12-15 18:27:40 +0100
committerGuillaume Emont <guijemont@igalia.com>2012-12-28 15:23:39 +0100
commit8c30591ca62a6d4430eed95dc28e608aeea3fd8a (patch)
treee7499fe3d1598913f855f1189e0d9169623fb544
parentb959c0830459e166cbc4b0f47d133942639cb0ab (diff)
mips: added convwb
-rw-r--r--orc/orcrules-mips.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/orc/orcrules-mips.c b/orc/orcrules-mips.c
index 967249a..8e0e0d6 100644
--- a/orc/orcrules-mips.c
+++ b/orc/orcrules-mips.c
@@ -574,6 +574,16 @@ mips_rule_subw (OrcCompiler *compiler, void *user, OrcInstruction *insn)
orc_mips_emit_subq_ph (compiler, dest, src1, src2);
}
+void
+mips_rule_convwb (OrcCompiler *compiler, void *user, OrcInstruction *insn)
+{
+ int src = ORC_SRC_ARG (compiler, insn, 0);
+ int dest = ORC_DEST_ARG (compiler, insn, 0);
+
+ if (compiler->insn_shift >0)
+ orc_mips_emit_precr_qb_ph (compiler, dest, ORC_MIPS_ZERO, src);
+}
+
void
orc_compiler_orc_mips_register_rules (OrcTarget *target)
@@ -606,6 +616,7 @@ orc_compiler_orc_mips_register_rules (OrcTarget *target)
orc_rule_register (rule_set, "convsuswb", mips_rule_convsuswb, NULL);
orc_rule_register (rule_set, "convsbw", mips_rule_convsbw, NULL);
orc_rule_register (rule_set, "convubw", mips_rule_convubw, NULL);
+ orc_rule_register (rule_set, "convwb", mips_rule_convwb, NULL);
orc_rule_register (rule_set, "mergewl", mips_rule_mergewl, NULL);
orc_rule_register (rule_set, "mergebw", mips_rule_mergebw, NULL);
orc_rule_register (rule_set, "addssw", mips_rule_addssw, NULL);