From: Sergey Bugaev Date: Wed, 3 Jan 2024 17:14:41 +0000 (+0300) Subject: hurd: Drop x86-specific assembly from init-first.c X-Git-Tag: glibc-2.39~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b44ad8944b84dd83e89b50e298ee15701c8f2706;p=thirdparty%2Fglibc.git 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 Message-ID: <20240103171502.1358371-9-bugaevc@gmail.com> --- diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c index 6f71d71bf06..211b2096b6e 100644 --- a/sysdeps/mach/hurd/x86/init-first.c +++ b/sysdeps/mach/hurd/x86/init-first.c @@ -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 (); }