From: Nobuhiro Iwamatsu Date: Thu, 9 Oct 2008 04:54:33 +0000 (+0900) Subject: sh: Fix cannot execute a stand-alone application X-Git-Tag: v2008.10-rc3~17^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cae6f909baf86357b3c0bd01acfc414348c4d175;p=u-boot sh: Fix cannot execute a stand-alone application Address calculated in EXPORT_FUNC in SuperH was wrong, I revised it. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- diff --git a/examples/stubs.c b/examples/stubs.c index ec5353216b..a8cb954282 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -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.