修訂 | 794ab57497f822e8178b40867bf419375aad4de0 (tree) |
---|---|
時間 | 2014-02-07 22:14:33 |
作者 | Alexey Brodkin <Alexey.Brodkin@syno...> |
Commiter | Tom Rini |
arc: add support for standalone programs
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
@@ -210,6 +210,19 @@ gd_t *global_data; | ||
210 | 210 | " l.jr r13\n" \ |
211 | 211 | " l.nop\n" \ |
212 | 212 | : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r13"); |
213 | +#elif defined(CONFIG_ARC) | |
214 | +/* | |
215 | + * r25 holds the pointer to the global_data. r10 is call clobbered. | |
216 | + */ | |
217 | +#define EXPORT_FUNC(x) \ | |
218 | + asm volatile( \ | |
219 | +" .align 4\n" \ | |
220 | +" .globl " #x "\n" \ | |
221 | +#x ":\n" \ | |
222 | +" ld r10, [r25, %0]\n" \ | |
223 | +" ld r10, [r10, %1]\n" \ | |
224 | +" j [r10]\n" \ | |
225 | + : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r10"); | |
213 | 226 | #else |
214 | 227 | /*" addi $sp, $sp, -24\n" \ |
215 | 228 | " br $r16\n" \*/ |