From 26d1d89f85b707ed3a7dfa76e0bbfb0f7bcecdb9 Mon Sep 17 00:00:00 2001 From: Guillaume Emont Date: Wed, 12 Dec 2012 17:10:30 +0100 Subject: [PATCH] mips: addw/addb: always use vectorial operation, whatever the shift --- orc/orcrules-mips.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/orc/orcrules-mips.c b/orc/orcrules-mips.c index d490112..fbf1f5e 100644 --- a/orc/orcrules-mips.c +++ b/orc/orcrules-mips.c @@ -106,16 +106,7 @@ mips_rule_addw (OrcCompiler *compiler, void *user, OrcInstruction *insn) int src2 = ORC_SRC_ARG (compiler, insn, 1); int dest = ORC_DEST_ARG (compiler, insn, 0); - switch (compiler->insn_shift) { - case 0: - orc_mips_emit_addu (compiler, dest, src1, src2); - break; - case 1: - orc_mips_emit_addu_ph (compiler, dest, src1, src2); - break; - default: - ORC_PROGRAM_ERROR (compiler, "Don't know how to handle that insn_shift"); - } + orc_mips_emit_addu_ph (compiler, dest, src1, src2); } void @@ -125,17 +116,7 @@ mips_rule_addb (OrcCompiler *compiler, void *user, OrcInstruction *insn) int src2 = ORC_SRC_ARG (compiler, insn, 1); int dest = ORC_DEST_ARG (compiler, insn, 0); - switch (compiler->insn_shift) { - case 0: - orc_mips_emit_addu (compiler, dest, src1, src2); - break; - case 1: - case 2: - orc_mips_emit_addu_qb (compiler, dest, src1, src2); - break; - default: - ORC_PROGRAM_ERROR (compiler, "Don't know how to handle that insn_shift"); - } + orc_mips_emit_addu_qb (compiler, dest, src1, src2); } -- 2.7.4