From patchwork Sun Feb 5 08:23:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Cruz X-Patchwork-Id: 1737714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=FOmyVoCh; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P8nRR6vg0z23j0 for ; Sun, 5 Feb 2023 22:36:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85B96385840E for ; Sun, 5 Feb 2023 11:36:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85B96385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675597008; bh=yzt4/Jh8+EBVDwHTygwEv24SLb1cOX15T4DN8kFqOyw=; h=Resent-From:Resent-Date:Resent-To:Date:To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=FOmyVoChA3ES93kw1wk3nfcaY9FMZEZmsoGkuVtrOLjStnwSdyBB+VePnBPAKxFty dOUi3FziA9NzF/lkayRKtE4DAhOTMMSJLMyGK3UlkLrcQ2jVmuS5qjz1TQCNzdlWen /Bh5/+NRztD+JrGyz0Rtqtn/x9dlEJFxif4dpcb8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id ABE1E3858D1E for ; Sun, 5 Feb 2023 11:36:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABE1E3858D1E Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 99A1F104F for ; Sun, 5 Feb 2023 12:36:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6wbOOUgjFOFs for ; Sun, 5 Feb 2023 12:36:29 +0100 (CET) Received: from begin (unknown [164.15.244.46]) by hera.aquilenet.fr (Postfix) with ESMTPSA id BF6A52EA for ; Sun, 5 Feb 2023 12:36:29 +0100 (CET) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pOdJt-002jkC-0C for libc-alpha@sourceware.org; Sun, 05 Feb 2023 12:36:29 +0100 Resent-From: Samuel Thibault Resent-Date: Sun, 5 Feb 2023 12:36:29 +0100 Resent-Message-ID: <20230205113629.tx3uedlxu3lxoq3w@begin> Resent-To: libc-alpha@sourceware.org X-Spam-Language: Received: from webmel.u-bordeaux.fr [147.210.215.28] by begin.youpi.perso.aquilenet.fr with IMAP (fetchmail-6.4.35) for (single-drop); Sun, 05 Feb 2023 09:34:09 +0100 (CET) Received: from v-zimboxp12.srv.u-bordeaux.fr (LHLO v-zimboxp12.srv.u-bordeaux.fr) (147.210.219.112) by v-zimboxp12.srv.u-bordeaux.fr with LMTP; Sun, 5 Feb 2023 09:24:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by v-zimboxp12.srv.u-bordeaux.fr (Postfix) with ESMTP id D8B03C0AA3 for ; Sun, 5 Feb 2023 09:24:02 +0100 (CET) Received: from v-zimboxp12.srv.u-bordeaux.fr ([127.0.0.1]) by localhost (v-zimboxp12.srv.u-bordeaux.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 37n0klTRH61V for ; Sun, 5 Feb 2023 09:24:01 +0100 (CET) Received: from mta-in04.u-bordeaux.fr (mta-in04.u-bordeaux.fr [147.210.215.47]) by v-zimboxp12.srv.u-bordeaux.fr (Postfix) with ESMTPS id 7E627C0AB3 for ; Sun, 5 Feb 2023 09:24:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta-in04.u-bordeaux.fr (Postfix) with ESMTP id 6C9BF130890 for ; Sun, 5 Feb 2023 09:24:01 +0100 (CET) Received: from mta-in04.u-bordeaux.fr ([127.0.0.1]) by localhost (mta-in04.u-bordeaux.fr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AWAz4MRS_-Z9 for ; Sun, 5 Feb 2023 09:24:01 +0100 (CET) Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by mta-in04.u-bordeaux.fr (Postfix) with ESMTPS id 3EA80130880 for ; Sun, 5 Feb 2023 09:24:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id CF5052014A for ; Sun, 5 Feb 2023 09:23:59 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o2PTIX30eKn2 for ; Sun, 5 Feb 2023 09:23:59 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -7 X-policyd-weight: using cached result; rate:hard: -7 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPS id 8DE2720146 for ; Sun, 5 Feb 2023 09:23:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOaJC-0003jP-8g; Sun, 05 Feb 2023 03:23:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOaJA-0003j8-1E for bug-hurd@gnu.org; Sun, 05 Feb 2023 03:23:32 -0500 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOaJ8-00069V-6X for bug-hurd@gnu.org; Sun, 05 Feb 2023 03:23:31 -0500 Received: by mail-il1-x129.google.com with SMTP id h18so3697102ilj.6 for ; Sun, 05 Feb 2023 00:23:29 -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=yzt4/Jh8+EBVDwHTygwEv24SLb1cOX15T4DN8kFqOyw=; b=PlEqlDihiyriIl50g4V1s9iADN+yr7C3PteYbVnkRUD0qVfSO/OwidRQelkuNC+a9L wrMfF1xr8xqTThctGISSHBcdZQwy1AD46p0ldygXfC/nSXtCOqPTFyg1u/kH+M6Y85Bn fKIfrAX684Cfqz2Y27Tpv/DrwSVmCVBDc5jyyKIdKxW3LTJFvo3oyTMqFTWpB8GwT7i6 4sADWOjvPtXld7Sv0PBjnPetSdnvst0rCadmSyvunG9ihbju8JJPgl2+qOuPx0Ypnm8y qO+9JzOd2NFCJk84oV3aPX48GGpxHuRistOHuw2yjn0aPsylnIpuorq4pQYvapzy9JnP fgeg== X-Gm-Message-State: AO0yUKWbZ1AXLdAA0ufn97I+cQLhseRt4V8F6fCIJGN3YsDHWQDaDZXH X0qRv/P4lHf1aeR/xlvLRJKWqvn4/Q== X-Google-Smtp-Source: AK7set+qassKO75Bx94P1u6+Z17ljKGjkLgPyRHC3oWgDcli5HO7BYuixXtOMLz8jc/CV1k+ckEEZQ== X-Received: by 2002:a92:c26b:0:b0:30b:e45c:3d1a with SMTP id h11-20020a92c26b000000b0030be45c3d1amr13368514ild.23.1675585408103; Sun, 05 Feb 2023 00:23:28 -0800 (PST) Received: from jupiter.tail36e24.ts.net ([24.154.253.225]) by smtp.gmail.com with ESMTPSA id g15-20020a05663816cf00b0039decb5b452sm2524408jat.65.2023.02.05.00.23.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 00:23:27 -0800 (PST) Date: Sun, 5 Feb 2023 03:23:25 -0500 To: bug-hurd@gnu.org Subject: [PATCH glibc] Move RETURN_TO to x86/sysdep.h and implement x86_64 version. Message-ID: MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass client-ip=2607:f8b0:4864:20::129; envelope-from=flaviocruz@gmail.com; helo=mail-il1-x129.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-hurd@gnu.org X-Mailman-Version: 2.1.29 Precedence: list X-Rspamd-Queue-Id: 3EA80130880 X-Rspamd-Action: no action X-Rspamd-Server: mta-in04 X-Spamd-Result: default: False [-4.21 / 15.00]; BAYES_HAM(-3.00)[99.99%]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MAILLIST(-0.20)[mailman]; R_SPF_ALLOW(-0.20)[+a:sonata.ens-lyon.org]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[flaviocruz@gmail.com,SRS0=Y0@bounce.ens-lyon.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM(-0.00)[-0.993]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[A=6B=gnu.org=bug-hurd-bounces,samuel.thibault=ens-lyon.org]; RCVD_COUNT_SEVEN(0.00)[9]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1945, ipnet:140.77.0.0/16, country:EU]; FORGED_SENDER_MAILLIST(0.00)[] X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, JMQ_SPF_NEUTRAL, KAM_SHORT, MAILING_LIST_MULTI, SPF_HELO_PASS, 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 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+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" --- sysdeps/mach/i386/sysdep.h | 34 ---------------------------------- sysdeps/mach/x86/sysdep.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 34 deletions(-) delete mode 100644 sysdeps/mach/i386/sysdep.h diff --git a/sysdeps/mach/i386/sysdep.h b/sysdeps/mach/i386/sysdep.h deleted file mode 100644 index 33bd5ee402..0000000000 --- a/sysdeps/mach/i386/sysdep.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991-2023 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _MACH_I386_SYSDEP_H -#define _MACH_I386_SYSDEP_H 1 - -#include - -#define RETURN_TO(sp, pc, retval) \ - asm volatile ("movl %0, %%esp; jmp %*%1 # %2" \ - : : "g" (sp), "r" (pc), "a" (retval)) - -/* This should be rearranged, but at the moment this file provides - the most useful definitions for assembler syntax details. */ -#undef ENTRY -#undef ALIGN -#include - -#endif /* mach/i386/sysdep.h */ diff --git a/sysdeps/mach/x86/sysdep.h b/sysdeps/mach/x86/sysdep.h index 90f295b27d..7ad785234f 100644 --- a/sysdeps/mach/x86/sysdep.h +++ b/sysdeps/mach/x86/sysdep.h @@ -44,4 +44,21 @@ /* Get the machine-independent Mach definitions. */ #include +#undef ENTRY +#undef ALIGN + +#ifdef __x86_64__ +#define RETURN_TO(sp, pc, retval) \ + asm volatile ("movq %0, %%rsp; jmp %*%1 # %2" \ + : : "g" (sp), "r" (pc), "a" (retval)) +/* This should be rearranged, but at the moment this file provides + the most useful definitions for assembler syntax details. */ +#include +#else +#define RETURN_TO(sp, pc, retval) \ + asm volatile ("movl %0, %%esp; jmp %*%1 # %2" \ + : : "g" (sp), "r" (pc), "a" (retval)) +#include +#endif + #endif /* mach/x86/sysdep.h */