Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4583382pxu; Tue, 13 Oct 2020 01:53:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSEcrUd+v0gkwMMY3GKzZpQqx4F4ypfQeNgqOyK4DYXoVdWKLvNd7WyDWI54InbqLlIUQT X-Received: by 2002:a17:907:11d0:: with SMTP id va16mr30971384ejb.22.1602579207735; Tue, 13 Oct 2020 01:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602579207; cv=none; d=google.com; s=arc-20160816; b=vUEwOg50REtMan+Dz1No0BEHuHcFyu129n1UNy5ULUckCfprr1frRaOY35Yfq2r91l J+QcNBf68wp16ZGCxjZS66oa94pI6+syXI+IRer3I7kEQ73jxkJ1P2qXr1HhUAgfsA5p Hd9dcIbE00rfFCrzhJmJ2d3b2VzIXNNqBSGo09/gsq7WqWi0q+DaxckHg8+NgxXx7uOY z1SWor6rrS9XWZsjzPZ7MDNDXr+UDeCPZwgXx3hIpSEe73peF+JjBwjNUrcnJxGHdWwV sw/aIUw5nutJl9DB+q824xvwaQeKT4174XtKFIJvvbAOHScogh/wasyqJD3Pzwv+d+M2 5Z1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2lprN5cwXxgg0fkExcWkwF6M0UrLd8DkiuL9nvugSqU=; b=dlxZjTPxVEzcon0qTE+3DN60McFASfWgUuEKEABiAJ1Q/rN8oq6/HB96+eRFLlR3Qx l+KK6jXJKaWxFxVizIiU3EcEJpUpOuys6fIEiMNrXEiOmh2k2bxaTmzvemhtW6l3dpvB xr0O33asariDaEiaa9j5DnnPlUB2EA82HKHKpRrjHONSpBLZUHMmJgp6SzCBvH7BG5Ca PbDMLI3G4aq6jr+wRYeK/322iEC1FDCeSc7Ynm7jY5VwxzjHVjvwqqQeM80fZ0ZHSaiW DZFkjINrA5T4tGyxIJTwZIHPI1rJmxXUxP74Z6vPW7yBNnF8SL8wCo/EXbLcbIFKT/mM 7x6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="L/aCV2yP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si12023509edv.312.2020.10.13.01.53.04; Tue, 13 Oct 2020 01:53:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="L/aCV2yP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730361AbgJLS5F (ORCPT + 99 others); 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-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