> For the time being, how about introducing a predicate (function) to > ppc-sysv-tdep.c (or perhaps rs6000-tdep.c) named > have_floating_point_registers_p() (or something along those lines). > > In the short term this could be defined as: > > int > have_floating_point_registers_p (struct gdbarch *gdbarch) > { > const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch); > > /* Note: It has been proposed that a ``ppc_fp0_regnum'' member be added > to the ppc tdep struct. If/when this occurs, it may be preferable to > implement this as: > > struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > > return tdep->ppc_fp0_regnum >= 0; > */ > > return arch_info->mach != bfd_mach_ppc_e500; > } I called it ppc_floating_point_unit_p(). > It occurs to me that such a predicate would be useful for checking > the state of a global variable in the event that a command similar to > ``set nomipsfpu'' were added for the powerpc. (Well, maybe. Then > again, maybe it'd be better to just set ppc_fp0_regnum to -1 when > such a setting were made.) It is definitly better than a ppc_fp0_regnum test. As with the MIPS, it's one thing to have FP registers, it is another to use them. > In any event, a name like have_floating_point_registers_p() is > reasonably self docuementing whereas ``tdep->ppc_fp0_regnum >= 0'' > requires a little bit more thought to discern the meaning. How about the attached? Andrew