]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - examples/stubs.c
PPC: Use r2 instead of r29 as global data pointer
[karo-tx-uboot.git] / examples / stubs.c
index 571c4d50a437e905a289a177b4a4721e24850b1d..9b3cadde33f997fd4d3f91ff99444ad738edc8a6 100644 (file)
@@ -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"                         \