diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 4 | ||||
-rw-r--r-- | examples/stubs.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile index 6bd10b5..f6b127b 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -45,6 +45,10 @@ ifeq ($(ARCH),m68k) LOAD_ADDR = 0x20000 -L $(clibdir) endif +ifeq ($(ARCH),microblaze) +LOAD_ADDR = 0x80F00000 +endif + include $(TOPDIR)/config.mk SREC = hello_world.srec 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 |