summaryrefslogtreecommitdiffstats
path: root/examples/stubs.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-12 02:10:00 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-12 02:10:00 +0100
commit0afe519a433184fb1270ff0823971130353a807f (patch)
treedcf4e84ada0961ded5df9ebfc2804e882bca57b0 /examples/stubs.c
parentdc013d464000635a5b8ae841c6e683f94a6bee3d (diff)
downloadbarebox-0afe519a433184fb1270ff0823971130353a807f.tar.gz
barebox-0afe519a433184fb1270ff0823971130353a807f.tar.xz
Add ADI Blackfin support
- add support for Analog Devices Blackfin BF533 CPU - add support for the ADI BF533 Stamp uClinux board - add support for the ADI BF533 EZKit board Patches by Richard Klingler, June 11th 2005:
Diffstat (limited to 'examples/stubs.c')
-rw-r--r--examples/stubs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/stubs.c b/examples/stubs.c
index d4c6e063e3..1797274eb4 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -125,6 +125,19 @@ gd_t *global_data;
" lwi r5, r5, %1\n" \
" bra r5\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r5");
+#elif defined(CONFIG_BLACKFIN)
+/*
+ * P5 holds the pointer to the global_data, P0 is a call-clobbered
+ * register
+ */
+#define EXPORT_FUNC(x) \
+ asm volatile ( \
+" .globl " #x "\n" \
+#x ":\n" \
+" P0 = [P5 + %0]\n" \
+" P0 = [P0 + %1]\n" \
+" JUMP (P0)\n" \
+ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0");
#else
#error stubs definition missing for this architecture
#endif