From e7670f6c1e52ae6d2a43ff75a8bcfa7a5c86e47b Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 14 Feb 2008 22:43:22 +0100 Subject: PPC: Use r2 instead of r29 as global data pointer R29 was an unlucky choice as with recent toolchains (gcc-4.2.x) gcc will refuse to use load/store multiple insns; instead, it issues a list of simple load/store instructions upon function entry and exit, resulting in bigger code size, which in turn makes the build for a few boards fail. Use r2 instead. Signed-off-by: Wolfgang Denk --- cpu/mpc86xx/config.mk | 2 +- cpu/mpc86xx/start.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu/mpc86xx') diff --git a/cpu/mpc86xx/config.mk b/cpu/mpc86xx/config.mk index 3c54f4a..d767269 100644 --- a/cpu/mpc86xx/config.mk +++ b/cpu/mpc86xx/config.mk @@ -23,4 +23,4 @@ PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx -ffixed-r2 -ffixed-r29 -mstring +PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx -ffixed-r2 -mstring diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index fa9736b..09f4cee 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -723,7 +723,7 @@ relocate_code: mr r1, r3 /* Set new stack pointer */ mr r9, r4 /* Save copy of Global Data pointer */ - mr r29, r9 /* Save for DECLARE_GLOBAL_DATA_PTR */ + mr r2, r9 /* Save for DECLARE_GLOBAL_DATA_PTR */ mr r10, r5 /* Save copy of Destination Address */ mr r3, r5 /* Destination Address */ -- cgit v1.1