public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] hurd: Drop x86-specific assembly from init-first.c
@ 2024-01-04 22:49 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2024-01-04 22:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b44ad8944b84dd83e89b50e298ee15701c8f2706

commit b44ad8944b84dd83e89b50e298ee15701c8f2706
Author: Sergey Bugaev <bugaevc@gmail.com>
Date:   Wed Jan 3 20:14:41 2024 +0300

    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>

Diff:
---
 sysdeps/mach/hurd/x86/init-first.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
index 6f71d71bf0..211b2096b6 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 ();
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-04 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04 22:49 [glibc] hurd: Drop x86-specific assembly from init-first.c Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).