summaryrefslogtreecommitdiff
path: root/examples/standalone/stubs.c
diff options
context:
space:
mode:
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>2014-02-04 12:56:17 +0400
committerTom Rini <trini@ti.com>2014-02-07 08:14:33 -0500
commit794ab57497f822e8178b40867bf419375aad4de0 (patch)
treeecff0b6b98ed8ae059029a3e32328ffb21edaf70 /examples/standalone/stubs.c
parentbc5d5428805c804cab67a0cc000bbf64e26acf71 (diff)
downloadu-boot-imx-794ab57497f822e8178b40867bf419375aad4de0.zip
u-boot-imx-794ab57497f822e8178b40867bf419375aad4de0.tar.gz
u-boot-imx-794ab57497f822e8178b40867bf419375aad4de0.tar.bz2
arc: add support for standalone programs
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Francois Bedard <fbedard@synopsys.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'examples/standalone/stubs.c')
-rw-r--r--examples/standalone/stubs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 32a19ce..c5c025d 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -210,6 +210,19 @@ gd_t *global_data;
" l.jr r13\n" \
" l.nop\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r13");
+#elif defined(CONFIG_ARC)
+/*
+ * r25 holds the pointer to the global_data. r10 is call clobbered.
+ */
+#define EXPORT_FUNC(x) \
+ asm volatile( \
+" .align 4\n" \
+" .globl " #x "\n" \
+#x ":\n" \
+" ld r10, [r25, %0]\n" \
+" ld r10, [r10, %1]\n" \
+" j [r10]\n" \
+ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r10");
#else
/*" addi $sp, $sp, -24\n" \
" br $r16\n" \*/