From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 285923858D35 for ; Fri, 14 Jan 2022 14:21:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 285923858D35 Received: by mail-pf1-x432.google.com with SMTP id m1so2863901pfk.8 for ; Fri, 14 Jan 2022 06:21:59 -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=gJsu8Cgoe6TYQ46MJ0AAtY9boYjAXQuf4ua9cVOgPYw=; b=Ehs27oJ65GHFVAWQR1bLZaBYRAAk9JslfErDuR+c3rf1lP4PI5Fv2Hv5F5IqhVqjRr oQpoCne8CkeSCbE/hIUoa/7X/3MxsmaWyqXsoC84CE4Q/bPXRTHyCHMDKik2tV/L9MZG sla/oXnWfxKKwvSScCjVYvOWc1iNdSKN7TMzRgET6CDs2FECLbymyhJx35eZHXmf6iD+ c/ZWH7SntjiyQgIGay8hnhGqRGAd7bW4Skd+GNcarf1bDIvavT6cGrv/IkJ0bhvlRN78 Vd4pOevxwngpKvEVoNhTwhbHHgwAWwPZvjLwPbWf2WrPDTbvEPdwBRlDSnTbnVUBAgey qiNw== X-Gm-Message-State: AOAM532f8cL9EIZDlg8b9q62nEGOkJjfwxirHKzyqhZLGIfHE2WH0IVl 7RHmJvkJ/pX1Vx2cFUTcrPD8Tqe4+/8dGNpa2f8= X-Google-Smtp-Source: ABdhPJztaYUWOkDw6KowcYIQbj1GMIZTCu/tr3F8Gr16F0VKa76SLp4MFVifcJHSeWNIUK7RLbKFO+p87nwuOWQTGCY= X-Received: by 2002:a63:3848:: with SMTP id h8mr8099456pgn.125.1642170117942; Fri, 14 Jan 2022 06:21:57 -0800 (PST) MIME-Version: 1.0 References: <01dee4fcc3539959c720b1cc09193f80a5c2ba62.1642162312.git.fweimer@redhat.com> In-Reply-To: <01dee4fcc3539959c720b1cc09193f80a5c2ba62.1642162312.git.fweimer@redhat.com> From: "H.J. Lu" Date: Fri, 14 Jan 2022 06:21:21 -0800 Message-ID: Subject: Re: [PATCH 1/7] x86: HAVE_X86_LAHF_SAHF, HAVE_X86_MOVBE and -march=x86-64-vN (bug 28782) To: Florian Weimer Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3028.3 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 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: Fri, 14 Jan 2022 14:22:06 -0000 On Fri, Jan 14, 2022 at 4:40 AM Florian Weimer wrote: > > HAVE_X86_LAHF_SAHF is implied by x86-64-v2, and HAVE_X86_MOVBE by > x86-64-v3. > > The individual flag does not appear in -fverbose-asm flag output > even if the ISA level implies it. > --- > sysdeps/x86/configure | 4 ++-- > sysdeps/x86/configure.ac | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure > index 62676bb686..7bdbfdc6dc 100644 > --- a/sysdeps/x86/configure > +++ b/sysdeps/x86/configure > @@ -155,7 +155,7 @@ else > (eval $ac_try) 2>&5 > ac_status=$? > $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > - test $ac_status = 0; }; } | grep -q "\-msahf"; then > + test $ac_status = 0; }; } | grep -qE '(-msahf\b|-march=x86-64-v)'; then > libc_cv_have_x86_lahf_sahf=yes > fi > fi > @@ -176,7 +176,7 @@ else > (eval $ac_try) 2>&5 > ac_status=$? > $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > - test $ac_status = 0; }; } | grep -q "\-mmovbe"; then > + test $ac_status = 0; }; } | grep -qE '(-mmovbe\b|-march=x86-64-v([3-9]|[1-9][0-9]))'; then > libc_cv_have_x86_movbe=yes > fi > fi > diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac > index 04a12ab680..10d5c2e0e5 100644 > --- a/sysdeps/x86/configure.ac > +++ b/sysdeps/x86/configure.ac > @@ -110,7 +110,7 @@ if test $libc_cv_include_x86_isa_level = yes; then > AC_CACHE_CHECK([for LAHF/SAHF instruction support], > libc_cv_have_x86_lahf_sahf, [dnl > libc_cv_have_x86_lahf_sahf=no > - if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -q "\-msahf"; then > + if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -qE '(-msahf\b|-march=x86-64-v)'; then > libc_cv_have_x86_lahf_sahf=yes > fi]) > if test $libc_cv_have_x86_lahf_sahf = yes; then > @@ -119,7 +119,7 @@ if test $libc_cv_include_x86_isa_level = yes; then > AC_CACHE_CHECK([for MOVBE instruction support], > libc_cv_have_x86_movbe, [dnl > libc_cv_have_x86_movbe=no > - if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -q "\-mmovbe"; then > + if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -qE '(-mmovbe\b|-march=x86-64-v(@<:@3-9@:>@|@<:@1-9@:>@@<:@0-9@:>@))'; then > libc_cv_have_x86_movbe=yes > fi]) > if test $libc_cv_have_x86_movbe = yes; then > -- > 2.34.1 > > LGTM. Reviewed-by: H.J. Lu Thanks. -- H.J.