summaryrefslogtreecommitdiff
path: root/examples/stubs.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-04-18 21:13:41 +0000
committerwdenk <wdenk>2004-04-18 21:13:41 +0000
commit507bbe3e8084a82c20399367801da87db7d14e65 (patch)
tree0660633e2e1caf4b819fd46ed43f83e3e05c5523 /examples/stubs.c
parent998eaaecd46ee5f00550e30e606cb5556e0b9345 (diff)
downloadu-boot-imx-507bbe3e8084a82c20399367801da87db7d14e65.zip
u-boot-imx-507bbe3e8084a82c20399367801da87db7d14e65.tar.gz
u-boot-imx-507bbe3e8084a82c20399367801da87db7d14e65.tar.bz2
* Patch by Yasushi Shoji, 07 Apr 2004:
- add support for microblaze processors - add support for AtmarkTechno "suzaku" board
Diffstat (limited to 'examples/stubs.c')
-rw-r--r--examples/stubs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/stubs.c b/examples/stubs.c
index a897d0d..6f563ed 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -94,6 +94,18 @@ gd_t *global_data;
" move.l (%%a0), %%a0\n" \
" jmp (%%a0)\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "a0");
+#elif defined(CONFIG_MICROBLZE)
+/*
+ * r31 holds the pointer to the global_data. r5 is a call-clobbered.
+ */
+#define EXPORT_FUNC(x) \
+ asm volatile ( \
+" .globl " #x "\n" \
+#x ":\n" \
+" lwi r5, r31, %0\n" \
+" lwi r5, r5, %1\n" \
+" bra r5\n" \
+ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r5");
#else
#error stubs definition missing for this architecture
#endif