mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
hurd: Drop x86-specific assembly from init-first.c
We already have the RETURN_TO macro for this exact use case, and it's already used in the non-static code path. Use it here too. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20240103171502.1358371-9-bugaevc@gmail.com>
This commit is contained in:
parent
24b707c166
commit
b44ad8944b
@ -218,15 +218,7 @@ _hurd_stack_setup (void **argptr)
|
||||
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
|
||||
RETURN_TO (data, caller, 0);
|
||||
__builtin_unreachable ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user