summaryrefslogtreecommitdiffstats
path: root/examples/stubs.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2006-11-10 07:48:47 +0100
committerStefan Roese <sr@denx.de>2006-11-10 07:48:47 +0100
commitdfc8a9ee0040e53ada125a3c52f241e37f09cf28 (patch)
tree60fd3973150a4e6b3d9d129d117ecab71b5edabe /examples/stubs.c
parent5c912cb1c31266c66ca59b36f9b6f87296421d75 (diff)
parent91650b3e4de688038d4f71279c44858e3e2c6870 (diff)
downloadblackbird-obmc-uboot-dfc8a9ee0040e53ada125a3c52f241e37f09cf28.tar.gz
blackbird-obmc-uboot-dfc8a9ee0040e53ada125a3c52f241e37f09cf28.zip
Merge with /home/stefan/git/u-boot/denx
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 1caa575747..ffd314e6b3 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -138,6 +138,19 @@ gd_t *global_data;
" P0 = [P0 + %1]\n" \
" JUMP (P0)\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0");
+#elif defined(CONFIG_AVR32)
+/*
+ * r6 holds the pointer to the global_data. r8 is call clobbered.
+ */
+#define EXPORT_FUNC(x) \
+ asm volatile( \
+ " .globl\t" #x "\n" \
+ #x ":\n" \
+ " ld.w r8, r6[%0]\n" \
+ " ld.w pc, r8[%1]\n" \
+ : \
+ : "i"(offsetof(gd_t, jt)), "i"(XF_ ##x) \
+ : "r8");
#else
#error stubs definition missing for this architecture
#endif
OpenPOWER on IntegriCloud