public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/104673] New: powerpc e500mc Error: unrecognized opcode: `isel'
@ 2022-02-24  8:58 judge.packham at gmail dot com
  2022-02-24  9:18 ` [Bug target/104673] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: judge.packham at gmail dot com @ 2022-02-24  8:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104673

            Bug ID: 104673
           Summary: powerpc e500mc Error: unrecognized opcode: `isel'
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: judge.packham at gmail dot com
  Target Milestone: ---

Created attachment 52503
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52503&action=edit
assembly file emitted by GCC

When building for powerpc with -mcpu=e500mc the generated assembly includes a
".machine ppc" directive which causes gas to ignore the command line -me500mc
flag. This means that it decides any e500mc specific instructions are invalid.

Attached is the generated assembly from a build with gcc 11.2 cross-compiled
for powerpc. As you can see the .machine directive says ppc but when gas sees
this it will reset it's internal state and decide the isel instruction is
invalid.

I think this might be an regression from
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2d94f7dea9.

GCC only seems to have a limited set of machines it will emit which don't match
with what binutils uses.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/104673] powerpc e500mc Error: unrecognized opcode: `isel'
  2022-02-24  8:58 [Bug c/104673] New: powerpc e500mc Error: unrecognized opcode: `isel' judge.packham at gmail dot com
@ 2022-02-24  9:18 ` pinskia at gcc dot gnu.org
  2022-02-25  3:22 ` judge.packham at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-24  9:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104673

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
How did you configure GCC? How did you invoke GCC?
Can you attach the preprocessed source rather than the generated assembly code?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/104673] powerpc e500mc Error: unrecognized opcode: `isel'
  2022-02-24  8:58 [Bug c/104673] New: powerpc e500mc Error: unrecognized opcode: `isel' judge.packham at gmail dot com
  2022-02-24  9:18 ` [Bug target/104673] " pinskia at gcc dot gnu.org
@ 2022-02-25  3:22 ` judge.packham at gmail dot com
  2022-02-25  3:24 ` judge.packham at gmail dot com
  2022-02-25  8:00 ` judge.packham at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: judge.packham at gmail dot com @ 2022-02-25  3:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104673

--- Comment #2 from Chris Packham <judge.packham at gmail dot com> ---
GCC configure line is

$ /home/ctng/crosstool-ng/.build/powerpc-unknown-linux-gnu/src/gcc/configure
--build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
--target=powerpc-unknown-linux-gnu
--prefix=/home/ctng/x-tools/powerpc-unknown-linux-gnu
--exec_prefix=/home/ctng/x-tools/powerpc-unknown-linux-gnu
--with-sysroot=/home/ctng/x-tools/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot
--enable-languages=c,c++ --with-cpu=e500mc --with-pkgversion=crosstool-NG
1.24.0.548_0e1989a --enable-__cxa_atexit --disable-libmudflap --disable-libgomp
--disable-libssp --disable-libquadmath --disable-libquadmath-support
--disable-libsanitizer --disable-libmpx --disable-libstdcxx-verbose
--with-gmp=/home/ctng/crosstool-ng/.build/powerpc-unknown-linux-gnu/buildtools
--with-mpfr=/home/ctng/crosstool-ng/.build/powerpc-unknown-linux-gnu/buildtools
--with-mpc=/home/ctng/crosstool-ng/.build/powerpc-unknown-linux-gnu/buildtools
--with-isl=/home/ctng/crosstool-ng/.build/powerpc-unknown-linux-gnu/buildtools
--enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin
--disable-nls --disable-multilib
--with-local-prefix=/home/ctng/x-tools/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot
--enable-long-long

Invocation is

$ powerpc-unknown-linux-gnu-gcc -mcpu=e500mc -O2 -c testcase.c -S -o testcase.S

The original error occurred when building glibc. I've yet to produce a testcase
that triggers gcc to emit the isel instruction but you can see the .machine
directive doesn't match up with -mcpu or what gets passed to gas.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/104673] powerpc e500mc Error: unrecognized opcode: `isel'
  2022-02-24  8:58 [Bug c/104673] New: powerpc e500mc Error: unrecognized opcode: `isel' judge.packham at gmail dot com
  2022-02-24  9:18 ` [Bug target/104673] " pinskia at gcc dot gnu.org
  2022-02-25  3:22 ` judge.packham at gmail dot com
@ 2022-02-25  3:24 ` judge.packham at gmail dot com
  2022-02-25  8:00 ` judge.packham at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: judge.packham at gmail dot com @ 2022-02-25  3:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104673

--- Comment #3 from Chris Packham <judge.packham at gmail dot com> ---
Created attachment 52511
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52511&action=edit
Attempt to trigger problem

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/104673] powerpc e500mc Error: unrecognized opcode: `isel'
  2022-02-24  8:58 [Bug c/104673] New: powerpc e500mc Error: unrecognized opcode: `isel' judge.packham at gmail dot com
                   ` (2 preceding siblings ...)
  2022-02-25  3:24 ` judge.packham at gmail dot com
@ 2022-02-25  8:00 ` judge.packham at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: judge.packham at gmail dot com @ 2022-02-25  8:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104673

Chris Packham <judge.packham at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Chris Packham <judge.packham at gmail dot com> ---
Looks like a duplicate of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104090

*** This bug has been marked as a duplicate of bug 104090 ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-25  8:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24  8:58 [Bug c/104673] New: powerpc e500mc Error: unrecognized opcode: `isel' judge.packham at gmail dot com
2022-02-24  9:18 ` [Bug target/104673] " pinskia at gcc dot gnu.org
2022-02-25  3:22 ` judge.packham at gmail dot com
2022-02-25  3:24 ` judge.packham at gmail dot com
2022-02-25  8:00 ` 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).