mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
ARM: global_data: make set_gd() work for armv5 and armv6
The Thumb instruction `ldr` is able to move high registers only from armv7. For armv5 and armv6 we have to use `mov`. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1b457e753e
commit
82b63e9541
|
@ -122,8 +122,10 @@ static inline void set_gd(volatile gd_t *gd_ptr)
|
|||
{
|
||||
#ifdef CONFIG_ARM64
|
||||
__asm__ volatile("ldr x18, %0\n" : : "m"(gd_ptr));
|
||||
#else
|
||||
#elif __ARM_ARCH >= 7
|
||||
__asm__ volatile("ldr r9, %0\n" : : "m"(gd_ptr));
|
||||
#else
|
||||
__asm__ volatile("mov r9, %0\n" : : "r"(gd_ptr));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user