Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2099539ybk; Mon, 11 May 2020 11:54:26 -0700 (PDT) X-Google-Smtp-Source: APiQypLvGa3gSP6XR0JhghKPJOPNizQ0zfUlTdU/vf0rahquBL7rnc/ryZvpyYk+vBgjqmTcDFdW X-Received: by 2002:a17:907:2708:: with SMTP id w8mr8555855ejk.326.1589223266297; Mon, 11 May 2020 11:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589223266; cv=none; d=google.com; s=arc-20160816; b=ynrM+Uxr5r3hkyuZL4FbmLfVr6EWRV2PyqDWDigp+v447P2u8wEnos4MKKzR4fMRMa 2wENOdiiwTsmfZEhWsa5QtE8WbGmTyQcWqXnaYsYwheVJNm4AaFg8OPsWVWHBL71T0S1 cnLwA124+Cl8GzV65wtjD3kPUPVgO2Qy90e6hYVzw3+SjmmZSS2xv/OByprJ76u2qz7z E+LpmvRLKbVUNNtWv9gxG2RgS7DZI/seN9byvNWL+iHqrWLAusUcajytYI6ewjK+IhAM 5x6Y+W8Xai2BHhW5rrIQ5sP441xtoTj3Aq0Eaii1wBgBr7NbZCql94p8O2qho1CAMCZK QnfA== 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=YTCOmg8Lu45FSlE0YEbxP+MF1nPzk5IAZBv8bJFRLRw=; b=zjvl/X7n0ncdmZWWLq4Bt7i2Gq0F351lYaSmJ0Qjfj4P9MaiMpqaZ+8ieH6nvNvJ/a IRpon516qutmqn7p+74v65UKcmuh9t3EDz8A+1qP9o3pGzoEv1WiEyjUhXZOkCj7z33L bkSx2UQljvceVPI8yO6wziQ6SQircCSKFpmm5PFG+BhYzg4MvMG3NfIHuvl2O2ZU20Nk QzC/6qHPoE/oWUYVcLK78ncblUYtRWfi0JWLSzU6xQxJkxFihxWWNfQmbf2+9e0CYRSr sFrkzSwZGvroo4KBVciYZa91gvUm1F6D0xx/NxD2xoNOYU4P4TiqItFeEsyuzZrIpdYl REOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vbBEkmgS; 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 se12si5203638ejb.86.2020.05.11.11.54.02; Mon, 11 May 2020 11:54:26 -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=vbBEkmgS; 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 S1731218AbgEKSwc (ORCPT + 99 others); Mon, 11 May 2020 14:52:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731198AbgEKSw3 (ORCPT ); Mon, 11 May 2020 14:52:29 -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 9A3A5C061A0E for ; Mon, 11 May 2020 11:52:29 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id b71so2827189ilg.8 for ; Mon, 11 May 2020 11:52:29 -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=YTCOmg8Lu45FSlE0YEbxP+MF1nPzk5IAZBv8bJFRLRw=; b=vbBEkmgSK85oY+vxRZC1osCwudndVFKMCeTNym/mh2sSWP5BuafaU/fqMM4tyMzYSJ vFf7KCghS35C/3+K1U2N/9qnLeXU74a6qoekCaZKzAiKgZZDLOLvFVEu6Zi1wF0QU8e/ WeC4QziV41rhxCXWuudTiGCwGuPuRGbCG6x5Zjf98rHK2s1LKL5FFf4i0jkrKf55ulJU iAQY2COLLuULM7sV6EkAV91tk9nPKtLwsKOid77BRlE8Qy+XJsH/k1xUcl0TkfpXD0pb 07JQGAyX02YIzQew2l/Dopaaxz5Nhj7iq2lHnXqQeOueVvnxLReV96/o4NIptmgbLM6M 18Rw== 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=YTCOmg8Lu45FSlE0YEbxP+MF1nPzk5IAZBv8bJFRLRw=; b=rQJhftd1JgFofpb6WNp6I1pYUiicrFDNxxI19J3gadL+175ZK5seUcCE4nqKnI4Kxl UdkcwNjjIzWq3V6NLRVQ6lWh/hixJbEhQZLTN3304bKFXcZ9iuqIyyzbce9+Etn4Huzz TXhyKvFQy7mIzsd+pXyPj7o3AaxrYCUphOKLzKoDLLK36a83XxEItewEu5thdIbvDRwc e22/IO1tNmFXAd4WhrVfZKokQw+VnDp3IMD0tykwwABLYDGfk1jPXsJ3yYR9VQAwWXVf AWCtMBBkTWmRLqMQReKZTOTMkKO+kYEvOcyZqwx0BSv6Ai5UqNOavBSH2ADDplFqEJuz Es7Q== X-Gm-Message-State: AGi0PuYqBof4QC5CvNyrTwHOdObRyoDFgb0qULRj36e/3RaabpuXUPx/ y9goiCIjpQ1lH8bOEXsouxxTSRn1VzKpftN0KQ== X-Received: by 2002:a05:6e02:5a3:: with SMTP id k3mr11399870ils.11.1589223148150; Mon, 11 May 2020 11:52:28 -0700 (PDT) MIME-Version: 1.0 References: <20200508182835.228107-1-ndesaulniers@google.com> <20200508183230.229464-1-ndesaulniers@google.com> In-Reply-To: <20200508183230.229464-1-ndesaulniers@google.com> From: Brian Gerst Date: Mon, 11 May 2020 14:52:16 -0400 Message-ID: Subject: Re: [PATCH v5] x86: bitops: fix build regression To: Nick Desaulniers Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Jesse Brandeburg , Sedat Dilek , "kernelci . org bot" , Andy Shevchenko , "H . Peter Anvin" , Ilie Halip , "the arch/x86 maintainers" , Marco Elver , "Paul E. McKenney" , Andrey Ryabinin , Luc Van Oostenryck , Andrew Morton , Masahiro Yamada , Daniel Axtens , "Peter Zijlstra (Intel)" , Linux Kernel Mailing List , 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 Fri, May 8, 2020 at 2:32 PM Nick Desaulniers wrote: > > This is easily reproducible via CC=clang+CONFIG_STAGING=y+CONFIG_VT6656=m. > > It turns out that if your config tickles __builtin_constant_p via > differences in choices to inline or not, these statements produce > invalid assembly: > > $ cat foo.c > long a(long b, long c) { > asm("orb\t%1, %0" : "+q"(c): "r"(b)); > return c; > } > $ gcc foo.c > foo.c: Assembler messages: > foo.c:2: Error: `%rax' not allowed with `orb' > > Use the `%b` "x86 Operand Modifier" to instead force register allocation > to select a lower-8-bit GPR operand. > > The "q" constraint only has meaning on -m32 otherwise is treated as > "r". Not all GPRs have low-8-bit aliases for -m32. > > Cc: Jesse Brandeburg > Link: https://github.com/ClangBuiltLinux/linux/issues/961 > Link: https://lore.kernel.org/lkml/20200504193524.GA221287@google.com/ > Link: https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#x86Operandmodifiers > Fixes: 1651e700664b4 ("x86: Fix bitops.h warning with a moved cast") > Reported-by: Sedat Dilek > Reported-by: kernelci.org bot > Suggested-by: Andy Shevchenko > Suggested-by: Brian Gerst > Suggested-by: H. Peter Anvin > Suggested-by: Ilie Halip > Signed-off-by: Nick Desaulniers Reviewed-By: Brian Gerst