From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by sourceware.org (Postfix) with ESMTPS id 115DE3858C54 for ; Thu, 20 Oct 2022 23:07:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 115DE3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-xd31.google.com with SMTP id p16so909159iod.6 for ; Thu, 20 Oct 2022 16:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fThXAisbBK+sjjjheVN7sXyQlf8cnTcoPfedJw032Hc=; b=dhaGAzvkk5xCCpyi6ZIXzjARIN82HmR8eieSbqfr69O12jgQI2a79XhniBD6IngrIx +GUzI0pMZhjg28HnwLeBl49wMoVwvvToOUnWwTnacVKyIYLCyUay06goJ3JhrcH5IxUd ZmivlvjXGEwzTlmvQpb80/CYNxeuimMADPYFSQedjXmDXZxU2XH9KVNdLrzmsN3tXGMN rQLiLRULMEAav5WLK/fItJOfW2YTOgH+n2/SjZEqAAHo5IBB/iL3yOgUwZcR39l2YSLH JR4aks7CWrt0hHP2xEWpKFIyd2SGk5kLh9VDzk3mhh2dO0HN/RbJILMjmyR8LGk8NSLs 8WAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fThXAisbBK+sjjjheVN7sXyQlf8cnTcoPfedJw032Hc=; b=nUB7NKIk2wRYdO789/U85KvEys+ZJ6RH+Min97PqOTEUViZ5yAQn3LUTe223ezIa8h Pk/wVpaEt8IyaI9bLG6XUV2WTNKlGGlI3J3Yeh/B8/sKoClZ0MZUHGnAfp5gbz2GwWKv gI2y2aRpyIJXfeEN58InpOA2az9PjRhA/D6EoVRD8AwOJHhsP0CfsPrxgJ97Hs8UKjUs 9NVYeLEjln70NalJT1hFR96kQhZBRUTLLm07ZiKa3JqQKY26ZbiYsDwb7aVHYzfRGVUV k5i7I0v0blABWuibJ+cukAJzX3SfQ180RO7MLx7748KG2UkI65cGtd19JgE3sdifqbER 32+Q== X-Gm-Message-State: ACrzQf2i6r4i7nUhhwZ5DOMUovKD14rDwHDqYykQRFKnO2GIwgyXwbxh AkNSwCgT+TM696C4Q6SS+kwRZUZdm1KYihZJwbAR9W8x X-Google-Smtp-Source: AMsMyM7e2ccWc9D8Pe103F0tAgm7ogwqAtnImeF94bX/zj4s+e96Pu/NVPdoC+I06uWMi4Gs+l2gVz0NrMboSFmXJGA= X-Received: by 2002:a05:620a:2683:b0:6cf:3768:8e4b with SMTP id c3-20020a05620a268300b006cf37688e4bmr10961430qkp.768.1666307218233; Thu, 20 Oct 2022 16:06:58 -0700 (PDT) MIME-Version: 1.0 References: <20221020230237.19630-1-crrodriguez@opensuse.org> In-Reply-To: <20221020230237.19630-1-crrodriguez@opensuse.org> From: "H.J. Lu" Date: Thu, 20 Oct 2022 16:06:21 -0700 Message-ID: Subject: Re: [PATCH] Remove htonl.S for i386/x86_64 To: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3023.8 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 List-Id: On Thu, Oct 20, 2022 at 4:03 PM Cristian Rodr=C3=ADguez via Libc-alpha wrote: > > Generic implementation on top of __bswap_32 always expands > inline to either bswap or movbe depending on -march=3D*. > > Signed-off-by: Cristian Rodr=C3=ADguez > --- > sysdeps/i386/htonl.S | 34 ---------------------------------- > sysdeps/x86_64/htonl.S | 34 ---------------------------------- > 2 files changed, 68 deletions(-) > delete mode 100644 sysdeps/i386/htonl.S > delete mode 100644 sysdeps/x86_64/htonl.S > > diff --git a/sysdeps/i386/htonl.S b/sysdeps/i386/htonl.S > deleted file mode 100644 > index c925440fe4..0000000000 > --- a/sysdeps/i386/htonl.S > +++ /dev/null > @@ -1,34 +0,0 @@ > -/* Change byte order in word. For Intel 80x86, x >=3D 4. > - Copyright (C) 1997-2022 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 > - . */ > - > -#include > -#include "asm-syntax.h" > - > -/* > - INPUT PARAMETERS: > - word (sp + 4) > -*/ > - > - .text > -ENTRY (htonl) > - movl 4(%esp), %eax > - bswap %eax > - ret > -END (htonl) > - > -weak_alias (htonl, ntohl) > diff --git a/sysdeps/x86_64/htonl.S b/sysdeps/x86_64/htonl.S > deleted file mode 100644 > index 469da6340b..0000000000 > --- a/sysdeps/x86_64/htonl.S > +++ /dev/null > @@ -1,34 +0,0 @@ > -/* Change byte order in word. For AMD x86-64. > - Copyright (C) 1997-2022 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 > - . */ > - > -#include > -#include "asm-syntax.h" > - > -/* > - INPUT PARAMETERS: > - word %rdi > -*/ > - > - .text > -ENTRY (htonl) > - movl %edi, %eax > - bswap %eax > - ret > -END (htonl) > - > -weak_alias (htonl, ntohl) > -- > 2.38.0 > LGTM. Thanks. --=20 H.J.