From patchwork Wed Feb 15 06:16:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Cruz X-Patchwork-Id: 65030 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D442385841D for ; Wed, 15 Feb 2023 06:17:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D442385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676441827; bh=4Lm2ebDdErt0DxfyIq7V+lIXS+6JTMGgUOC/s0jW3pE=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HayJVWJF3LghYSGqPXqHXASc1NDqAYA2PAAyE9+P0oFSdevjmfxHX20M5JzrHZhpI YCvhbI85GqvKF/2dBZbB3tM1p/cQL80Wg7hgtpgivbZJbjjAca6Y1oZL5/hR1cGdKS jEh3iFUgavLRhNDZGKavx13z+wGDuo0SUUprx0N8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id D9CA33858D1E for ; Wed, 15 Feb 2023 06:16:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9CA33858D1E Received: by mail-il1-x12a.google.com with SMTP id y8so1448386ilv.1 for ; Tue, 14 Feb 2023 22:16:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4Lm2ebDdErt0DxfyIq7V+lIXS+6JTMGgUOC/s0jW3pE=; b=R89tXqAFzFPGeAXKBsBMWT8nxGZTDq14od3HWQ55bYQEPVzZmSEzfmfUuUfRYpeaht VOfM5JV/yKNKEtyXHsrI7KrTn2G7kTZhi62U14pty6TO0pD3F/Zu4h6en3v/6RWXX2jD Kd9ZQuvXsP0jVeFOddHf7OJQtHyJGJQPixaLlHe7tYSkIb6HXMVBlmeXEShkJKV8GXWj 3Q/2DFnX42sIGfNfRA1AdTKdC16gSQ11ginbKNMZapFWqZ2nTaXP3ii/oZRpwCTuAe6j teXY42mr369+ypoPq56gCr+RvXP5cFj0+tNHITs/4Zhr/fbKrDXOf6hWMU9R4Voj0F4G GO/w== X-Gm-Message-State: AO0yUKWwvCyZIU5tRMnC2fV6TE7www18SJGf6P3N2ZbIebmchPq0pA/g HXitiEE4qNXARGeCynfPyA== X-Google-Smtp-Source: AK7set9B0Lu478bFNsGzIVG5XgL86Nk+s+qYu/HFUhbRlUGQw42MmoENv/3lFnvHv0KMZMBSHhqHFQ== X-Received: by 2002:a92:b305:0:b0:315:5131:f8c5 with SMTP id p5-20020a92b305000000b003155131f8c5mr967381ilh.31.1676441800720; Tue, 14 Feb 2023 22:16:40 -0800 (PST) Received: from jupiter.tail36e24.ts.net (dynamic-acs-24-154-253-225.zoominternet.net. [24.154.253.225]) by smtp.gmail.com with ESMTPSA id h13-20020a0566380f8d00b003c4e2e8885fsm848448jal.108.2023.02.14.22.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 22:16:40 -0800 (PST) Date: Wed, 15 Feb 2023 01:16:38 -0500 To: bug-hurd@gnu.org, libc-alpha@sourceware.org Subject: [PATCH glibc] Define PC, SP and SYSRETURN for hurd x86_64 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Flavio Cruz via Libc-alpha From: Flavio Cruz Reply-To: Flavio Cruz Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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 */