From 1aac72d24339380f6e98c50dec4c96ab30537749 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sun, 21 Feb 2010 14:34:33 -0800 Subject: ARM: keep a handle to the PC Keep a handle to the PC in "struct arm", and use it. This register is used a fair amount, so this is a net minor code shrink (other than some line length fixes), but mostly it's to make things more readable. For XScale, fix a dodgy sequence while stepping. It was initializing a variable to a non-NULL value, then updating it to handle the step-over-active-breakpoint case, and then later testing for non-NULL to see if it should reverse that step-over-active logic. It should have done like ARM7/ARM9 does: init to NULL. Signed-off-by: David Brownell --- src/target/arm11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/arm11.c') diff --git a/src/target/arm11.c b/src/target/arm11.c index 678d8ac6..51be7018 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -451,7 +451,7 @@ static int arm11_halt(struct target *target) static uint32_t arm11_nextpc(struct arm11_common *arm11, int current, uint32_t address) { - void *value = arm11->arm.core_cache->reg_list[15].value; + void *value = arm11->arm.pc->value; if (!current) buf_set_u32(value, 0, 32, address); -- cgit v1.2.3