From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BA07385803F; Fri, 16 Apr 2021 02:02:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BA07385803F From: "rin at NetBSD dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100108] New: [10 Regression] powerpc: recognize 32-bit CPU as POWER9 with -misel option Date: Fri, 16 Apr 2021 02:02:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rin at NetBSD dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 02:02:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100108 Bug ID: 100108 Summary: [10 Regression] powerpc: recognize 32-bit CPU as POWER9 with -misel option Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: rin at NetBSD dot org Target Milestone: --- Created attachment 50609 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50609&action=3Dedit Fix for this regression GCC10 wrongly recognizes CPU as POWER9 if -misel is specified, even when it is configured for 32-bit processors: % cat test.c int main(void) { return 0; } % gcc10 -misel -S test.c -o test10.S % gcc9 -misel -S test.c -o test9.S % diff -u test9.S test10.S --- test.9 2021-04-16 10:53:47.116917225 +0900 +++ test.10 2021-04-16 10:53:38.075282430 +0900 @@ -1,5 +1,5 @@ .file "test.c" - .machine ppc + .machine power9 .section ".text" .align 2 .globl main ...(snip)... This is because rs6000_machine_from_flags() assumes ISEL instructions are supported only by POWER9 and successors. However, ISEL is also implemented for 32-bit processors like e500. Please apply the attached patch to fix the problem. ---- % gcc10 -v Using built-in specs. COLLECT_GCC=3D/build/tools.broken/bin/powerpc--netbsd-gcc COLLECT_LTO_WRAPPER=3D/build/tools.broken/libexec/gcc/powerpc--netbsd/10.3.= 0/lto-wrapper Target: powerpc--netbsd Configured with: /usr/src/tools/gcc/../../external/gpl3/gcc/dist/configure --target=3Dpowerpc--netbsd --enable-long-long --enable-threads --with-bugurl=3Dhttp://www.NetBSD.org/support/send-pr.html --with-pkgversion=3D'NetBSD nb1 20210411' --with-system-zlib --without-isl --enable-__cxa_atexit --enable-libstdcxx-time=3Drt --enable-libstdcxx-threa= ds --with-diagnostics-color=3Dauto-if-env --with-default-libstdcxx-abi=3Dnew --with-sysroot=3D/build/dest/evbppc-powerpc --with-mpc=3D/build/tools.broken --with-mpfr=3D/build/tools.broken --with-gmp=3D/build/tools.broken --disabl= e-nls --disable-multilib --program-transform-name=3D's,^,powerpc--netbsd-,' --enable-languages=3D'c c++ objc' --prefix=3D/build/tools.broken Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.3.0 (NetBSD nb1 20210411) ---- % gcc9 -v Using built-in specs. COLLECT_GCC=3D/build/tools.9/bin/powerpc--netbsd-gcc COLLECT_LTO_WRAPPER=3D/build/tools.9/libexec/gcc/powerpc--netbsd/9.3.0/lto-= wrapper Target: powerpc--netbsd Configured with: /usr/src/tools/gcc/../../external/gpl3/gcc.old/dist/config= ure --target=3Dpowerpc--netbsd --enable-long-long --enable-threads --with-bugurl=3Dhttp://www.NetBSD.org/support/send-pr.html --with-pkgversion=3D'NetBSD nb1 20200907' --with-system-zlib --without-isl --enable-__cxa_atexit --enable-libstdcxx-time=3Drt --enable-libstdcxx-threa= ds --with-diagnostics-color=3Dauto-if-env --with-default-libstdcxx-abi=3Dnew --with-sysroot=3D/build/dest/evbppc-powerpc --with-mpc=3D/build/tools.9 --with-mpfr=3D/build/tools.9 --with-gmp=3D/build/tools.9 --disable-nls --disable-multilib --program-transform-name=3D's,^,powerpc--netbsd-,' --enable-languages=3D'c c++ objc' --prefix=3D/build/tools.9 Thread model: posix gcc version 9.3.0 (NetBSD nb1 20200907)=