From: Petar Jovanovic Date: Sat, 28 Mar 2015 01:20:02 +0000 (+0000) Subject: mips64: extract correct immediate value for Cavium SEQI and SNEI X-Git-Tag: svn/VALGRIND_3_11_0^2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a0ffc2848872cc80c7025d7950c7b7713b5b04;p=thirdparty%2Fvalgrind.git mips64: extract correct immediate value for Cavium SEQI and SNEI Extract immediate value from bit fields [15:6] instead of [15:0]. This fixes the issue reported in BZ #341997. Related Valgrind commit - r15043. Patch by Maran Pakkirisamy. git-svn-id: svn://svn.valgrind.org/vex/trunk@3108 --- diff --git a/VEX/priv/guest_mips_toIR.c b/VEX/priv/guest_mips_toIR.c index bfc9124c74..8e94298142 100644 --- a/VEX/priv/guest_mips_toIR.c +++ b/VEX/priv/guest_mips_toIR.c @@ -2239,7 +2239,10 @@ static Bool dis_instr_CVM ( UInt theInstr ) UChar regRs = get_rs(theInstr); UChar regRt = get_rt(theInstr); UChar regRd = get_rd(theInstr); - UInt imm = get_imm(theInstr); + /* MIPS trap instructions extract code from theInstr[15:6]. + Cavium OCTEON instructions SNEI, SEQI extract immediate operands + from the same bit field [15:6]. */ + UInt imm = get_code(theInstr); UChar lenM1 = get_msb(theInstr); UChar p = get_lsb(theInstr); IRType ty = mode64? Ity_I64 : Ity_I32;