summaryrefslogtreecommitdiff
path: root/examples/standalone/stubs.c
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2010-07-06 17:29:44 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2010-07-06 17:29:44 +0900
commit2271d3ddccfbd4a7640121669ff9b013b1fea361 (patch)
tree400f22f0a12ff0ae6c472bed6ac648befc1744a2 /examples/standalone/stubs.c
parent25ae8aeb54a6ca89ba1fd11c00865b8fed9348b4 (diff)
parent54841ab50c20d6fa6c9cc3eb826989da3a22d934 (diff)
downloadu-boot-imx-2271d3ddccfbd4a7640121669ff9b013b1fea361.zip
u-boot-imx-2271d3ddccfbd4a7640121669ff9b013b1fea361.tar.gz
u-boot-imx-2271d3ddccfbd4a7640121669ff9b013b1fea361.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'examples/standalone/stubs.c')
-rw-r--r--examples/standalone/stubs.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index ce3371d..2d2e709 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -65,26 +65,9 @@ gd_t *global_data;
" lw $25, %1($25)\n" \
" jr $25\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "t9");
-#elif defined(CONFIG_NIOS)
-/*
- * %g7 holds the pointer to the global_data. %g0 is call clobbered.
- */
-#define EXPORT_FUNC(x) \
- asm volatile ( \
-" .globl " #x "\n" \
-#x ":\n" \
-" pfx %%hi(%0)\n" \
-" movi %%g0, %%lo(%0)\n" \
-" add %%g0, %%g7\n" \
-" ld %%g0, [%%g0]\n" \
-" pfx %1\n" \
-" ld %%g0, [%%g0]\n" \
-" jmp %%g0\n" \
-" nop \n" \
- : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x) : "r0");
#elif defined(CONFIG_NIOS2)
/*
- * r15 holds the pointer to the global_data, r8 is call-clobbered
+ * gp holds the pointer to the global_data, r8 is call-clobbered
*/
#define EXPORT_FUNC(x) \
asm volatile ( \
@@ -92,11 +75,11 @@ gd_t *global_data;
#x ":\n" \
" movhi r8, %%hi(%0)\n" \
" ori r8, r0, %%lo(%0)\n" \
-" add r8, r8, r15\n" \
+" add r8, r8, gp\n" \
" ldw r8, 0(r8)\n" \
" ldw r8, %1(r8)\n" \
" jmp r8\n" \
- : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r15");
+ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "gp");
#elif defined(CONFIG_M68K)
/*
* d7 holds the pointer to the global_data, a0 is a call-clobbered
@@ -206,7 +189,7 @@ void __attribute__((unused)) dummy(void)
extern unsigned long __bss_start, _end;
-void app_startup(char **argv)
+void app_startup(char * const *argv)
{
unsigned char * cp = (unsigned char *) &__bss_start;