Simplify regcache_restore
This patches removes the 2nd argument of regcache_restore, because it
is only called by regcache_cpy. In regcache_cpy, if regcache_restore
is called, dst is not readonly, but src is readonly. So this patch
adds an assert that src is readonly in regcache_restore.
regcache_cook_read read everything from a readonly regcache cache
(src)'s register_buffer, and register status is from ->register_status.
gdb:
2017-04-21 Yao Qi <yao.qi@linaro.org>
* regcache.c (regcache_restore): Remove argument 2. Replace
argument 3 with regcache. Get register status from
src->register_status and get register contents from
register_buffer (src, regnum).
(regcache_cpy): Update.