backtrace: Remove assembly assumption that grub_backtrace_pointer is under 4G

This commit is contained in:
Vladimir Serbinenko 2015-12-30 18:19:44 +01:00
parent 93ecc3f1f8
commit 79cfad6fbe

View file

@ -56,11 +56,11 @@ void
grub_backtrace (void)
{
#ifdef __x86_64__
asm volatile ("movq %rbp, %rdi\n"
"call " EXT_C("grub_backtrace_pointer"));
asm volatile ("movq %%rbp, %%rdi\n"
"call %%rax": :"a"(grub_backtrace_pointer));
#else
asm volatile ("movl %ebp, %eax\n"
"call " EXT_C("grub_backtrace_pointer"));
asm volatile ("movl %%ebp, %%eax\n"
"call %%ecx": :"c"(grub_backtrace_pointer));
#endif
}