Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2073020ybk; Mon, 11 May 2020 11:15:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzw/fCaKwARNZuy8KlOge4Cs4VDX3RTwf7YfMkNkuH3Ru7R6uvvxR/2HtEYYKT/lwgLCSNq X-Received: by 2002:a50:bf04:: with SMTP id f4mr6050029edk.91.1589220931545; Mon, 11 May 2020 11:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589220931; cv=none; d=google.com; s=arc-20160816; b=HaO7WqIh0rpArHWPQGaDNgKysD1axFt7xNDrl5158wzDMIy1Xa/S68uC4sUoNWBgiQ /dInmuQm/ntDj/4L+zAbh8KTOr/FiVUJzaUIMevuBUthmCQQASNrVU1EtRYigoJct0oD CZjNutAwyi09SSZXHeBnb/buRzmegDjLqxE55aHLlrqd3Sq9kJ8mofa/xvwTSlgTztah thDrQWKQiHHUs2yvXS4+85H8x5nVy4+5CXui6ASztirVLraF/a8PZOOSBYefCdMOXqgj tFOVPruF8MBSAh/UA1r/VK5k3sGjAjcD+SnsMIVVLnUZTlW8rdrQwi4RJYYnwIKuS1dh ewxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Wr1ycv+siaolsKCvcq8pIOR365B5ZJOgX6Pl3lWLVLc=; b=ArV+xotZSqRRwC7yLEwLrlR51uBtUJ48vIK2NXY7JNPRHpWhh0Qyo8MACkWYQURODz Q/f4569hEvZj8pzzCLfTLhUkg0YGpPWHc1kb3C1GtF76hUEP39EyOsoHdeOZE+gffVMQ QQKCBCSenW3QpDQQ2kfMjc9VfXaTjfYuFOnvQMjRcBXLe2OIJBVIeU9ZzqQu+mY18Jwj uPpDqzB13mNGNTIoCTI7UIQXlvgVVcSi1Z1XHAarb25TUqHAuI1UJNVfirhLmgv4Sby5 vmOjN3aXQHZ1PVU0lIdniUq9ToDAKD3noHlBM9Ro6S0KZIFpaiRagKR6l1rLAaceAE4V /4jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bDQ3m7zI; 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 t26si6362495edf.183.2020.05.11.11.15.07; Mon, 11 May 2020 11:15:31 -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=bDQ3m7zI; 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 S1731051AbgEKSMy (ORCPT + 99 others); Mon, 11 May 2020 14:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726891AbgEKSMy (ORCPT ); Mon, 11 May 2020 14:12:54 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6436C061A0C for ; Mon, 11 May 2020 11:12:53 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id o14so9526159ljp.4 for ; Mon, 11 May 2020 11:12:53 -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=Wr1ycv+siaolsKCvcq8pIOR365B5ZJOgX6Pl3lWLVLc=; b=bDQ3m7zIuQxezVOH9ZwaR/IFoNv1Ph7lBUT4KC1tOQ29Sv7/FfbpX1jR5I6MiVD1H3 a6h6kbSLdtdqMnCnTY9J9fT1T3Y12NmwK/y/yA9X355RI68xbl+N5jZAFV9W8R7IIbJ0 mV7WNsTiUF4PgcffhE6LD2y3c416dUv6ks6E0= 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=Wr1ycv+siaolsKCvcq8pIOR365B5ZJOgX6Pl3lWLVLc=; b=cLnvenB3ALSI6l/iTuA4Uj8mdw0UdFLimDCGas++aD7Wkd4WUl1Ge7qfS3KpEKQiba F6G1zA/IAHAyluX7IX2eKqLyYDPfhQ4o4SOnYTAO3OV9EHiFWVeF6Z/Ub1SnSDR3KQH7 tSNICibEgGmqo89RmYS/AsMh2NpinCL98AL7fy4siGqJYF1bfk8C/GCU9vK2wq34WI4c v9J/6NVXmR90WoC4WbspZGHSzmH1XyxSxYkvwJVybljDRX2Wx9vQzj4mvGH433UbQg+Y c4dud7pPMok1/sbhMUiFhki7wCxAp25tN5IrjphTlZnfUHoOnVQLO9J8beQzNnRW9WqL cocQ== X-Gm-Message-State: AOAM5313iLJRMSIF03ffR6gXTZr6ZCSnp/hJL/bQUqj20i//FZQwh/1a Xz0jKssEeVTPsgmTNF9GprZ1iUb8ZJw= X-Received: by 2002:a2e:b605:: with SMTP id r5mr10963005ljn.40.1589220770894; Mon, 11 May 2020 11:12:50 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id s27sm10532965ljo.80.2020.05.11.11.12.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 May 2020 11:12:49 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id z22so8351522lfd.0 for ; Mon, 11 May 2020 11:12:49 -0700 (PDT) X-Received: by 2002:ac2:47fb:: with SMTP id b27mr12159503lfp.10.1589220768686; Mon, 11 May 2020 11:12:48 -0700 (PDT) MIME-Version: 1.0 References: <20200504230309.237398-1-ndesaulniers@google.com> In-Reply-To: From: Linus Torvalds Date: Mon, 11 May 2020 11:12:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86: support i386 with Clang To: Nick Desaulniers Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , David Woodhouse , Arnd Bergmann , Dmitry Golovin , Dennis Zhou , Tejun Heo , Christoph Lameter , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Al Viro , Josh Poimboeuf , Masami Hiramatsu , Peter Zijlstra , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 10:24 AM Nick Desaulniers wrote: > > Bumping for comment+review. > > On Mon, May 4, 2020 at 4:03 PM Nick Desaulniers wrote: > > > > - : "qi" ((pto_T__)(val))); \ > > + : "qi" ((unsigned char)(unsigned long)(val))); \ I find the extra casts really annoying and illogical. I kind of see why they happen: just casting to 'unsigned char' can cause warnings, when this case isn't even taken, and the sizeof(var) is something else (and you cast a pointer to a char without going through the 'unsigned long' first. But that doesn't make this change any more sensible or readable. Would using "__builtin_choose_expr()" be able to avoid this whole issue? Because I'd rather re-write the whole thing with a different model that doesn't have this issue, than make the code look insane. And it does look insane, because that whole thing makes for a very natural question: "why do we cast to unsigned long and then to char, when we just checked that the size of the type is 1"? Linus