From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lug-owl.de (lug-owl.de [188.68.32.151]) by sourceware.org (Postfix) with ESMTPS id 87E6C3B49337 for ; Fri, 7 Jul 2023 10:53:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87E6C3B49337 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id 7440542047; Fri, 7 Jul 2023 12:53:18 +0200 (CEST) Date: Fri, 7 Jul 2023 12:53:18 +0200 From: Jan-Benedict Glaw To: =?utf-8?B?5qKF5p2w?= Cc: gcc-patches@gcc.gnu.org, YunQiang Su , "Maciej W . Rozycki" Subject: Re: [PATCH v4 4/9] MIPS: Add bitwise instructions for mips16e2 Message-ID: <20230707105317.kn4xv2yasza3ik43@lug-owl.de> References: <030d4fdfe082a5a76f469e21117389acd4a9b0eb.1687162620.git.jie.mei@oss.cipunited.com> <20230706230657.wpokedcvtr25zwrz@lug-owl.de> <3ec92640-af21-b70d-ce12-700ef449eb8e@oss.cipunited.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hqxg4y3u7soh2xop" Content-Disposition: inline In-Reply-To: <3ec92640-af21-b70d-ce12-700ef449eb8e@oss.cipunited.com> X-Operating-System: Linux chamaeleon 5.14.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --hqxg4y3u7soh2xop Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, 2023-07-07 16:38:51 +0800, =E6=A2=85=E6=9D=B0 wrote: > =E5=9C=A8 2023/7/7 07:06, Jan-Benedict Glaw =E5=86=99=E9=81=93: > > On Mon, 2023-06-19 16:29:53 +0800, Jie Mei = wrote: > > > There are shortened bitwise instructions in the mips16e2 ASE, > > > for instance, ANDI, ORI/XORI, EXT, INS etc. . [...] > > Starting with this patch, I see some new warning: > >=20 > > [all 2023-07-06 23:04:01] g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_= STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall= -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wco= nditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-va= riadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENER= ATOR_FILE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc= /../include -I../../gcc/gcc/../libcpp/include \ > > [all 2023-07-06 23:04:01] -o build/gencondmd.o build/gencondmd.cc > > [all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26:= warning: 'and' of mutually exclusive equal-tests is always 0 > > [all 2023-07-06 23:04:02] 435 | DONE; > > [all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26:= warning: 'and' of mutually exclusive equal-tests is always 0 > > [all 2023-07-06 23:04:03] ../../gcc/gcc/config/mips/mips.md:822:1: warn= ing: 'and' of mutually exclusive equal-tests is always 0 > > [all 2023-07-06 23:04:03] 822 | ;; conditional-move-type condition is= needed. > > [all 2023-07-06 23:04:03] | ^ > > [all 2023-07-06 23:04:03] g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STR= UCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -W= no-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wcondi= tionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-varia= dic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATO= R_FILE -static-libstdc++ -static-libgcc -o build/gencondmd \ > > [all 2023-07-06 23:04:03] build/gencondmd.o build/errors.o ../build= -x86_64-pc-linux-gnu/libiberty/libiberty.a > > [all 2023-07-06 23:04:03] build/gencondmd > tmp-cond.md > >=20 > >=20 > > (Full build log available as eg. http://toolchain.lug-owl.de/laminar/jo= bs/gcc-mips-linux/76) >=20 > The warning you mentioned above seems gone if I change the condition `ISA= _HAS_MIPS16E2` to `TARGET_MIPS16 && ISA_HAS_MIPS16E2` in mips.md. >=20 > But it's weird because `ISA_HAS_MIPS16E2` actually contains `TARGET_MIPS1= 6`. >=20 > diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md > index b9eb541cf4a..77165778067 100644 > --- a/gcc/config/mips/mips.md > +++ b/gcc/config/mips/mips.md > @@ -3436,7 +3436,7 @@ > [(set (match_operand:GPR 0 "register_operand" "=3Dd,d") > (ior:GPR (match_operand:GPR 1 "register_operand" "%0,0") > (match_operand:GPR 2 "uns_arith_operand" "d,K")))] > - "ISA_HAS_MIPS16E2" > + "TARGET_MIPS16 && ISA_HAS_MIPS16E2" > "@ > or\t%0,%2 > ori\t%0,%x2" That's odd. Have you looked at preprocessed output? Maybe some parentheses aren't as expected? Looks like an opportunity to deep-dive into the unexpected. OTOH what's with the mips-msa.md warnings? The pattern actually want !TARGET_MIPS16. (But I haven't really looked into the dependencies.) MfG, JBG --=20 --hqxg4y3u7soh2xop Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCZKfumwAKCRAdvV51g5nh u6LcAJ968IvCSxlDIP7Lreqxj1ft/UHyjwCfY7iuYiL7potn9XSwofU/0G2WmoQ= =3ynZ -----END PGP SIGNATURE----- --hqxg4y3u7soh2xop--