From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id 4D45C3858422 for ; Mon, 7 Feb 2022 14:33:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4D45C3858422 Received: by mail-oi1-x234.google.com with SMTP id u3so1257132oiv.12 for ; Mon, 07 Feb 2022 06:33:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tNXmyCDvevriJ1moV9eCozyETS6pTCrr/lQ9HUAPI4M=; b=VA7aSNTPAjuPhkEvJS8W8J+jwFGgUPLxqBCzTUjUkcR7Fzu0MV9LFNm1wfDRNbHn8d a8jB98wZcE9qdgTqyrjvS0qmWHPZ2I6KKx50xO6cI3jj2K7P44KlkgUcSjQS1LHAPYWo 55yTBwsKGJOYfw9SKEkaIza3qEc+fXsDULEDz/hOsrShPNM8r1iw89EvH+WeHj/BvIC8 SFbBPJHh/KyS2Jj9k5BGX+iZJvDsiiGhM3zpM79h397Zl/QBmKKiZDV/WFbf/Nymdw6u yRG3+DaSCupTxVBm5+nKYylj9V4vlf6YC3GwIUfFdO14Q6d2i6m/V7xc11WJsaQjD6kj tJXg== X-Gm-Message-State: AOAM532KBORE4pJ9YDwR/LiBm5F2EK+kb6S81p3S88tLjDora/6qbYzD Wbky2naj6hWblXwC9S/vw0PpxRh0we4nSzOl0iynyhmy7F0= X-Google-Smtp-Source: ABdhPJzYZM2xFEGfWi0VGQa8k5G1yZeJFColhEoTZRlaIYDzAGcwkcuAZnBYYm8d3b3ymu/qzCgM1EkeIkBkY0YCkrU= X-Received: by 2002:a05:6808:2024:: with SMTP id q36mr7280617oiw.234.1644244395685; Mon, 07 Feb 2022 06:33:15 -0800 (PST) MIME-Version: 1.0 References: <20220207063854.3324172-1-goldstein.w.n@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 7 Feb 2022 06:32:39 -0800 Message-ID: Subject: Re: [PATCH v1] x86: Remove SSE3 instruction for broadcast in memset.S (SSE2 Only) To: Noah Goldstein Cc: GNU C Library , "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3027.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 07 Feb 2022 14:33:17 -0000 On Mon, Feb 7, 2022 at 4:54 AM H.J. Lu wrote: > > On Sun, Feb 6, 2022 at 10:39 PM Noah Goldstein wrote: > > > > commit b62ace2740a106222e124cc86956448fa07abf4d > > Author: Noah Goldstein > > Date: Sun Feb 6 00:54:18 2022 -0600 > > > > x86: Improve vec generation in memset-vec-unaligned-erms.S > > > > Revert usage of 'pshufb' in broadcast logic as it is an SSE3 pshufb is an SSSE3, not SSE3, instruction. > > instruction and memset.S is restricted to only SSE2 instructions. > > --- > > sysdeps/x86_64/memset.S | 19 ++++++++++--------- > > 1 file changed, 10 insertions(+), 9 deletions(-) > > > > diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S > > index ccf036be53..148553cf3d 100644 > > --- a/sysdeps/x86_64/memset.S > > +++ b/sysdeps/x86_64/memset.S > > @@ -28,22 +28,23 @@ > > #define VMOVU movups > > #define VMOVA movaps > > > > -# define MEMSET_SET_VEC0_AND_SET_RETURN(d, r) \ > > +#define MEMSET_SET_VEC0_AND_SET_RETURN(d, r) \ > > movd d, %xmm0; \ > > - pxor %xmm1, %xmm1; \ > > - pshufb %xmm1, %xmm0; \ > > - movq r, %rax > > + movq r, %rax; \ > > + punpcklbw %xmm0, %xmm0; \ > > + punpcklwd %xmm0, %xmm0; \ > > + pshufd $0, %xmm0, %xmm0 > > > > -# define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \ > > +#define WMEMSET_SET_VEC0_AND_SET_RETURN(d, r) \ > > movd d, %xmm0; \ > > pshufd $0, %xmm0, %xmm0; \ > > movq r, %rax > > > > -# define MEMSET_VDUP_TO_VEC0_HIGH() > > -# define MEMSET_VDUP_TO_VEC0_LOW() > > +#define MEMSET_VDUP_TO_VEC0_HIGH() > > +#define MEMSET_VDUP_TO_VEC0_LOW() > > What are these changes for? > > > -# define WMEMSET_VDUP_TO_VEC0_HIGH() > > -# define WMEMSET_VDUP_TO_VEC0_LOW() > > +#define WMEMSET_VDUP_TO_VEC0_HIGH() > > +#define WMEMSET_VDUP_TO_VEC0_LOW() > > What are these changes for? > > > #define SECTION(p) p > > > > -- > > 2.25.1 > > > > > -- > H.J. -- H.J.