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 135D23857C64 for ; Tue, 25 Oct 2022 19:59:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 135D23857C64 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 95C2E42032; Tue, 25 Oct 2022 21:59:06 +0200 (CEST) Date: Tue, 25 Oct 2022 21:59:06 +0200 From: Jan-Benedict Glaw To: Jeff Law Cc: "gcc-patches@gcc.gnu.org" Subject: Re: [committed] More infrastructure to avoid bogus RTL on H8 Message-ID: <20221025195906.rk5wx6ttpwohwn4p@lug-owl.de> References: <3aa2cc41-0ad2-e106-56d4-f839ae2c1078@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zgu7bffyt5lhrgyl" Content-Disposition: inline In-Reply-To: <3aa2cc41-0ad2-e106-56d4-f839ae2c1078@gmail.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=-3.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --zgu7bffyt5lhrgyl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jeff! On Mon, 2022-10-17 17:47:16 -0600, Jeff Law via Gcc-patches wrote: > --- a/gcc/config/h8300/h8300.cc > +++ b/gcc/config/h8300/h8300.cc > @@ -5531,6 +5531,32 @@ h8300_ok_for_sibcall_p (tree fndecl, tree) > =20 > return 1; > } > + > +/* Return TRUE if OP is a PRE_INC or PRE_DEC > + instruction using REG, FALSE otherwise. */ > + > +bool > +pre_incdec_with_reg (rtx op, int reg) > +{ > + /* OP must be a MEM. */ > + if (GET_CODE (op) !=3D MEM) > + return false; > + > + /* The address must be a PRE_INC or PRE_DEC. */ > + op =3D XEXP (op, 0); > + if (GET_CODE (op) !=3D PRE_DEC && GET_CODE (op) !=3D PRE_INC) > + return false; > + > + /* It must be a register that is being incremented > + or decremented. */ > + op =3D XEXP (op, 0); > + if (!REG_P (op)) > + return false; > + > + /* Finally, check that the register number matches. */ > + return REGNO (op) =3D=3D reg; This results in a new signed-vs-unsigned warning for me: [all 2022-10-25 00:41:11] ../../gcc/gcc/config/h8300/h8300.cc: In function = 'bool pre_incdec_with_reg(rtx, int)': [all 2022-10-25 00:41:11] ../../gcc/gcc/config/h8300/h8300.cc:5557:21: erro= r: comparison of integer expressions of different signedness: 'unsigned int= ' and 'int' [-Werror=3Dsign-compare] [all 2022-10-25 00:41:11] 5557 | return REGNO (op) =3D=3D reg; Thanks, Jan-Benedict --=20 --zgu7bffyt5lhrgyl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCY1hACAAKCRAdvV51g5nh u6ABAJwNSbvDjfjHonxKVGespqCXb+AJ6gCbBzOByvStebhZYhpnDd6SjnLx6tA= =GaLO -----END PGP SIGNATURE----- --zgu7bffyt5lhrgyl--