mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
x86: Correct get_sp() implementation for 64-bit
Use an assembler implementation as is done for i386, so that the results are equivalent for i386 and x86_64. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
633af11dd6
commit
67884002f4
1 changed files with 1 additions and 1 deletions
|
@ -258,7 +258,7 @@ static ulong get_sp(void)
|
||||||
ulong ret;
|
ulong ret;
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(X86_64)
|
#if CONFIG_IS_ENABLED(X86_64)
|
||||||
ret = gd->start_addr_sp;
|
asm("mov %%rsp, %0" : "=r"(ret) : );
|
||||||
#else
|
#else
|
||||||
asm("mov %%esp, %0" : "=r"(ret) : );
|
asm("mov %%esp, %0" : "=r"(ret) : );
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue