Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp487592ybk; Sat, 9 May 2020 08:45:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKe9ely8YplyHUEa+a9Z5eDjRjt2IvQQXOsbY1hOYCMERuMDIA+54NzJAWcCiT2GpX6KAMk X-Received: by 2002:a17:906:a44f:: with SMTP id cb15mr480451ejb.219.1589039133782; Sat, 09 May 2020 08:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589039133; cv=none; d=google.com; s=arc-20160816; b=IOB3E60zKvp5pWQFBlJbYCJDt3D8H8cPWc23fpX8/it89Ln0kHz3cy++UcEbDjgpMk YFKVOOvZuX1qyK4S/HWPPCha+81zY868g1fmQcVExgBZrAwa9P1RiNcSeCYldU3jfFeh ea9VdPSp7acIUtboAped3Gfl+DrKI1X//FJeASewfuOmtEEzmWty/HXRpUwgtR33ptWd io7eP2/YLHVToSnv+9DsoAffa4Sna2k5FGg7Sy7I4K/W5qOSLJ9HJHXjVd9dl/azBI1C xwDbTXjqovoWc60mVe1nd/mEyDj0IAdOKzeRmNt2aZeVHklckG/BchNaWMnbF7I8G/uR dYHA== 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=lEIOZtiJn4C44cp9H/kzfk5fMu6jd8Gvk2kf7XAUT3o=; b=QAkW1S3EKOda19Nyv/jV1XXcmlqvsxwConGz2FbHk2AbmvkBSvZUC6rLP+7T2dYYtw 5HwiRsa/3BpeGk6QH7hx0iT16uTjkVA84egUQT+1OgTqnrYw/hFyDftZRstjQlCqA/o2 fFSxKWICKVV6180BjcDwaKL6RxvNfGkk2BLpgzlP75zshzFmKGVl0OUL1Qu1pfx236ww iGqN0kA91kzs0srcsqyl9ux6E/amIgkK7cMQobOd4MhRKE7ADxarw2xbM4vTcL097jGJ 2wcEXuFsOlbLevq7nnNaQkkgPGmZxJZTtjRznvinMjOJsMnAK6nszanNGz0K8yqRe+gw Gd4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UGwdlqQA; 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 v17si2829988edx.158.2020.05.09.08.45.08; Sat, 09 May 2020 08:45:33 -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=UGwdlqQA; 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 S1727863AbgEIPnm (ORCPT + 99 others); Sat, 9 May 2020 11:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726782AbgEIPnm (ORCPT ); Sat, 9 May 2020 11:43:42 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3FB3C061A0C for ; Sat, 9 May 2020 08:43:40 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id c18so4298489ile.5 for ; Sat, 09 May 2020 08:43:40 -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=lEIOZtiJn4C44cp9H/kzfk5fMu6jd8Gvk2kf7XAUT3o=; b=UGwdlqQA3m+b9Wg6a49Hwx3fQgTFQhq1p4ImuMAB3MkbEBgWLZCNgiIRyWo0tpu6b/ I58M7mVzZghIs2YX1R+4zzdlAbwX1PY+EgyhRod8ZGZ3WPjOIi2/4/z3wOeJX/Sknh2m BNoLrk7wkAJSPf7V12qgSlPYMnhUPsKE8VaZRLUwcfe82imr57du6Bo5OrYtCvZ0/mij tIdI29U2pXmU9YpO2syHa9NVu6Qoi0lBJ5x9kokdAm8A0RiZGt1mvkNsEdRTGNoOri2I 2GHJyN4e3utPl2fYrJz5KgkXXYUd959OZ6c1imW2tC4ko5cJ3+mFDlhQ6CpMOn/TYR0X H0BA== 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=lEIOZtiJn4C44cp9H/kzfk5fMu6jd8Gvk2kf7XAUT3o=; b=MVEAyFyAwa8fQIMJdtguS6hYGyojJU4YGAm+S00xBFAfgREIJ+HX1oJ3WrIRjHgdBz Dyy8Vqf1QnGvsgNG070zU8XXBOnV+gW/hROXC9UCZl/Ik2pddBKf4Erqo634CDubOtr3 FCG2fjzr+t0tuOhFz+edo5sTJfOgAa6ojq0Eu6E8AgZ+Vw7BNPsSQQzncRBY4z+bOsHI HuTmIrvGtfGIFTY5D9TpL8Bpcr4x5PfFozC4rzZGcaSOvg4tDLbjieBaoX0pFma2lg9K OZqd/qzcUBeQJ1Cv6HuOhl+CLrN/Wh3X22tQsXL/jIOClUQfUOAaHAYFA/458D7fTg2r c+QA== X-Gm-Message-State: AGi0PuYiHLRTdVxRb0sOANJZKA0lamCZDNTaaXF4nz+JlUHx/xBq1Hxy qXSfUpg2YOqi8RiH9JyqwtuPPQzMo3o8/FZ2Sw== X-Received: by 2002:a05:6e02:d0c:: with SMTP id g12mr7913391ilj.27.1589039019986; Sat, 09 May 2020 08:43:39 -0700 (PDT) MIME-Version: 1.0 References: <20200508182835.228107-1-ndesaulniers@google.com> <20200508183230.229464-1-ndesaulniers@google.com> In-Reply-To: From: Brian Gerst Date: Sat, 9 May 2020 11:43:27 -0400 Message-ID: Subject: Re: [PATCH v5] x86: bitops: fix build regression To: Andy Shevchenko Cc: Nick Desaulniers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Jesse Brandeburg , Sedat Dilek , "kernelci . org bot" , Andy Shevchenko , "H . Peter Anvin" , Ilie Halip , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , 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 Sat, May 9, 2020 at 8:20 AM Andy Shevchenko wrote: > > On Fri, May 8, 2020 at 9:35 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. > > > > Looks very good! > One question though, does it work with minimum supported version of gcc? Yes. The operand width modifiers have been around a long time but not well documented until more recently. -- Brian Gerst