> Hello, > > This patch brings in the last big change sitting on the reggroups branch. > > It adds regcache save/restore functions to to the regcache. > These functions save/restore a subset of registers determined by the save/restore reggroups (by default REGNUMs in the range [0 .. NUM_REGS) are in both the save_reggroup and restore_reggroup, and hence are saved/restored). > > As part of this, a saved read-only regcache is expanded so that it can hold the saved value of any register in the full [0 .. NUM_REGS+NUM_PSEUDO_REGS) range. This is so that architectures with memory-mapped registers (which fall into the range [NUM_REGS .. NUM_REGS+NUM_PSEUDO_REGS) have somewhere to save them. > > I'll look to commit it in a few days, > > (Oh, and it deletes the last remaining core reference to read_register_bytes() or write_register_bytes()). No comment :-) I found while re-re-merging this that it was a little to chumpy for my liking so I've broken it down further. So far I've committed the attached. It contains strictly mechanical changes. Andrew > 2002-11-07 Andrew Cagney > > * regcache.h (regcache_save, regcache_restore): Declare. > > * regcache.c (struct regcache_descr): Add fields > sizeof_cooked_registers and sizeof_cooked_register_valid_p. > (init_legacy_regcache_descr): Compute sizeof_cooked_registers. > Update comments. > (init_regcache_descr): Compute sizeof_cooked_register_valid_p and > sizeof_cooked_registers. Update comments. > (struct regcache): Replace passthrough_p with readonly_p. Replace > raw_registers and raw_register_valid_p with registers and > register_valid_p. > (regcache_cooked_read): Check for cached cooked values. > (regcache_xmalloc): Update. > (regcache_save): New function. > (regcache_restore): New function. > (regcache_cpy): Rewrite using regcache_save, regcache_restore and > regcache_cpy_no_passthrough. > (regcache_raw_read): Update. > (regcache_raw_write): Update. > (build_regcache): Update. > (regcache_xfree): Update. > (regcache_cpy_no_passthrough): Update. > (regcache_valid_p): Update. > (deprecated_grub_regcache_for_registers): Update. > (deprecated_grub_regcache_for_register_valid): Update. > (register_buffer): Move declaration to start. Update. > (regcache_raw_read): Update. > (regcache_raw_write): Update. >