summaryrefslogtreecommitdiff
path: root/examples/x86-testapp.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/x86-testapp.c
parent3c234efa693bc59906c2be55c7918ecbb55392ea (diff)
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/x86-testapp.c')
-rw-r--r--examples/x86-testapp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/x86-testapp.c b/examples/x86-testapp.c
index a1ab319ae88..e8603d9bac6 100644
--- a/examples/x86-testapp.c
+++ b/examples/x86-testapp.c
@@ -30,11 +30,11 @@ asm volatile ( \
asm volatile ( \
" .globl mon_" #x "\n" \
"mon_" #x ":\n" \
-" lwz %%r11, %0(%%r29)\n" \
+" lwz %%r11, %0(%%r2)\n" \
" lwz %%r11, %1(%%r11)\n" \
" mtctr %%r11\n" \
" bctr\n" \
- : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r29");
+ : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r2");
#elif defined(__arm__)
#define EXPORT_FUNC(x) \
asm volatile ( \
@@ -67,7 +67,7 @@ int main(void)
#if defined(__i386__)
xxx_t *pq;
#elif defined(__powerpc__)
- register volatile xxx_t *pq asm("r29");
+ register volatile xxx_t *pq asm("r2");
#elif defined(__arm__)
register volatile xxx_t *pq asm("r8");
#elif defined(__mips__)