+ locations. */
+
+static void
+fill_sprs64 (const struct regcache *regcache,
+ uint64_t *iar, uint64_t *msr, uint32_t *cr,
+ uint64_t *lr, uint64_t *ctr, uint32_t *xer,
+ uint32_t *fpscr)
+{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Verify that the size of the size of the IAR buffer is the
+ same as the raw size of the PC (in the register cache). If
+ they're not, then either GDB has been built incorrectly, or
+ there's some other kind of internal error. To be really safe,
+ we should check all of the sizes. */
+ gdb_assert (sizeof (*iar) == register_size
+ (gdbarch, gdbarch_pc_regnum (gdbarch)));
+
+ if (REG_VALID == regcache_register_status (regcache,
+ gdbarch_pc_regnum (gdbarch)))
+ regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
+ if (REG_VALID == regcache_register_status (regcache, tdep->ppc_ps_regnum))
+ regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
+ if (REG_VALID == regcache_register_status (regcache, tdep->ppc_cr_regnum))
+ regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
+ if (REG_VALID == regcache_register_status (regcache, tdep->ppc_lr_regnum))
+ regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
+ if (REG_VALID == regcache_register_status (regcache, tdep->ppc_ctr_regnum))
+ regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
+ if (REG_VALID == regcache_register_status (regcache, tdep->ppc_xer_regnum))
+ regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
+ if (tdep->ppc_fpscr_regnum >= 0
+ && REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_fpscr_regnum))
+ regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
+}