summaryrefslogtreecommitdiff
path: root/examples/stubs.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-02-14 22:43:22 +0100
committerWolfgang Denk <wd@denx.de>2008-02-14 22:43:22 +0100
commite7670f6c1e52ae6d2a43ff75a8bcfa7a5c86e47b (patch)
treec105ae64bb203f93e670ef11b3256a4a3086c0ad /examples/stubs.c
parent3c234efa693bc59906c2be55c7918ecbb55392ea (diff)
downloadu-boot-imx-e7670f6c1e52ae6d2a43ff75a8bcfa7a5c86e47b.zip
u-boot-imx-e7670f6c1e52ae6d2a43ff75a8bcfa7a5c86e47b.tar.gz
u-boot-imx-e7670f6c1e52ae6d2a43ff75a8bcfa7a5c86e47b.tar.bz2
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>
Diffstat (limited to 'examples/stubs.c')
-rw-r--r--examples/stubs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stubs.c b/examples/stubs.c
index 571c4d5..9b3cadd 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -25,14 +25,14 @@ gd_t *global_data;
: : "i"(XF_ ## x * sizeof(void *)) : "eax", "ecx");
#elif defined(CONFIG_PPC)
/*
- * r29 holds the pointer to the global_data, r11 is a call-clobbered
+ * r2 holds the pointer to the global_data, r11 is a call-clobbered
* register
*/
#define EXPORT_FUNC(x) \
asm volatile ( \
" .globl " #x "\n" \
#x ":\n" \
-" lwz %%r11, %0(%%r29)\n" \
+" lwz %%r11, %0(%%r2)\n" \
" lwz %%r11, %1(%%r11)\n" \
" mtctr %%r11\n" \
" bctr\n" \