Blame SOURCES/valgrind-3.14.0-get_otrack_shadow_offset_wrk-ppc.patch

560544
commit 7f1dd9d5aec1f1fd4eb0ae3a311358a914f1d73f
560544
Author: Julian Seward <jseward@acm.org>
560544
Date:   Tue Nov 20 10:18:29 2018 +0100
560544
560544
    get_otrack_shadow_offset_wrk for ppc32 and ppc64: add missing cases for XER_OV32, XER_CA32 and C_FPCC.
560544
    
560544
    The missing cases were discovered whilst testing fixes for bug 386945, but are
560544
    otherwise unrelated to that bug.
560544
560544
diff --git a/memcheck/mc_machine.c b/memcheck/mc_machine.c
560544
index 5ed101f..4ce746e 100644
560544
--- a/memcheck/mc_machine.c
560544
+++ b/memcheck/mc_machine.c
560544
@@ -120,11 +120,11 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB )
560544
    Int  o    = offset;
560544
    tl_assert(sz > 0);
560544
 
560544
-#if defined(VGA_ppc64be)
560544
+#  if defined(VGA_ppc64be)
560544
    tl_assert(host_is_big_endian());
560544
-#elif defined(VGA_ppc64le)
560544
+#  elif defined(VGA_ppc64le)
560544
    tl_assert(host_is_little_endian());
560544
-#endif
560544
+#  endif
560544
 
560544
    if (sz == 8 || sz == 4) {
560544
       /* The point of this is to achieve
560544
@@ -132,11 +132,11 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB )
560544
             return GOF(GPRn);
560544
          by testing ox instead of o, and setting ox back 4 bytes when sz == 4.
560544
       */
560544
-#if defined(VGA_ppc64le)
560544
+#     if defined(VGA_ppc64le)
560544
       Int ox = o;
560544
-#else
560544
+#     else
560544
       Int ox = sz == 8 ? o : (o - 4);
560544
-#endif
560544
+#     endif
560544
       if (ox == GOF(GPR0)) return ox;
560544
       if (ox == GOF(GPR1)) return ox;
560544
       if (ox == GOF(GPR2)) return ox;
560544
@@ -240,11 +240,13 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB )
560544
    if (o == GOF(VSR31) && sz == 8) return o;
560544
 
560544
    /* For the various byte sized XER/CR pieces, use offset 8
560544
-      in VSR0 .. VSR19. */
560544
+      in VSR0 .. VSR21. */
560544
    tl_assert(SZB(VSR0) == 16);
560544
    if (o == GOF(XER_SO) && sz == 1) return 8 +GOF(VSR0);
560544
    if (o == GOF(XER_OV) && sz == 1) return 8 +GOF(VSR1);
560544
+   if (o == GOF(XER_OV32) && sz == 1) return 8 +GOF(VSR20);
560544
    if (o == GOF(XER_CA) && sz == 1) return 8 +GOF(VSR2);
560544
+   if (o == GOF(XER_CA32) && sz == 1) return 8 +GOF(VSR21);
560544
    if (o == GOF(XER_BC) && sz == 1) return 8 +GOF(VSR3);
560544
 
560544
    if (o == GOF(CR0_321) && sz == 1) return 8 +GOF(VSR4);
560544
@@ -388,6 +390,7 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB )
560544
    if (o == GOF(IP_AT_SYSCALL) && sz == 4) return -1; /* slot unused */
560544
    if (o == GOF(FPROUND)   && sz == 1) return -1;
560544
    if (o == GOF(DFPROUND)  && sz == 1) return -1;
560544
+   if (o == GOF(C_FPCC)    && sz == 1) return -1;
560544
    if (o == GOF(VRSAVE)    && sz == 4) return -1;
560544
    if (o == GOF(EMNOTE)    && sz == 4) return -1;
560544
    if (o == GOF(CMSTART)   && sz == 4) return -1;
560544
@@ -440,11 +443,13 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB )
560544
    if (o == GOF(VSR31) && sz == 8) return o;
560544
 
560544
    /* For the various byte sized XER/CR pieces, use offset 8
560544
-      in VSR0 .. VSR19. */
560544
+      in VSR0 .. VSR21. */
560544
    tl_assert(SZB(VSR0) == 16);
560544
    if (o == GOF(XER_SO) && sz == 1) return 8 +GOF(VSR0);
560544
    if (o == GOF(XER_OV) && sz == 1) return 8 +GOF(VSR1);
560544
+   if (o == GOF(XER_OV32) && sz == 1) return 8 +GOF(VSR20);
560544
    if (o == GOF(XER_CA) && sz == 1) return 8 +GOF(VSR2);
560544
+   if (o == GOF(XER_CA32) && sz == 1) return 8 +GOF(VSR21);
560544
    if (o == GOF(XER_BC) && sz == 1) return 8 +GOF(VSR3);
560544
 
560544
    if (o == GOF(CR0_321) && sz == 1) return 8 +GOF(VSR4);