+2016-09-20  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
+
+       * rs6000-tdep.c (ppc_process_record_op31): Fix record of Store String
+       Word instructions.
+
 2016-09-20  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * fork-inferior.c (startup_inferior): Pass 'event_ptid' instead of
 
     case 725:          /* Store String Word Immediate */
       ra = 0;
       if (PPC_RA (insn) != 0)
-       regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
+       regcache_raw_read_unsigned (regcache,
+                                   tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
       ea += ra;
 
       nb = PPC_NB (insn);
     case 661:          /* Store String Word Indexed */
       ra = 0;
       if (PPC_RA (insn) != 0)
-       regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra);
+       regcache_raw_read_unsigned (regcache,
+                                   tdep->ppc_gp0_regnum + PPC_RA (insn), &ra);
       ea += ra;
 
       regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &xer);
 
       if (nb != 0)
        {
-         regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &rb);
+         regcache_raw_read_unsigned (regcache,
+                                     tdep->ppc_gp0_regnum + PPC_RB (insn),
+                                     &rb);
          ea += rb;
          record_full_arch_list_add_mem (ea, nb);
        }