From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78C50C433DF for ; Mon, 12 Oct 2020 18:57:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 271ED2087D for ; Mon, 12 Oct 2020 18:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602529026; bh=80bO3aswEpFEOLWeQ2GDN1W++NooX6mF8Ib8UIO1I/M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=zI6ke1sd0BEGjgEdIMIDlEhNO5UMkqesrYaR8YKgrfzfoEWd/SrMIgjEBfIy6DbK+ RErcloaac3jca94X13IyJZiYcP455UEx9OSPwPCmfGX4QxrbqD5sJzKVWcOY/qNTAs UfKjefwv0g4ixDupV2ZNQS0e3qpC/Nt6dJEXgPao= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730782AbgJLS5F (ORCPT ); Mon, 12 Oct 2020 14:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727115AbgJLS5E (ORCPT ); Mon, 12 Oct 2020 14:57:04 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81E33C0613D0 for ; Mon, 12 Oct 2020 11:57:04 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id c21so17874528ljn.13 for ; Mon, 12 Oct 2020 11:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2lprN5cwXxgg0fkExcWkwF6M0UrLd8DkiuL9nvugSqU=; b=L/aCV2yPKMbgiGB5D/DxhDo8SA8yk9SwZSpKtzzThF9eCi+Q7AYNeuhFp7SKfAAqw1 PfMYtZ1tm8HIpj+I6CBdDgKJbxHv09+CGEdk45n/tPBKFabluvuV2oXzCfRhvr+1myxX KBcocjYIgsNWGaS0fCEkoFayVwc1qq7R1mlH8= 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=2lprN5cwXxgg0fkExcWkwF6M0UrLd8DkiuL9nvugSqU=; b=CwLfvwBbWXTcjXLolMHQV5LF3bwDBPttwpgPX5FLwoo07koEFeBRHnjH1kehJOKiTl 60bWLJ2EIa/HggEjoaOSVwzo2SuOd2Hc9ajeEDFNj4Oe22bM1jJmeu4XvVHaJ9gCmlMA 6uLgowM+b5bVS408njR6sHW0u1gCu+2nor3BogB7NPrjEy9ZmPDB1WxlqSyhzuhKYyLF Tv459Wy6QxckzuEr2m4x933JGybYNpalGz5EpPtK/QGQFsmnEJU2uG+lGOUao+gnDsuD hudMP45f95jvo0ghzVQJSb3jBI5upFlAB+VfzUwBOtK5RPDE2mQjgp+pBFb8XsXo3t3b B5Cg== X-Gm-Message-State: AOAM531UmgsUTVJ00Ya3jM7i1Sxr2fkuM/xfCbq2/s1tSnhcvV2JhOAw P/X2QEaWmRJuvt6VRUSIEmomaXIg1FVfiA== X-Google-Smtp-Source: ABdhPJzIUfhRAoFFZn8nwUAssQpYg3IyV5yk+TgwbRPUcQc5p7Wp91hYLbT0WP+8/dZxP1zlH8eyQQ== X-Received: by 2002:a2e:88c2:: with SMTP id a2mr8425157ljk.438.1602529022594; Mon, 12 Oct 2020 11:57:02 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id c17sm1055740lfi.35.2020.10.12.11.57.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Oct 2020 11:57:01 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id 184so19410064lfd.6 for ; Mon, 12 Oct 2020 11:57:01 -0700 (PDT) X-Received: by 2002:a19:cbcb:: with SMTP id b194mr2048353lfg.133.1602529021618; Mon, 12 Oct 2020 11:57:01 -0700 (PDT) MIME-Version: 1.0 References: <20201012110557.GK25311@zn.tnic> In-Reply-To: From: Linus Torvalds Date: Mon, 12 Oct 2020 11:56:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] x86/asm updates for v5.10 To: Uros Bizjak Cc: Borislav Petkov , x86-ml , lkml Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 11:41 AM Uros Bizjak wrote: > > GCC does not distinguish between %ah and %al and it is not possible to pass "%ah" to the assembly. To access the high part of the %ax register, %h modifier has to be used in the assembly template. Do you know whether that's true for clang too, for example? Also note that even if the _asm_ might get "%al", maybe the compiler decided to use "%ah" for something else? I have memories of gcc using the high registers at some point, but it might have been some special case code - and it might also be very historical. [ Goes off and checks ] In fact, I can still find gcc generating high register code, although it's quite possible that yes, it's only peephole bit extract instruction kind of use.. I also find that clang generates code that uses the high byte registers, although again, that's not from any knowledge of clang internals, and just by looking at my kernel image disassembly. So yes, it _may_ all be just peepholes, but it's not obvious that this is all safe. Linus