mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
hurd: Generalize init-first.c to support x86_64
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230223151436.49180-2-bugaevc@gmail.com>
This commit is contained in:
parent
b020355f38
commit
9168964965
@ -225,9 +225,15 @@ _hurd_stack_setup (void)
|
||||
void doinit (intptr_t *data)
|
||||
{
|
||||
init ((void **) data);
|
||||
# ifdef __x86_64__
|
||||
asm volatile ("movq %0, %%rsp\n" /* Switch to new outermost stack. */
|
||||
"xorq %%rbp, %%rbp\n" /* Clear outermost frame pointer. */
|
||||
"jmp *%1" : : "r" (data), "r" (caller));
|
||||
# else
|
||||
asm volatile ("movl %0, %%esp\n" /* Switch to new outermost stack. */
|
||||
"xorl %%ebp, %%ebp\n" /* Clear outermost frame pointer. */
|
||||
"jmp *%1" : : "r" (data), "r" (caller));
|
||||
# endif
|
||||
__builtin_unreachable ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user