From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id E96B13858416 for ; Mon, 17 Jan 2022 20:06:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E96B13858416 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy06.your-server.de ([78.46.172.3]) by dedi548.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1n9YGp-000Dnn-Pv; Mon, 17 Jan 2022 21:06:28 +0100 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9YGp-0002DX-Mh; Mon, 17 Jan 2022 21:06:27 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 52718480050; Mon, 17 Jan 2022 21:06:27 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id tqLGHjybtVyk; Mon, 17 Jan 2022 21:06:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id D0281480106; Mon, 17 Jan 2022 21:06:26 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id D2cvvF-HO0Xj; Mon, 17 Jan 2022 21:06:26 +0100 (CET) Received: from [10.10.171.10] (unknown [10.10.171.10]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 7FA81480050; Mon, 17 Jan 2022 21:06:26 +0100 (CET) Message-ID: <1d1848d7-d97a-27df-3a97-19c1a676cead@embedded-brains.de> Date: Mon, 17 Jan 2022 21:06:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH] rs6000: Fix cpu selection w/ isel (PR100108) Content-Language: en-US From: Sebastian Huber To: Segher Boessenkool , gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com References: <8bd3b0c11cb08f63d2ca41a21596d16635626661.1618930768.git.segher@kernel.crashing.org> <5f1ed186-dfb5-b326-40bb-502fd864fba8@embedded-brains.de> In-Reply-To: <5f1ed186-dfb5-b326-40bb-502fd864fba8@embedded-brains.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.3/26425/Mon Jan 17 10:24:11 2022) X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 20:06:34 -0000 On 11/01/2022 09:10, Sebastian Huber wrote: > Hello Segher, >=20 > On 20/04/2021 17:00, Segher Boessenkool wrote: >> There are various non-IBM CPUs with isel as well, so it is easiest if = we >> just don't consider that flag here (it is not needed). >> >> 2021-04-20=C2=A0 Segher Boessenkool >> >> =C2=A0=C2=A0=C2=A0=C2=A0PR target/100108 >> =C2=A0=C2=A0=C2=A0=C2=A0* config/rs6000/rs6000.c (rs6000_machine_from_= flags): Do not consider >> =C2=A0=C2=A0=C2=A0=C2=A0OPTION_MASK_ISEL. >> --- >> Committed to trunk and 11.=C2=A0 Will do 10 in a week or so. >=20 > sorry for the late response, however, I noticed a GCC build issue with=20 > this patch: >=20 > /tmp/sh/b-gcc-powerpc-rtems6/./gcc/xgcc=20 > -B/tmp/sh/b-gcc-powerpc-rtems6/./gcc/ -nostdinc=20 > -B/tmp/sh/b-gcc-powerpc-rtems6/powerpc-rtems6/m8540/nof/newlib/ -isyste= m=20 > /tmp/sh/b-gcc-powerpc-rtems6/powerpc-rtems6/m8540/nof/newlib/targ-inclu= de -isystem=20 > /home/EB/sebastian_h/src/gcc/newlib/libc/include=20 > -B/tmp/sh/i-powerpc-rtems6/powerpc-rtems6/bin/=20 > -B/tmp/sh/i-powerpc-rtems6/powerpc-rtems6/lib/ -isystem=20 > /tmp/sh/i-powerpc-rtems6/powerpc-rtems6/include -isystem=20 > /tmp/sh/i-powerpc-rtems6/powerpc-rtems6/sys-include=C2=A0 -mcpu=3D8540=20 > -msoft-float -g -O2 -O2=20 > -I/home/EB/sebastian_h/src/gcc/libgcc/../newlib/libc/sys/rtems/include=20 > -g -O2 -DIN_GCC=C2=A0 -DCROSS_DIRECTORY_STRUCTURE=C2=A0 -W -Wall -Wno-n= arrowing=20 > -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes=20 > -Wold-style-definition=C2=A0 -isystem ./include=C2=A0=C2=A0 -g -DIN_LIB= GCC2=20 > -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc=C2=A0 -I. -I.=20 > -I../../../.././gcc -I/home/EB/sebastian_h/src/gcc/libgcc=20 > -I/home/EB/sebastian_h/src/gcc/libgcc/.=20 > -I/home/EB/sebastian_h/src/gcc/libgcc/../gcc=20 > -I/home/EB/sebastian_h/src/gcc/libgcc/../include=C2=A0 -DHAVE_CC_TLS=C2= =A0 -o=20 > _negvdi2.o -MT _negvdi2.o -MD -MP -MF _negvdi2.dep -DL_negvdi2 -c=20 > /home/EB/sebastian_h/src/gcc/libgcc/libgcc2.c -fvisibility=3Dhidden=20 > -DHIDE_EXPORTS > /tmp/ccZJ18fW.s: Assembler messages: > /tmp/ccZJ18fW.s:24: Error: unrecognized opcode: `isel' > make: *** [Makefile:501: _negvdi2.o] Error 1 >=20 > The assembler is called like this: >=20 > /tmp/sh/b-gcc-powerpc-rtems6/./gcc/as -I=20 > /home/EB/sebastian_h/src/gcc/libgcc/../newlib/libc/sys/rtems/include -I= =20 > . -I . -I ../../../.././gcc -I /home/EB/sebastian_h/src/gcc/libgcc -I=20 > /home/EB/sebastian_h/src/gcc/libgcc/. -I=20 > /home/EB/sebastian_h/src/gcc/libgcc/../gcc -I=20 > /home/EB/sebastian_h/src/gcc/libgcc/../include -a32 -me500 -mbig -o=20 > _negvdi2.o _negvdi2.s >=20 > Using -me500 seems to be all right, however, the file contains a machin= e=20 > directive: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0.file=C2=A0=C2=A0=C2=A0 "libgcc2.c" > =C2=A0=C2=A0=C2=A0=C2=A0.machine ppc > =C2=A0=C2=A0=C2=A0=C2=A0.section=C2=A0=C2=A0=C2=A0 ".text" >=20 > If I remove the ".machine ppc" by hand, the file can be assembled with=20 > the above command line. >=20 > The affect of the patch is: >=20 > diff -u _negvdi2.s.before _negvdi2.s.after > --- _negvdi2.s.before=C2=A0=C2=A0 2022-01-11 09:07:43.313828636 +0100 > +++ _negvdi2.s.after=C2=A0=C2=A0=C2=A0 2022-01-11 08:54:08.424946502 +0= 100 > @@ -1,5 +1,5 @@ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .file=C2=A0=C2=A0 "libgcc2.= c" > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .machine power9 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .machine ppc > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .section=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 ".text" > =C2=A0.Ltext0: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .align 2 >=20 >=20 I can try to fix this, however, for me it is not really clear in which=20 direction this should be fixed. I can build the GCC 10.3.0 release (it=20 uses .machine power9). The GCC 10 branch is broken (it uses .machine=20 ppc). Using the .machine directive and a command line option (-me500)=20 seems to be a bit inconsistent. It should be one or the other. Would a patch which changes .machine ppc to .machine e500 for -mcpu=3D854= 0=20 be the right way to fix this issue? --=20 embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht M=C3=BCnchen Registernummer: HRB 157899 Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler Unsere Datenschutzerkl=C3=A4rung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/