From 69c751956293e822faa6cf844f2864d81c36a578 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 20 Nov 2009 16:27:24 -0800 Subject: ARM: pass 'struct reg *' to register r/w routines Implementations need to access the register struct they modify; make it easier and less error-prone to identify the instance. (This removes over 10% of the ARMV4_5_CORE_REG_MODE nastiness...) Plus some minor fixes noted when making these updates: ARM7/ARM9 accessor methods should be static; don't leave CPSR wrongly marked "dirty"; note significant XScale omissions in register handling; and have armv4_5_build_reg_cache() record its result. Rename "struct armv4_5_core_reg" as "struct arm_reg"; it's used for more than those older architecture generations. Signed-off-by: David Brownell --- src/target/armv4_5.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/target/armv4_5.h') diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index dbd62c0d..c8fc5580 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -109,9 +109,9 @@ struct arm struct etm_context *etm; int (*full_context)(struct target *target); - int (*read_core_reg)(struct target *target, + int (*read_core_reg)(struct target *target, struct reg *reg, int num, enum armv4_5_mode mode); - int (*write_core_reg)(struct target *target, + int (*write_core_reg)(struct target *target, struct reg *reg, int num, enum armv4_5_mode mode, uint32_t value); void *arch_info; }; @@ -137,7 +137,7 @@ struct armv4_5_algorithm enum armv4_5_state core_state; }; -struct armv4_5_core_reg +struct arm_reg { int num; enum armv4_5_mode mode; -- cgit v1.2.3