public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant
@ 2022-05-15 7:10 judge.packham at gmail dot com
2022-05-15 7:21 ` [Bug target/105607] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-15 7:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
Bug ID: 105607
Summary: sh-unknown-elf: Error: opcode not valid for this cpu
variant
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: judge.packham at gmail dot com
Target Milestone: ---
I'm in the process of adding GCC 12.1.0 to crosstool-ng. When building for
sh-unknown-elf we see the following errors building libgcc
[ALL ]
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/build/build-cc-gcc-core/./gcc/xgcc
-B/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/build/build-cc-gcc-core/./gcc/
-B/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/sh-unknown-elf/bin/
-B/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/sh-unknown-elf/lib/
-isystem
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/sh-unknown-elf/include
-isystem
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/sh-unknown-elf/sys-include
-g -O2 -idirafter
/home/runner/work/crosstool-ng/crosstool-ng/x-tools/sh-unknown-elf/sh-unknown-elf/include
-g -Os -mb -m1 -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -g
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I.
-I../../../.././gcc
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/.
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/../gcc
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/../include
-DHAVE_CC_TLS -o _movmem_i4_s.o -MT _movmem_i4_s.o -MD -MP -MF
_movmem_i4_s.dep -DSHARED -DL_movmem_i4 -xassembler-with-cpp -c
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/config/sh/lib1funcs.S
[ALL ]
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/config/sh/lib1funcs.S:
Assembler messages:
[ERROR]
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/config/sh/lib1funcs.S:933:
Error: opcode not valid for this cpu variant
[ERROR]
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/config/sh/lib1funcs.S:935:
Error: opcode not valid for this cpu variant
[ERROR]
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/config/sh/lib1funcs.S:942:
Error: opcode not valid for this cpu variant
[ERROR]
/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/libgcc/config/sh/lib1funcs.S:944:
Error: opcode not valid for this cpu variant
[ERROR] make[4]: *** [Makefile:491: _movmem_i4_s.o] Error 1
The same configuration/build recipe successfully builds GCC 11.3.0
The assembly that is being complained about is
931 L_movmem_loop:
932 mov.l r3,@(12,r4)
933 dt r6
934 mov.l @r5+,r0
935 bt/s L_movmem_2mod4_end
936 mov.l @r5+,r1
937 add #16,r4
938 L_movmem_start_even:
939 mov.l @r5+,r2
940 mov.l @r5+,r3
941 mov.l r0,@r4
942 dt r6
943 mov.l r1,@(4,r4)
944 bf/s L_movmem_loop
945 mov.l r2,@(8,r4)
946 rts
947 mov.l r3,@(12,r4)
The code in question hasn't changed in many years so I assume it's something to
do with GCC passing the CPU information to gas
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
@ 2022-05-15 7:21 ` pinskia at gcc dot gnu.org
2022-05-15 7:34 ` judge.packham at gmail dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-15 7:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>The same configuration/build recipe successfully builds GCC 11.3.0
Did you change binutils too or they kept the same?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
2022-05-15 7:21 ` [Bug target/105607] " pinskia at gcc dot gnu.org
@ 2022-05-15 7:34 ` judge.packham at gmail dot com
2022-05-15 8:42 ` judge.packham at gmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-15 7:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #2 from Chris Packham <judge.packham at gmail dot com> ---
binutils is the same but I did update the kernel headers.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
2022-05-15 7:21 ` [Bug target/105607] " pinskia at gcc dot gnu.org
2022-05-15 7:34 ` judge.packham at gmail dot com
@ 2022-05-15 8:42 ` judge.packham at gmail dot com
2022-05-15 8:49 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-15 8:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #3 from Chris Packham <judge.packham at gmail dot com> ---
Just blindly comparing log files between a good and a bad build the `-mb -m1`
combination appears to be new and is the one causing problems.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (2 preceding siblings ...)
2022-05-15 8:42 ` judge.packham at gmail dot com
@ 2022-05-15 8:49 ` pinskia at gcc dot gnu.org
2022-05-15 8:56 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-15 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the exact configure options you used?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (3 preceding siblings ...)
2022-05-15 8:49 ` pinskia at gcc dot gnu.org
@ 2022-05-15 8:56 ` pinskia at gcc dot gnu.org
2022-05-15 8:58 ` judge.packham at gmail dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-15 8:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The only change I have saw to the sh specific files which would affect was in
t-linux but that would be linux only, this is elf.
r12-6929-g06995c2958aaae
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (4 preceding siblings ...)
2022-05-15 8:56 ` pinskia at gcc dot gnu.org
@ 2022-05-15 8:58 ` judge.packham at gmail dot com
2022-05-15 9:17 ` judge.packham at gmail dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-15 8:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #6 from Chris Packham <judge.packham at gmail dot com> ---
Here's the relevant snippet from the log.
CC_FOR_BUILD='x86_64-build_pc-linux-gnu-gcc' CFLAGS='-O2 -g
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/include
' CFLAGS_FOR_BUILD='-O2 -g
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/include
' CXXFLAGS='-O2 -g
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/include
' CXXFLAGS_FOR_BUILD='-O2 -g
-I/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/include
'
LDFLAGS='-L/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools/lib
' CFLAGS_FOR_TARGET='-g -O2 -idirafter
/home/runner/work/crosstool-ng/crosstool-ng/x-tools/sh-unknown-elf/sh-unknown-elf/include'
CXXFLAGS_FOR_TARGET='-g -O2 -idirafter
/home/runner/work/crosstool-ng/crosstool-ng/x-tools/sh-unknown-elf/sh-unknown-elf/include'
LDFLAGS_FOR_TARGET=' -static' '/usr/bin/bash'
'/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/src/gcc/configure'
'--build=x86_64-build_pc-linux-gnu' '--host=x86_64-build_pc-linux-gnu'
'--target=sh-unknown-elf'
'--prefix=/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools'
'--exec_prefix=/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools'
'--with-local-prefix=/home/runner/work/crosstool-ng/crosstool-ng/x-tools/sh-unknown-elf/sh-unknown-elf'
'--without-headers' '--with-newlib' '--enable-threads=no' '--disable-shared'
'--with-endian=little,big' '--with-pkgversion=crosstool-NG UNKNOWN'
'--enable-__cxa_atexit' '--disable-libgomp' '--disable-libmudflap'
'--disable-libmpx' '--disable-libssp' '--disable-libquadmath'
'--disable-libquadmath-support' '--disable-libstdcxx-verbose'
'--disable-libstdcxx'
'--with-gmp=/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools'
'--with-mpfr=/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools'
'--with-mpc=/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools'
'--with-isl=/home/runner/work/crosstool-ng/crosstool-ng/.build/sh-unknown-elf/buildtools'
'--enable-lto' '--enable-target-optspace' '--disable-nls' '--enable-multiarch'
'--enable-languages=c'
incidentally if anyone wants the full log it's downloadable from
https://github.com/crosstool-ng/crosstool-ng/suites/6509540897/artifacts/242118465
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (5 preceding siblings ...)
2022-05-15 8:58 ` judge.packham at gmail dot com
@ 2022-05-15 9:17 ` judge.packham at gmail dot com
2022-05-15 9:29 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-15 9:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #7 from Chris Packham <judge.packham at gmail dot com> ---
There's also
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=081c9dfb67a0d2e7425ddb5420ada588026f92ca
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (6 preceding siblings ...)
2022-05-15 9:17 ` judge.packham at gmail dot com
@ 2022-05-15 9:29 ` pinskia at gcc dot gnu.org
2022-05-15 10:00 ` judge.packham at gmail dot com
2022-05-30 6:57 ` judge.packham at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-15 9:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Chris Packham from comment #7)
> There's also
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;
> h=081c9dfb67a0d2e7425ddb5420ada588026f92ca
That should not have an effect on the multi-libs compiled for.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (7 preceding siblings ...)
2022-05-15 9:29 ` pinskia at gcc dot gnu.org
@ 2022-05-15 10:00 ` judge.packham at gmail dot com
2022-05-30 6:57 ` judge.packham at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-15 10:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #9 from Chris Packham <judge.packham at gmail dot com> ---
(In reply to Andrew Pinski from comment #8)
> (In reply to Chris Packham from comment #7)
> > There's also
> > https://gcc.gnu.org/git/?p=gcc.git;a=commit;
> > h=081c9dfb67a0d2e7425ddb5420ada588026f92ca
>
> That should not have an effect on the multi-libs compiled for.
Indeed. I reverting it with no change.
I don't know anything about the SH architecture so I can't say if -mb -m1 is a
valid combination. But under GCC 11.3.0 it isn't in the default multilib list
but somehow it is under GCC 12.1.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/105607] sh-unknown-elf: Error: opcode not valid for this cpu variant
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
` (8 preceding siblings ...)
2022-05-15 10:00 ` judge.packham at gmail dot com
@ 2022-05-30 6:57 ` judge.packham at gmail dot com
9 siblings, 0 replies; 11+ messages in thread
From: judge.packham at gmail dot com @ 2022-05-30 6:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105607
--- Comment #10 from Chris Packham <judge.packham at gmail dot com> ---
I don't know if it helps at all but it looks like we actually noticed the
difference between GCC 10 and GCC 11. The workaround we have in ct-ng was GCC
11 specific.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-05-30 6:57 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-15 7:10 [Bug libgcc/105607] New: sh-unknown-elf: Error: opcode not valid for this cpu variant judge.packham at gmail dot com
2022-05-15 7:21 ` [Bug target/105607] " pinskia at gcc dot gnu.org
2022-05-15 7:34 ` judge.packham at gmail dot com
2022-05-15 8:42 ` judge.packham at gmail dot com
2022-05-15 8:49 ` pinskia at gcc dot gnu.org
2022-05-15 8:56 ` pinskia at gcc dot gnu.org
2022-05-15 8:58 ` judge.packham at gmail dot com
2022-05-15 9:17 ` judge.packham at gmail dot com
2022-05-15 9:29 ` pinskia at gcc dot gnu.org
2022-05-15 10:00 ` judge.packham at gmail dot com
2022-05-30 6:57 ` judge.packham at gmail dot com
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 read-only IMAP folder(s) and NNTP newsgroup(s).