From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by sourceware.org (Postfix) with ESMTPS id AE69F3840C37 for ; Wed, 15 Jul 2020 14:46:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AE69F3840C37 Received: by mail-il1-x141.google.com with SMTP id o3so2155333ilo.12 for ; Wed, 15 Jul 2020 07:46:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UYElRVU2ekqJX0jtFR6sU7w3l4xIAuFcLfOP//tV73E=; b=ggbQ+RR66SPFYHu8vXlrm79It3NEhO/aaG3F9PD2lh3zABfUfvxU1rgnVSSbn3aKqW jTe3jAAlV/RIgEtrTVoZX5mmHrdMg50lKIif5NI9N3oQ/VQixcKbXZqXPionLFaYAq+l +4g1Y8MUTsGMcFbBInK7oI/nhVw7hmhl+/HFfq4kOeT8PhnjsOr9TvYCiozKwp+UYl92 wy6xeMmgCeHQi+8Vm1wB+HPXF9N8MgWKahgct2Xhah507PcPZetVpJkcwwUs3pYlbehT nwnGk2vkodlo5Z2Id3twBZI/RhMHo9vL7H3Z8Fp1Yc7WOtjNiml7+E8CLpOsYqkU/MyF TBQQ== X-Gm-Message-State: AOAM531kjHR8x6UyZdxni3lzkqUwzA6MoyvVhsvREzwiGFkZBiGjAyP1 +A+HTRdhyKkeUu9qOxR9+LYxL68V5+XP+NAFa/s= X-Google-Smtp-Source: ABdhPJxMAOuJPvdGDbLRHFez39uqF1IfqHElx4FR0AqA4qGuQscUHiCMMorRHdEyBmFTUME0fhui4g6ki6Tz5p8NZPo= X-Received: by 2002:a92:bf0c:: with SMTP id z12mr9795543ilh.151.1594824364092; Wed, 15 Jul 2020 07:46:04 -0700 (PDT) MIME-Version: 1.0 References: <87365zz3a6.fsf@oldenburg2.str.redhat.com> In-Reply-To: From: "H.J. Lu" Date: Wed, 15 Jul 2020 07:45:28 -0700 Message-ID: Subject: Re: New x86-64 micro-architecture levels To: Mark Wielaard Cc: Florian Weimer , GNU C Library , GCC Development , llvm-dev@lists.llvm.org, x86-64-abi , "Mallappa, Premachandra" , Michael Matz , Tom Stellard , Jeff Law Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 14:46:05 -0000 On Wed, Jul 15, 2020 at 7:38 AM Mark Wielaard wrote: > > Hi Florian, > > I understand you want to discuss the x86_64 micro-architecture levels > only in this thread, but it would be nice to have a similar discussion > for other architectures. > > One thing that wasn't clear to me from this proposal is how the glibc > dynamic loader checks for the CPU feature flags. This is important for > valgrind since it can communicate those through different means. cpuid > interception, auxv AT_HWCAP/AT_HWCAP2 interception (but not AT_PLATFORM > at the moment) and of course we can generate SIGILL for unsupported > instructions. We currently don't intercept /proc/cpuinfo (but could). In library, we can use : https://sourceware.org/pipermail/libc-alpha/2020-June/115546.html In GCC, we can use __builtin_cpu_supports. supports all features and __builtin_cpu_supports in GCC 11 supports all features which GCC has codegen for. > I think it is important to be precise here, because in the past this > has sometimes caused confusion. For example for how to check correctly > for avx, lzcnt, or fma[4] support. > > Thanks, > > Mark > > P.S. I don't particular like the numbered names, but well, bike-shed... -- H.J.