[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c
From: |
Samuel Thibault |
Subject: |
Re: [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c |
Date: |
Thu, 4 Jan 2024 23:48:00 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Sergey Bugaev, le mer. 03 janv. 2024 20:14:41 +0300, a ecrit:
> 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>
> ---
>
> This was the last piece of x86 specifics in init-first.c!
> (Remember, it started as sysdeps/mach/hurd/i386/init-first.c, with lots of
> i386-specific assumptions about how arguments are passed and so on.)
>
> 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 6f71d71b..211b2096 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 ();
> }
>
> --
> 2.43.0
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
- Re: [PATCH 01/23] hurd: Add some missing includes, (continued)
Re: [PATCH 01/23] hurd: Add some missing includes, Samuel Thibault, 2024/01/03
[PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility, Sergey Bugaev, 2024/01/03
[PATCH 04/23] mach: Drop some unnecessary vm_param.h includes, Sergey Bugaev, 2024/01/03
[RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE, Sergey Bugaev, 2024/01/03
[RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c, Sergey Bugaev, 2024/01/03
- Re: [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c,
Samuel Thibault <=
[RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly, Sergey Bugaev, 2024/01/03
[PATCH 06/23] mach: Drop SNARF_ARGS macro, Sergey Bugaev, 2024/01/03
[RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific, Sergey Bugaev, 2024/01/03
[RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards, Sergey Bugaev, 2024/01/03
[RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds, Sergey Bugaev, 2024/01/03