summaryrefslogtreecommitdiffstats
path: root/examples/stubs.c
diff options
context:
space:
mode:
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