]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Shifting an int and assigning it to a long could be trouble.
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 2 Feb 2013 00:10:36 +0000 (00:10 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 2 Feb 2013 00:10:36 +0000 (00:10 +0000)
It isn't here, but let's make the code clear in this respect.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2674

VEX/priv/guest_ppc_toIR.c

index f25e2487f65f2fefc860714fdf5b6707a03e527b..f420bb5acf6dc0a9bcbc1ff004a563a7822fb0c4 100644 (file)
@@ -2756,7 +2756,8 @@ static void putGST_field ( PPC_GST reg, IRExpr* src, UInt fld )
       shft = 4*(7-fld);
    else
       shft = 4*(15-fld);
-   mask = 0xF<<shft;
+   mask = 0xF;
+   mask = mask << shft;
 
    switch (reg) {
    case PPC_GST_CR: