From: Carl Love Date: Tue, 10 Mar 2015 18:51:36 +0000 (+0000) Subject: Fix for bugzilla 343597 - ppc64le: incorrect use of offseof macro X-Git-Tag: svn/VALGRIND_3_11_0^2~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b64c4578b998e33b263cf4ce691d8595b9c7d16c;p=thirdparty%2Fvalgrind.git Fix for bugzilla 343597 - ppc64le: incorrect use of offseof macro 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 --- diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index 9f5e30fe13..3ee57da31b 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -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 {