linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Greg Ungerer <gerg@uclinux.org>, Will Deacon <will@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Brendan Jackman <jackmanb@google.com>,
	kernel test robot <lkp@intel.com>, Arnd Bergmann <arnd@arndb.de>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] m68k: Fix asm register constraints for atomic ops
Date: Mon, 26 Jul 2021 09:29:10 +0200	[thread overview]
Message-ID: <CAMuHMdVbZtnOMsc0p84bTX5RJXeYN-hcW4=W0En04nf_b1WKGw@mail.gmail.com> (raw)
In-Reply-To: <87r1fm4gkc.fsf@igel.home>

Hi Andreas,

On Sun, Jul 25, 2021 at 4:24 PM Andreas Schwab <schwab@linux-m68k.org> 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

  reply	other threads:[~2021-07-26  7:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-25 10:46 [PATCH] m68k: Fix asm register constraints for atomic ops Geert Uytterhoeven
2021-07-25 14:24 ` Andreas Schwab
2021-07-26  7:29   ` Geert Uytterhoeven [this message]
2021-07-25 15:26 ` Arnd Bergmann
2021-07-25 23:44 ` Finn Thain
2021-07-26  7:34   ` Geert Uytterhoeven
2021-07-26  7:39     ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdVbZtnOMsc0p84bTX5RJXeYN-hcW4=W0En04nf_b1WKGw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=gerg@uclinux.org \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=lkp@intel.com \
    --cc=peterz@infradead.org \
    --cc=schwab@linux-m68k.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).