diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-19 19:02:10 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-19 19:02:10 -0800 |
commit | 71cde5e359f273585880ea8986709b950ba85b08 (patch) | |
tree | b04f841ddfe6c0900f48b676cbb6c84d12eea7a3 /src/target/register.h | |
parent | 31fb7788a605fe1c0c405444b5bab51a7e42d481 (diff) | |
download | riscv-openocd-71cde5e359f273585880ea8986709b950ba85b08.zip riscv-openocd-71cde5e359f273585880ea8986709b950ba85b08.tar.gz riscv-openocd-71cde5e359f273585880ea8986709b950ba85b08.tar.bz2 |
target: create/use register_cache_invalidate()
Create a generic register_cache_invalidate(), and use it to
replace three all-but-identical core-specific routines:
- armv4_5_invalidate_core_regs()
- armv7m_invalidate_core_regs
- mips32_invalidate_core_regs() too.
Make cache->num_regs be unsigned, avoiding various errors.
Net code shrink and simplification.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/register.h')
-rw-r--r-- | src/target/register.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/target/register.h b/src/target/register.h index c14dfd4..0f8f2f4 100644 --- a/src/target/register.h +++ b/src/target/register.h @@ -41,7 +41,7 @@ struct reg_cache char *name; struct reg_cache *next; struct reg *reg_list; - int num_regs; + unsigned num_regs; }; struct reg_arch_type @@ -53,6 +53,7 @@ struct reg_arch_type struct reg* register_get_by_name(struct reg_cache *first, const char *name, bool search_all); struct reg_cache** register_get_last_cache_p(struct reg_cache **first); +void register_cache_invalidate(struct reg_cache *cache); void register_init_dummy(struct reg *reg); |