diff options
| author | wdenk <wdenk> | 2004-02-12 00:47:09 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2004-02-12 00:47:09 +0000 | 
| commit | bf9e3b38f77c2eac620263dd60437c6ec47a27bf (patch) | |
| tree | d03891090553d167f3eb08d7f9c3f2532e43fcc2 /examples/stubs.c | |
| parent | a2d18bb7d31e7b971386fef505ff0218f3b6e893 (diff) | |
| download | olio-uboot-2014.01-bf9e3b38f77c2eac620263dd60437c6ec47a27bf.tar.xz olio-uboot-2014.01-bf9e3b38f77c2eac620263dd60437c6ec47a27bf.zip | |
* Some code cleanup
* Patch by Josef Baumgartner, 10 Feb 2004:
  Fixes for Coldfire port
* Patch by Brad Kemp, 11 Feb 2004:
  Fix CFI flash driver problems
Diffstat (limited to 'examples/stubs.c')
| -rw-r--r-- | examples/stubs.c | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/examples/stubs.c b/examples/stubs.c index 6ca6d7869..a26337a92 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -78,6 +78,22 @@ gd_t *global_data;  "	jmp	%%g0\n"			\  "	nop	\n"			\  	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x) : "r0"); +#elif defined(CONFIG_M68K) +/* + * d7 holds the pointer to the global_data, a0 is a call-clobbered + * register + */ +#define EXPORT_FUNC(x) \ +	asm volatile (			\ +"	.globl " #x "\n"		\ +#x ":\n"				\ +"	move.l	%%d7, %%a0\n"		\ +"	adda.l	%0, %%a0\n"		\ +"	move.l	(%%a0), %%a0\n"		\ +"	adda.l	%1, %%a0\n"		\ +"	move.l	(%%a0), %%a0\n"		\ +"	jmp	(%%a0)\n"			\ +	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "a0");  #else  #error stubs definition missing for this architecture  #endif |