From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 6A70C385781F for ; Mon, 20 Feb 2023 11:49:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A70C385781F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTu7U-0005ks-Mm; Sun, 19 Feb 2023 19:33:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=fu9C4DNCKELoHemPrZyrLEahyfOtMXiE25liHeolG1U=; b=BtQpSdzSIG9XgycnLDFs Ofay0LebmZ4it5u3/H6K5ujKO3th1gGZtYQewxDtyo86TgdOcTV3zyg34GPjnh6wDjIaoDiAu+D3c GQyFNtwq2P1CYcto6oXvgffY4eZGQrohH+OTpBacagKkyalOCUcvikj+IAhTg3ptSpqeWVyjAQ9lV OyxXsHaKMkE5GA8fFx0qEcFi0I9yFJ2RGMDt4VP91HuvSQJNZhv8LIkm+iYlu3iWIILXQiptfnxBm guu5HiKo+gaVG0NkL45OoS2GR6srpZ+BiyaVdkyPsE+ZZsAuAmp4Ay+n/ygJh4NX93XVCdLQekKGv N3JJUtgaBEJqmA==; Received: from lfbn-bor-1-1163-184.w92-158.abo.wanadoo.fr ([92.158.138.184] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTu7U-0003Wj-BV; Sun, 19 Feb 2023 19:33:28 -0500 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pTu7S-00186X-2a; Mon, 20 Feb 2023 01:33:26 +0100 Date: Mon, 20 Feb 2023 01:33:26 +0100 From: Samuel Thibault To: Flavio Cruz Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Subject: Re: [PATCH glibc] Define PC, SP and SYSRETURN for hurd x86_64 Message-ID: <20230220003326.hetnhjy3qjlr5637@begin> Mail-Followup-To: Flavio Cruz , bug-hurd@gnu.org, libc-alpha@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Applied, thanks! Flavio Cruz, le mer. 15 févr. 2023 01:16:38 -0500, a ecrit: > Moved thread_state.h to x86 directory since we only need to customize > those 3 definitions. > --- > sysdeps/mach/{i386 => x86}/thread_state.h | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > rename sysdeps/mach/{i386 => x86}/thread_state.h (90%) > > diff --git a/sysdeps/mach/i386/thread_state.h b/sysdeps/mach/x86/thread_state.h > similarity index 90% > rename from sysdeps/mach/i386/thread_state.h > rename to sysdeps/mach/x86/thread_state.h > index 4e6ce1f7dd..5be0bec150 100644 > --- a/sysdeps/mach/i386/thread_state.h > +++ b/sysdeps/mach/x86/thread_state.h > @@ -16,8 +16,8 @@ > License along with the GNU C Library; if not, see > . */ > > -#ifndef _MACH_I386_THREAD_STATE_H > -#define _MACH_I386_THREAD_STATE_H 1 > +#ifndef _MACH_X86_THREAD_STATE_H > +#define _MACH_X86_THREAD_STATE_H 1 > > #include > > @@ -29,9 +29,15 @@ > > #define machine_thread_state i386_thread_state > > +#ifdef __x86_64__ > +#define PC rip > +#define SP ursp > +#define SYSRETURN rax > +#else > #define PC eip > #define SP uesp > #define SYSRETURN eax > +#endif > > #define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ > asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ > @@ -50,4 +56,4 @@ struct machine_thread_all_state > > #include > > -#endif /* mach/i386/thread_state.h */ > +#endif /* mach/x86/thread_state.h */ > -- > 2.39.1 > > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.