From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id B75543858413 for ; Tue, 14 Sep 2021 03:40:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B75543858413 Received: by mail-pf1-x42a.google.com with SMTP id q22so10897727pfu.0 for ; Mon, 13 Sep 2021 20:40:29 -0700 (PDT) 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=oh4s4ZhEzxUhdmUcXxP7uiXlTSMI5kGQmaGQ8HQJyro=; b=1lhzy458mfboR+QUpfTd8ZR96qNOIGDpTU9I5ianLD+mxmWfvXkEDfAzsOVWWlTKKk KDk/BlL3ozWfXrNpA4Y7VLyDUhV8YuU5XG9i7xoGs/dzWjB5+bVKtcdYpa7HuotRLYE8 GNcLVDk18r+MNd+Vz4v4yashe7WRVKmSBLyy8M3fGVhLVfhytF5xVMiUbSU48+kPkgto X9YLN8IpSHJaBLPLgdu3Q/pkpIvmHEwkK8EkSOkBm2O2C6LfKvlL48WyPhvEO6LMm10Z jxAVo+6+ic1sy+HZKcQJZ0IG9JWuZocVJQe55yYJk86uZf3Md2Po6P0t9jvLLwe682Ed qxyg== X-Gm-Message-State: AOAM530dOj8WLIFasp/9mZ1GY2di5FTSivzztAvSukbR8V4dl7bkxOi5 keJmdhxCSgeFiNYWXUWXMTwhbXBJ3ghXvEVAu8rYoRZRVr8= X-Google-Smtp-Source: ABdhPJzI24B6R67zdgWtpXsm9GmOyjJSYZd9FpEL1NJ0xqKDwLo/bw3JHHhETvBJH+T49pAqTXlh//5iZuAsy3qcllk= X-Received: by 2002:a05:6a00:b47:b0:43d:cac0:cbe with SMTP id p7-20020a056a000b4700b0043dcac00cbemr2640224pfo.79.1631590828892; Mon, 13 Sep 2021 20:40:28 -0700 (PDT) MIME-Version: 1.0 References: <20210913230506.546749-1-goldstein.w.n@gmail.com> <20210913230506.546749-5-goldstein.w.n@gmail.com> <2ca0771e-2d1d-c0dd-ac98-8f6946d7b469@redhat.com> In-Reply-To: From: Noah Goldstein Date: Mon, 13 Sep 2021 22:40:18 -0500 Message-ID: Subject: Re: [PATCH 5/5] x86_64: Add evex optimized bcmp implementation in bcmp-evex.S To: "Carlos O'Donell" Cc: DJ Delorie , GNU C Library X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 14 Sep 2021 03:40:31 -0000 On Mon, Sep 13, 2021 at 9:35 PM Carlos O'Donell wrote: > On 9/13/21 10:05 PM, Noah Goldstein wrote: > > On Mon, Sep 13, 2021 at 8:18 PM Carlos O'Donell > wrote: > > > >> On 9/13/21 7:05 PM, Noah Goldstein via Libc-alpha wrote: > >>> No bug. This commit adds new optimized bcmp implementation for evex. > >>> > >>> The primary optimizations are 1) skipping the logic to find the > >>> difference of the first mismatched byte and 2) not updating src/dst > >>> addresses as the non-equals logic does not need to be reused by > >>> different areas. > >>> > >>> The entry alignment has been fixed at 64. In throughput sensitive > >>> functions which bcmp can potentially be frontend loop performance is > >>> important to opimized for. This is impossible/difficult to do/maintain > >>> with only 16 byte fixed alignment. > >>> > >>> test-memcmp, test-bcmp, and test-wmemcmp are all passing. > >> > >> This series fails in the containerized 32-bit x86 CI/CD regression > tester. > >> > >> > https://patchwork.sourceware.org/project/glibc/patch/20210913230506.546749-5-goldstein.w.n@gmail.com/ > > > > > > Shoot. > > No worries! That's what the CI/CD system is there for :-) > > > AFAICT the first error is: > > *** No rule to make target '/build/string/stamp.os', needed by > > '/build/libc_pic.a'. > > I think a normal 32-bit x86 builds should show this issue. > > You need a gcc that accepts -m32. > Was able to get it with DJ's command. > > I minimally set: > export CC="gcc -m32 -Wl,--build-id=none" > export CXX="g++ -m32 -Wl,--build-id=none" > export CFLAGS="-g -O2 -march=i686 -Wl,--build-id=none" > export CXXFLAGS="-g -O2 -march=i686 -Wl,--build-id=none" > export CPPFLAGS="-g -O2 -march=i686 -Wl,--build-id=none" > > Then build with --host. > > e.g. > > /home/carlos/src/glibc-work/configure --host i686-pc-linux-gnu CC=gcc -m32 > -Wl,--build-id=none CFLAGS=-g -O2 -march=i686 -Wl,--build-id=none > CPPFLAGS=-g -O2 -march=i686 -Wl,--build-id=none CXX=g++ -m32 > -Wl,--build-id=none CXXFLAGS=-g -O2 -march=i686 -Wl,--build-id=none > --prefix=/usr > --with-headers=/home/carlos/build/glibc-headers-work-i686/include > --with-selinux --disable-nss-crypt --enable-bind-now --enable-static-pie > --enable-systemtap --enable-hardcoded-path-in-tests --enable-tunables=yes > --enable-add-ons Thanks for the help! > > > Also, does anyone know what make/configure commands I need to reproduce > > this on a x86_64-Linux machine? The build log doesn't appear to have the > command. > > DJ, Should the trybot log the configure step? > > So I think I was able to fix the build by making a new file in glibc/string/bcmp.c and just having bcmp call memcmp Is there another/better way to fix the build? I don't think it's really fair that every arch other than x86_64 should have to pay an extra function call cost to use bcmp. > -- > Cheers, > Carlos. > >