]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix for bugzilla 343597 - ppc64le: incorrect use of offseof macro
authorCarl Love <cel@us.ibm.com>
Tue, 10 Mar 2015 18:51:36 +0000 (18:51 +0000)
committerCarl Love <cel@us.ibm.com>
Tue, 10 Mar 2015 18:51:36 +0000 (18:51 +0000)
Issue found by Florian Krohm who also suggested the fix.  The fix was
made and tested by Carl Love.

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

VEX/priv/guest_ppc_toIR.c

index 9f5e30fe13b7a4cbcf60d9c771c89c362dcb0913..3ee57da31b9a051f98a047a5fe73942e47faa0d6 100644 (file)
@@ -1171,38 +1171,38 @@ static Int floatGuestRegOffset ( UInt archreg )
    
    if (host_endness == VexEndnessLE) {
       switch (archreg) {
-         case  0: return offsetofPPCGuestState(guest_VSR0 + 8);
-         case  1: return offsetofPPCGuestState(guest_VSR1 + 8);
-         case  2: return offsetofPPCGuestState(guest_VSR2 + 8);
-         case  3: return offsetofPPCGuestState(guest_VSR3 + 8);
-         case  4: return offsetofPPCGuestState(guest_VSR4 + 8);
-         case  5: return offsetofPPCGuestState(guest_VSR5 + 8);
-         case  6: return offsetofPPCGuestState(guest_VSR6 + 8);
-         case  7: return offsetofPPCGuestState(guest_VSR7 + 8);
-         case  8: return offsetofPPCGuestState(guest_VSR8 + 8);
-         case  9: return offsetofPPCGuestState(guest_VSR9 + 8);
-         case 10: return offsetofPPCGuestState(guest_VSR10 + 8);
-         case 11: return offsetofPPCGuestState(guest_VSR11 + 8);
-         case 12: return offsetofPPCGuestState(guest_VSR12 + 8);
-         case 13: return offsetofPPCGuestState(guest_VSR13 + 8);
-         case 14: return offsetofPPCGuestState(guest_VSR14 + 8);
-         case 15: return offsetofPPCGuestState(guest_VSR15 + 8);
-         case 16: return offsetofPPCGuestState(guest_VSR16 + 8);
-         case 17: return offsetofPPCGuestState(guest_VSR17 + 8);
-         case 18: return offsetofPPCGuestState(guest_VSR18 + 8);
-         case 19: return offsetofPPCGuestState(guest_VSR19 + 8);
-         case 20: return offsetofPPCGuestState(guest_VSR20 + 8);
-         case 21: return offsetofPPCGuestState(guest_VSR21 + 8);
-         case 22: return offsetofPPCGuestState(guest_VSR22 + 8);
-         case 23: return offsetofPPCGuestState(guest_VSR23 + 8);
-         case 24: return offsetofPPCGuestState(guest_VSR24 + 8);
-         case 25: return offsetofPPCGuestState(guest_VSR25 + 8);
-         case 26: return offsetofPPCGuestState(guest_VSR26 + 8);
-         case 27: return offsetofPPCGuestState(guest_VSR27 + 8);
-         case 28: return offsetofPPCGuestState(guest_VSR28 + 8);
-         case 29: return offsetofPPCGuestState(guest_VSR29 + 8);
-         case 30: return offsetofPPCGuestState(guest_VSR30 + 8);
-         case 31: return offsetofPPCGuestState(guest_VSR31 + 8);
+         case  0: return offsetofPPCGuestState(guest_VSR0) + 8;
+         case  1: return offsetofPPCGuestState(guest_VSR1) + 8;
+         case  2: return offsetofPPCGuestState(guest_VSR2) + 8;
+         case  3: return offsetofPPCGuestState(guest_VSR3) + 8;
+         case  4: return offsetofPPCGuestState(guest_VSR4) + 8;
+         case  5: return offsetofPPCGuestState(guest_VSR5) + 8;
+         case  6: return offsetofPPCGuestState(guest_VSR6) + 8;
+         case  7: return offsetofPPCGuestState(guest_VSR7) + 8;
+         case  8: return offsetofPPCGuestState(guest_VSR8) + 8;
+         case  9: return offsetofPPCGuestState(guest_VSR9) + 8;
+         case 10: return offsetofPPCGuestState(guest_VSR10) + 8;
+         case 11: return offsetofPPCGuestState(guest_VSR11) + 8;
+         case 12: return offsetofPPCGuestState(guest_VSR12) + 8;
+         case 13: return offsetofPPCGuestState(guest_VSR13) + 8;
+         case 14: return offsetofPPCGuestState(guest_VSR14) + 8;
+         case 15: return offsetofPPCGuestState(guest_VSR15) + 8;
+         case 16: return offsetofPPCGuestState(guest_VSR16) + 8;
+         case 17: return offsetofPPCGuestState(guest_VSR17) + 8;
+         case 18: return offsetofPPCGuestState(guest_VSR18) + 8;
+         case 19: return offsetofPPCGuestState(guest_VSR19) + 8;
+         case 20: return offsetofPPCGuestState(guest_VSR20) + 8;
+         case 21: return offsetofPPCGuestState(guest_VSR21) + 8;
+         case 22: return offsetofPPCGuestState(guest_VSR22) + 8;
+         case 23: return offsetofPPCGuestState(guest_VSR23) + 8;
+         case 24: return offsetofPPCGuestState(guest_VSR24) + 8;
+         case 25: return offsetofPPCGuestState(guest_VSR25) + 8;
+         case 26: return offsetofPPCGuestState(guest_VSR26) + 8;
+         case 27: return offsetofPPCGuestState(guest_VSR27) + 8;
+         case 28: return offsetofPPCGuestState(guest_VSR28) + 8;
+         case 29: return offsetofPPCGuestState(guest_VSR29) + 8;
+         case 30: return offsetofPPCGuestState(guest_VSR30) + 8;
+         case 31: return offsetofPPCGuestState(guest_VSR31) + 8;
          default: break;
       }
    } else {