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 <wd@denx.de>
This commit is contained in:
@@ -163,7 +163,7 @@ typedef struct global_data {
|
||||
#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
||||
|
||||
#if 1
|
||||
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r29")
|
||||
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
|
||||
#else /* We could use plain global data, but the resulting code is bigger */
|
||||
#define XTRN_DECLARE_GLOBAL_DATA_PTR extern
|
||||
#define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
|
||||
|
||||
Reference in New Issue
Block a user