diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-17 09:06:45 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-17 09:06:45 -0800 |
commit | f4788652e45662d1e43933dc0620561bc4cddae0 (patch) | |
tree | 0cda3c8b5ad766f3dea26d83c2a70b7cb52837d7 /src/target/register.h | |
parent | 959b373f8cdc2c1ad11c67c6916f88f48769438f (diff) |
target: simplify register get/set ops
No need to indirect from registered integers to pointers.
Just stash the pointers directly in the register struct,
and don't even bother registering.
This is a small code shrink, speeds register access just
a smidgeon, and gets rid of another rude exit() path.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/register.h')
-rw-r--r-- | src/target/register.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/target/register.h b/src/target/register.h index 84d2aaad..c14dfd43 100644 --- a/src/target/register.h +++ b/src/target/register.h @@ -33,7 +33,7 @@ struct reg int valid; uint32_t size; void *arch_info; - int arch_type; + const struct reg_arch_type *type; }; struct reg_cache @@ -46,20 +46,14 @@ struct reg_cache struct reg_arch_type { - int id; int (*get)(struct reg *reg); int (*set)(struct reg *reg, uint8_t *buf); - struct reg_arch_type *next; }; 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); -int register_reg_arch_type(int (*get)(struct reg *reg), - int (*set)(struct reg *reg, uint8_t *buf)); -struct reg_arch_type* register_get_arch_type(int id); - void register_init_dummy(struct reg *reg); #endif /* REGISTER_H */ |