Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3303594pxv; Mon, 26 Jul 2021 00:31:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDLJ1Bg7hlTrHZrNk/CFOPWwbl3sJBL4zzwx8RNf2ErI9IrG3IAlH+m22d6tNz5ARjjvPB X-Received: by 2002:a5d:91cc:: with SMTP id k12mr13696237ior.103.1627284676318; Mon, 26 Jul 2021 00:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627284676; cv=none; d=google.com; s=arc-20160816; b=CSxHU8c6Md+TCP3ZDSg5BqI2Ia4T8BZjkGiHzRO7mAlwhbxFnjS75YoEBv+lhX4vOr iFieaCQmf7Hymhz7OKSLaKTMjw/8FBmFC0ZdXLwNUa5HoO+MrqY4AYKQq6ztq0GDuB// qLKEhP2Xy9aH3s5wDbLxcYX8Hhc7snf1Ot8QnbBkTW0Qk3oBv8G3ad30cm5IzbYQ6lpJ 1ficLopa9uARURdiORf+EWy/hws2rdTlvwEpvd1bl+soOgAIefjKe2esbe4j91tdxaZK 7FHWV/AOX5pduPXivqlaoPA0CrmuboUAZSGRWtEx6U2qymsKWiyl2fidqnpNLu50PQ1G a3YA== 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; bh=NG27AyXXZCjyF9qPFwESDtcNxflCSnT0u4Wh1DD8tKI=; b=D/7WNONqruZ+Oa0k0bLnSoTRXEreQiuaY5eJ5nPtdIZ3vF/GRpORYNrQIXBzrQArgw 9zXA4iEMSRNUkQp5xvkpgTF4yra+HFYhhBQw8qorW1yhmq0ONuDcQg/h2kbxTMFnt0CL HKTPToGUHZNjyQqQBeMRV14J00faXrgV+J/fLFwiQ78QM2aSGmmwYXSIFA/obSkzDv88 Q0cNSw4sFA+FcIwzXWcJlGy6/giQcXUDDeaq8V37KDrG+rXzlyHWu7HLhpbdiXKiz6lL /CWAdtqsmC3z57ppwtVSY+2n+U82fgUGUPsH0KcQnJSeLxa/sOfJrw2EFbCmNVe+sOJz lyhQ== ARC-Authentication-Results: i=1; mx.google.com; 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 d18si41438217ilo.140.2021.07.26.00.31.04; Mon, 26 Jul 2021 00:31:16 -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; 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 S231728AbhGZGsx (ORCPT + 99 others); Mon, 26 Jul 2021 02:48:53 -0400 Received: from mail-ua1-f46.google.com ([209.85.222.46]:37768 "EHLO mail-ua1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbhGZGsw (ORCPT ); Mon, 26 Jul 2021 02:48:52 -0400 Received: by mail-ua1-f46.google.com with SMTP id w11so3190505uar.4 for ; Mon, 26 Jul 2021 00:29:21 -0700 (PDT) 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=NG27AyXXZCjyF9qPFwESDtcNxflCSnT0u4Wh1DD8tKI=; b=WB7HK/3b5iwhkFEPtgHKIxRD9fUqveHGRHsk8D7kFJok3FUnETILrALdJXPXDsl3Rf X3aVEcrr+VUGqwqCGJjERChGiV6uadUqd73cxVCP9xzkvQgCD5I6FYoiJIN6HR41wHAZ SGqKIvQqqPKqHO+o07YiJlJ2Wxzd327VSHvFSZFoCEMrQqI9ogUGfD4XQyFDGky02j6b gn1ADOF73qiJnFoDEWLybDlJNhlszjFlZgyK8tPRdzvL/tPu446YyLiUHw1jbix/VPAA 9F+RTHVWgbIQEhfVOk+xh5ildKCa/859fqEZpB7jNMCV3B6WwBP2speta+Nskygk3zVx ZSXA== X-Gm-Message-State: AOAM5314c1s2SPDm27xICQCJ0dIfDNcoQYZIG0A5n+L2Wv/aWWkb7u/I q0DWW0mZ3eEkGoJCEXYZR6vrLiuPJ/7OHS0dJQ0= X-Received: by 2002:ab0:6710:: with SMTP id q16mr11373970uam.106.1627284561331; Mon, 26 Jul 2021 00:29:21 -0700 (PDT) MIME-Version: 1.0 References: <20210725104618.365790-1-geert@linux-m68k.org> <87r1fm4gkc.fsf@igel.home> In-Reply-To: <87r1fm4gkc.fsf@igel.home> From: Geert Uytterhoeven Date: Mon, 26 Jul 2021 09:29:10 +0200 Message-ID: Subject: Re: [PATCH] m68k: Fix asm register constraints for atomic ops To: Andreas Schwab Cc: Greg Ungerer , Will Deacon , Peter Zijlstra , Boqun Feng , Brendan Jackman , kernel test robot , Arnd Bergmann , Alexander Viro , linux-m68k , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andreas, On Sun, Jul 25, 2021 at 4:24 PM Andreas Schwab wrote: > On Jul 25 2021, Geert Uytterhoeven wrote: > > Depending on register assignment by the compiler: > > > > {standard input}:3084: Error: operands mismatch -- statement `andl %a1,%d1' ignored > > {standard input}:3145: Error: operands mismatch -- statement `orl %a1,%d1' ignored > > {standard input}:3195: Error: operands mismatch -- statement `eorl %a1,%d1' ignored > > > > Indeed, the first operand must not be an address register. Fix this by > > adjusting the register constraint from "g" (general purpose register) to > > "d" (data register). > > You should also allow immediate ("i"). Good point. > There is the ASM_DI macro for that, but since CONFIG_RMW_INSNS is never > defined for CONFIG_COLDFIRE, it probably doesn't matter. As the second operand is a register, not memory, there is no need to use ASM_DI, and "di" should be fine, right? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds