From b07b3f21579b17034442782c771531cbfeb1c98b Mon Sep 17 00:00:00 2001 From: Guillaume Emont Date: Sat, 15 Dec 2012 19:14:56 +0100 Subject: [PATCH] mips: added emit functions for shrl.ph and precrq.qb.ph --- orc/orcmips.c | 30 ++++++++++++++++++++++++++++++ orc/orcmips.h | 2 ++ 2 files changed, 32 insertions(+) diff --git a/orc/orcmips.c b/orc/orcmips.c index 45abe70..e133a15 100644 --- a/orc/orcmips.c +++ b/orc/orcmips.c @@ -615,6 +615,18 @@ orc_mips_emit_shra_ph (OrcCompiler *compiler, } void +orc_mips_emit_shrl_ph (OrcCompiler *compiler, + OrcMipsRegister dest, + OrcMipsRegister source, + int value) +{ + ORC_ASM_CODE (compiler, " shrl.ph %s, %s, %d\n", + orc_mips_reg_name (dest), + orc_mips_reg_name (source), value); + orc_mips_emit (compiler, MIPS_SHLLQB_INSTRUCTION(031, source, dest, value)); +} + +void orc_mips_emit_andi (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value) { @@ -828,6 +840,24 @@ orc_mips_emit_precr_qb_ph (OrcCompiler *compiler, 015, /* PRECR.QB.PH */ 021 /* CMPU.EQ.QB */)); } + +void +orc_mips_emit_precrq_qb_ph (OrcCompiler *compiler, + OrcMipsRegister dest, + OrcMipsRegister source1, + OrcMipsRegister source2) +{ + ORC_ASM_CODE (compiler, " precrq.qb.ph %s, %s, %s\n", + orc_mips_reg_name (dest), + orc_mips_reg_name (source1), + orc_mips_reg_name (source2)); + orc_mips_emit (compiler, + MIPS_BINARY_INSTRUCTION(037, /* SPECIAL3 */ + source1, source2, dest, + 014, /* PRECRS.QB.PH */ + 021 /* CMPU.EQ.QB */)); +} + void orc_mips_emit_cmp_lt_ph (OrcCompiler *compiler, OrcMipsRegister source1, diff --git a/orc/orcmips.h b/orc/orcmips.h index 02387c0..1e42902 100644 --- a/orc/orcmips.h +++ b/orc/orcmips.h @@ -152,6 +152,7 @@ void orc_mips_emit_sll (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegi void orc_mips_emit_sra (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value); void orc_mips_emit_shll_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value); void orc_mips_emit_shra_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value); +void orc_mips_emit_shrl_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value); void orc_mips_emit_andi (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source, int value); void orc_mips_emit_or (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2); void orc_mips_emit_and (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2); @@ -176,6 +177,7 @@ void orc_mips_emit_replv_qb (OrcCompiler *compiler, OrcMipsRegister dest, OrcMip void orc_mips_emit_replv_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source); void orc_mips_emit_preceu_ph_qbr (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source); void orc_mips_emit_precr_qb_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2); +void orc_mips_emit_precrq_qb_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2); void orc_mips_emit_cmp_lt_ph (OrcCompiler *compiler, OrcMipsRegister source1, OrcMipsRegister source2); void orc_mips_emit_pick_ph (OrcCompiler *compiler, OrcMipsRegister dest, OrcMipsRegister source1, OrcMipsRegister source2); -- 2.7.4