From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Subject: Build issue "Error: operands mismatch -- statement `movec %d2,%caar' ignored" on m68k
Date: Sun, 29 Dec 2024 13:48:48 +0100 [thread overview]
Message-ID: <20241229134848.0a1d9719@windsurf> (raw)
Hello,
While trying to build the multi_defconfig, from Linux 6.12.5, for a
68040 system, the build fails with:
{standard input}: Assembler messages:
{standard input}:104: Error: operands mismatch -- statement `movec %d2,%caar' ignored
make[5]: *** [scripts/Makefile.build:229: arch/m68k/kernel/sys_m68k.o] Error 1
It seems like the 68020/68030 code:
if (CPU_IS_020_OR_030) {
if (scope == FLUSH_SCOPE_LINE && len < 256) {
unsigned long cacr;
__asm__ ("movec %%cacr, %0" : "=r" (cacr));
if (cache & FLUSH_CACHE_INSN)
cacr |= 4;
if (cache & FLUSH_CACHE_DATA)
cacr |= 0x400;
len >>= 2;
while (len--) {
__asm__ __volatile__ ("movec %1, %%caar\n\t"
"movec %0, %%cacr"
: /* no outputs */
: "r" (cacr), "r" (addr));
addr += 4;
}
} else {
/* Flush the whole cache, even if page granularity requested. */
unsigned long cacr;
__asm__ ("movec %%cacr, %0" : "=r" (cacr));
if (cache & FLUSH_CACHE_INSN)
cacr |= 8;
if (cache & FLUSH_CACHE_DATA)
cacr |= 0x800;
__asm__ __volatile__ ("movec %0, %%cacr" : : "r" (cacr));
}
ret = 0;
goto out_unlock;
gets compiled in, and binutils isn't happy about it.
The issue can trivially be reproduced by building the following
Buildroot configuration:
BR2_m68k=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
Quick recipe:
$ git clone https://gitlab.com/buildroot.org/buildroot.git
$ cd buildroot/
$ cat >.config <<EOF
BR2_m68k=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
EOF
$ make olddefconfig
$ make
Is this expected?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
next reply other threads:[~2024-12-29 12:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-29 12:48 Thomas Petazzoni [this message]
2024-12-29 14:23 ` Build issue "Error: operands mismatch -- statement `movec %d2,%caar' ignored" on m68k Geert Uytterhoeven
2024-12-30 8:30 ` Finn Thain
2024-12-30 8:53 ` Geert Uytterhoeven
2024-12-30 9:35 ` Thomas Petazzoni
2024-12-30 9:57 ` Geert Uytterhoeven
2024-12-30 11:22 ` Andreas Schwab
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=20241229134848.0a1d9719@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.