Blackfin: change global data register from P5 to P3
Since the Blackfin ABI favors higher scratch registers by default, use the last scratch register (P3) for global data rather than the first (P5). This allows the compiler's register allocator to use higher number scratch P registers, which in turn better matches the Blackfin instruction set, which reduces the size of U-Boot by more than 1024 bytes... Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
committed by
Mike Frysinger
parent
574b70df03
commit
c4db335c2e
@@ -127,14 +127,14 @@ gd_t *global_data;
|
||||
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r5");
|
||||
#elif defined(CONFIG_BLACKFIN)
|
||||
/*
|
||||
* P5 holds the pointer to the global_data, P0 is a call-clobbered
|
||||
* P3 holds the pointer to the global_data, P0 is a call-clobbered
|
||||
* register
|
||||
*/
|
||||
#define EXPORT_FUNC(x) \
|
||||
asm volatile ( \
|
||||
" .globl _" #x "\n_" \
|
||||
#x ":\n" \
|
||||
" P0 = [P5 + %0]\n" \
|
||||
" P0 = [P3 + %0]\n" \
|
||||
" P0 = [P0 + %1]\n" \
|
||||
" JUMP (P0)\n" \
|
||||
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0");
|
||||
|
||||
Reference in New Issue
Block a user