[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVbZtnOMsc0p84bTX5RJXeYN-hcW4=W0En04nf_b1WKGw@mail.gmail.com>
Date: Mon, 26 Jul 2021 09:29:10 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andreas Schwab <schwab@...ux-m68k.org>
Cc: Greg Ungerer <gerg@...inux.org>, Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Boqun Feng <boqun.feng@...il.com>,
Brendan Jackman <jackmanb@...gle.com>,
kernel test robot <lkp@...el.com>,
Arnd Bergmann <arnd@...db.de>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] m68k: Fix asm register constraints for atomic ops
Hi Andreas,
On Sun, Jul 25, 2021 at 4:24 PM Andreas Schwab <schwab@...ux-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@...ux-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
Powered by blists - more mailing lists