]> git.sur5r.net Git - u-boot/commitdiff
sh: Fix cannot execute a stand-alone application
authorNobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Thu, 9 Oct 2008 04:54:33 +0000 (13:54 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tue, 14 Oct 2008 04:09:40 +0000 (13:09 +0900)
Address calculated in EXPORT_FUNC in SuperH was wrong, I revised it.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
examples/stubs.c

index ec5353216b54983aa95a996def7597945cc888c0..a8cb954282139a9b80ad6f1baef05a59084cc0d2 100644 (file)
@@ -162,11 +162,13 @@ gd_t *global_data;
                #x ":\n"                                \
                "       mov     r13, r1\n"              \
                "       add     %0, r1\n"               \
-               "       add     %1, r1\n"               \
+               "       mov.l @r1, r2\n"        \
+               "       add     %1, r2\n"               \
+               "       mov.l @r2, r1\n"        \
                "       jmp     @r1\n"                  \
                "       nop\n"                          \
                "       nop\n"                          \
-               : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r1");
+               : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r1", "r2");
 #elif defined(CONFIG_SPARC)
 /*
  * g7 holds the pointer to the global_data. g1 is call clobbered.