|
From: <sv...@va...> - 2015-03-28 01:20:10
|
Author: petarj
Date: Sat Mar 28 01:20:02 2015
New Revision: 3108
Log:
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.
Modified:
trunk/priv/guest_mips_toIR.c
Modified: trunk/priv/guest_mips_toIR.c
==============================================================================
--- trunk/priv/guest_mips_toIR.c (original)
+++ trunk/priv/guest_mips_toIR.c Sat Mar 28 01:20:02 2015
@@ -2239,7 +2239,10 @@
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;
|