From 6a0af06bd9f66780d2c3e9f69c40f2b89ad90605 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 5 Nov 2009 22:04:25 -0800 Subject: ARM: shrink offsets Move various embedded target structs to the beginnings of their containers ... pretty much the way C++ or Obj-C would for single inheritance. This shrinks code that accesses those embedded structs by letting common offsets use smaller instructions. Sample before/after sizes (on amd64): 17181 312 0 17493 4455 arm920t.o 16810 312 0 17122 42e2 arm920t.o Where the "after" is the smaller number, with this patch over the ones leveraging that embedding knowledge. Signed-off-by: David Brownell --- src/target/xscale.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/target/xscale.h') diff --git a/src/target/xscale.h b/src/target/xscale.h index 56db1815..433ecfcf 100644 --- a/src/target/xscale.h +++ b/src/target/xscale.h @@ -80,6 +80,9 @@ typedef struct xscale_trace_s typedef struct xscale_common_s { + /* armv4/5 common stuff */ + armv4_5_common_t armv4_5_common; + int common_magic; /* XScale registers (CP15, DBG) */ @@ -121,9 +124,6 @@ typedef struct xscale_common_s int arch_debug_reason; - /* armv4/5 common stuff */ - armv4_5_common_t armv4_5_common; - /* MMU/Caches */ armv4_5_mmu_common_t armv4_5_mmu; uint32_t cp15_control_reg; -- cgit v1.2.3