- int arch_type;
-} reg_t;
-
-typedef struct reg_cache_s
-{
- char *name;
- struct reg_cache_s *next;
- reg_t *reg_list;
- int num_regs;
-} reg_cache_t;
-
-typedef struct reg_arch_type_s
-{
- int id;
- int (*get)(reg_t *reg);
- int (*set)(reg_t *reg, uint8_t *buf);
- struct reg_arch_type_s *next;
-} reg_arch_type_t;
-
-reg_t* register_get_by_name(reg_cache_t *first,
+ const struct reg_arch_type *type;
+};
+
+struct reg_cache {
+ const char *name;
+ struct reg_cache *next;
+ struct reg *reg_list;
+ unsigned num_regs;
+};
+
+struct reg_arch_type {
+ int (*get)(struct reg *reg);
+ int (*set)(struct reg *reg, uint8_t *buf);
+};
+
+struct reg *register_get_by_name(struct reg_cache *first,