Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2129959ybk; Mon, 11 May 2020 12:39:09 -0700 (PDT) X-Google-Smtp-Source: APiQypKXCrUp3qYPfPpJMHn6bj6zdsOTVJndCw6EQADGVJtrLAV/672MqZsT8t1+YxcTNG1akN2Z X-Received: by 2002:a17:906:328c:: with SMTP id 12mr13837955ejw.69.1589225949693; Mon, 11 May 2020 12:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589225949; cv=none; d=google.com; s=arc-20160816; b=wAOMMzm2+3ZMbAmquYUwB7thJfNq/jLZmbjCz+nn2gLne6upPbqqh42xn8MHts+3OI zvzg8ZXk1FWAWbyX+herFNIdiIorlDC/EnV+rVhWGeFhA8gKDUjOKi+YTX+mloxLwfJT Teqdbnsq2axgvoLHliK9LAOdamWNVKJ6XtgH1t+jcEA5HKUzNBY1JO62gtldS5nwYb46 Vp9XKG4zE6nB9XmS2NiwIDFVyVRjWIc69fboQG0dFmc/74/DIrkupu8EN+xws5MzRraI xM8VUBtdFqUmL00AVwDNNJZBhMdwzMGimvPk2bjZLEFp8McJd6jYCrgnbg9wzCpBA9JZ XaWg== 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=rxzW0ANI9kIQTWoAt3YTFrrJiXpICLFsuHzSz+FA2EI=; b=SBjae5hdewYgtdgFhz9Dn47blvD1gF3PZHzqgIKJbSTK1eGBEPiAUPQM1q0QoFpRaJ gPyaz9vykbJxcLhpI+FfFsMz8eyxE81twdKunCZ1OATGnrvFh8AznezO3abNVkJ7ljIx Obqm0tf++9IF46DZSXIjjAlny9Ad4Zw9fNcrpyjJyL/2EKI3vPGm2mobm9O6n5Pc5j9q O2miYlp76LVSVkO9xLXW6OHZxUOpV77YUbKqKQnF85oi91DTKWWTiZD2Js9FOvCHtdxH 2XLgTYUF47boLn1q1Z/YnlFM/GmlykmTPZjw9y0tL6f5s9waBGEbjnQJ/8MrtIYGI/IR 3Z0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZTiKrsJO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si6557671edb.178.2020.05.11.12.38.47; Mon, 11 May 2020 12:39:09 -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=@gmail.com header.s=20161025 header.b=ZTiKrsJO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731406AbgEKTe7 (ORCPT + 99 others); Mon, 11 May 2020 15:34:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729453AbgEKTe7 (ORCPT ); Mon, 11 May 2020 15:34:59 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30952C061A0C for ; Mon, 11 May 2020 12:34:59 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id b71so2975220ilg.8 for ; Mon, 11 May 2020 12:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rxzW0ANI9kIQTWoAt3YTFrrJiXpICLFsuHzSz+FA2EI=; b=ZTiKrsJONnsTSzo4B5O6rFXU7drWFH6rv9O8IHjFYu0TO9LPJ4kSiKlVFjAyJq0ddm 2eUKt3CJ1kqc0+UtjAouPdI9d1l4IIlEH0mJANA31mCNJoXrSHSVA5FOJU2J8sC46mO0 W40T38zInvJHbdHIKz7W7FNYELyiXQMYcYGDsWbr0vKzp3Ozek2q6OvVK7pTwajPTWgG ktChwxEKgsFTtcKWbqmPZVS5l7zEdFmmvGXadz5Q7NcTkNX8BNv6hzUXyzRSgpN4bkh9 mI6DMlVPm+6q5j6N/INjZ7zHrTXS3tjFaqX8qHMKB5rjc48BeIXzp9Hy28a2ODirhcY6 2Zug== 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=rxzW0ANI9kIQTWoAt3YTFrrJiXpICLFsuHzSz+FA2EI=; b=AKV6hgf/Ya03nilV8ZpElMpINDFcRG9hyb6OO5pGWfxVk/VcR/H4mLrJTDI7tvGw/Y 5TC+TyIRarwCArw/VqdimssnCawU6ovFgB+iI1q1jtCqohrsiNSiFj+ub1n9QAS35+o3 4h/HNzDb3vsSiPaJhdUB2LkWhO9s49jwf1gJzp21I7ndJio6rBeEKxUv97SV2fp0uOBb vlW26mJYKY457jIFwTpFYO7ak/RSZpdxrsmS08NFKQlVgC2DfWhlvWDy72KGgy6bxGz6 +qkWTJ+fJ2Y0vaJ5AlehWc5IGkOh4Ym1MQL2J2oUeaCNOVVQx2mOOwiKpTCPy77bE2zA In8A== X-Gm-Message-State: AGi0Pua7DlFNYoCUjVVxCDrG4zx3q26rBMrdaLZ7nQ9bQLhLJ1CBa1Kr 5oRQFv+zVnnB5EKsat6WAEaoll/aZCTkQvgAYw== X-Received: by 2002:a92:bf06:: with SMTP id z6mr16608400ilh.191.1589225698562; Mon, 11 May 2020 12:34:58 -0700 (PDT) MIME-Version: 1.0 References: <20200504230309.237398-1-ndesaulniers@google.com> In-Reply-To: From: Brian Gerst Date: Mon, 11 May 2020 15:34:47 -0400 Message-ID: Subject: Re: [PATCH] x86: support i386 with Clang To: Nick Desaulniers Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , David Woodhouse , Arnd Bergmann , Linus Torvalds , 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 2:46 PM Nick Desaulniers wrote: > > On Mon, May 11, 2020 at 11:09 AM Brian Gerst wrote: > > This looks like the same issue that we just discussed for bitops.h. > > Add the "b" operand size modifier to force it to use the 8-bit > > register names (and probably also needs the "w" modifier in the 16-bit > > case). > > While it does feel familiar, it is slightly different. > https://godbolt.org/z/Rme4Zg > That case was both compilers validating the inline asm, yet generating > assembly that the assembler would choke on. This case is validation > in the front end failing. > long long ret; > switch (sizeof(ret)) { > case 1: > asm ("movb $5, %0" : "=q" (ret)); > break; > case 8:; > } So if the issue here is that the output variable type is long long, what code is using a 64-bit percpu variable on a 32-bit kernel? Can you give a specific file that fails to build with Clang? If Clang is choking on it it may be silently miscompiling on GCC. -- Brian Gerst