diff options
| author | Stefan Roese <sr@denx.de> | 2007-12-29 09:23:11 +0100 | 
|---|---|---|
| committer | Stefan Roese <sr@denx.de> | 2007-12-29 09:23:11 +0100 | 
| commit | feaa43f3a8f465cbf01ffa1b23b6b52431819a52 (patch) | |
| tree | 3ee393d421c72a882d27b1de5978a2a9befce062 /examples/stubs.c | |
| parent | 8697e6a19b10f514511b6a9c86de88bd108c4f8d (diff) | |
| parent | e174ac34adf5d5653df12bc3cf19c52063a71269 (diff) | |
| download | olio-uboot-2014.01-feaa43f3a8f465cbf01ffa1b23b6b52431819a52.tar.xz olio-uboot-2014.01-feaa43f3a8f465cbf01ffa1b23b6b52431819a52.zip | |
Merge branch 'for-1.3.2-ver2'
Conflicts:
	cpu/ppc4xx/fdt.c
	include/configs/kilauea.h
	include/configs/sequoia.h
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'examples/stubs.c')
| -rw-r--r-- | examples/stubs.c | 18 | 
1 files changed, 17 insertions, 1 deletions
| diff --git a/examples/stubs.c b/examples/stubs.c index 26df6e06a..571c4d50a 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -132,7 +132,7 @@ gd_t *global_data;   */  #define EXPORT_FUNC(x)			\  	asm volatile (			\ -"       .globl _" #x "\n_"		\ +"	.globl _" #x "\n_"		\  #x ":\n"				\  "	P0 = [P5 + %0]\n"		\  "	P0 = [P0 + %1]\n"		\ @@ -151,6 +151,22 @@ gd_t *global_data;  		:					\  		: "i"(offsetof(gd_t, jt)), "i"(XF_ ##x)	\  		: "r8"); +#elif defined(CONFIG_SH) +/* + * r13 holds the pointer to the global_data. r1 is a call clobbered. + */ +#define EXPORT_FUNC(x)					\ +	asm volatile (					\ +		"	.align	2\n"			\ +		"	.globl " #x "\n"		\ +		#x ":\n"				\ +		"	mov	r13, r1\n"		\ +		"	add	%0, r1\n"		\ +		"	add	%1, r1\n"		\ +		"	jmp	@r1\n"			\ +		"	nop\n"				\ +		"	nop\n"				\ +		: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r1");  #else  #error stubs definition missing for this architecture  #endif |