From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id nAVRB115QmLVPgAAWB0awg (envelope-from ) for ; Mon, 28 Mar 2022 23:13:33 -0400 Received: by simark.ca (Postfix, from userid 112) id 0C4641EFB9; Mon, 28 Mar 2022 23:13:33 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4DBA01E787 for ; Mon, 28 Mar 2022 23:13:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64B3B3857C71 for ; Tue, 29 Mar 2022 03:13:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64B3B3857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1648523611; bh=V/bnyrCEhse+P4KlA+hY1hoJA6EJzOWXJll4FVh/hkw=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=iVIwZbEQivBlvpP2d6e0Jr0Qb3cAnGNKqKqu6UtmPrucxYWyUo4wJIhIXmNRAPPsd W95tpecXbMX9n3eItMmBWyZuB9hhbIeDXNgQ1NImZ0kvDUUEQnAN25OHC/+i6OFtaY 9NhdYK6FJWS60bGRUBsKeTnlziLp80aH/Tg/hkUA= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id D92D13858C51; Tue, 29 Mar 2022 03:11:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D92D13858C51 Received: by smtp.gentoo.org (Postfix, from userid 559) id 2FC52341472; Tue, 29 Mar 2022 03:11:50 +0000 (UTC) Date: Mon, 28 Mar 2022 23:12:04 -0400 To: Hans-Peter Nilsson Subject: Re: Fix for MUL instruction on the v850 Message-ID: Mail-Followup-To: Hans-Peter Nilsson , Jeff Law , binutils@sourceware.org, gdb-patches@sourceware.org References: <3524b3c5-354f-b1cb-b9f4-ea815fa5774a@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="G16u3WRZgXF0iSKR" Content-Disposition: inline In-Reply-To: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: Jeff Law , binutils@sourceware.org, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --G16u3WRZgXF0iSKR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 28 Mar 2022 09:38, Hans-Peter Nilsson wrote: > On Sat, 26 Mar 2022, Jeff Law via Binutils wrote: > > The v850 gcc testsuite started failing test vrp13 about a week ago. Thi= s was > > ultimately tracked down on a bug in the simulator's handling of the MUL > > instruction (a change in the compiler resulted in the test no longer > > compile-time optimized away). > > > > MUL on the v850 is a 32x32->64 multiply with the hi/low parts of the re= sult > > going into distinct registers.? ?? mul r1, r2, r3 is r1xr2 -> (r3, r2) = where > > r2 holds the low 32 bits of the result and r3 holds the high 32 bits of= the > > result. > > > > We had inputs of 2, -10 and produced an output of 20.? Opps ;-) > > > > The v850 is a 32bit processor using 2s complement.? So to check if a va= lue is > > negative we merely need to check if bit 0x80000000 is on. Anything else= is > > just introducing dependencies on the host system's types, argument prom= otions, > > etc, which is precisely what happened in this case. > > > > No new testcase for the simulator.? Not only does vrp13 test this, but = about > > 1800 other tests which have flipped from failing to passing in the GCC > > testsuite...? So I can say it's being tested and if it were to regress = again, > > we'd catch it. > > > > OK for the trunk? >=20 > OK if you mention the gcc test-suite in the commit message or a > comment, but please (re)consider adding a self-contained (i.e. > just binutils+sim) test-case. Suggested inspiration: "git grep > sim" in the CRIS sim test-suite, though without a "dump > register" framework macro you need to compare with expected > results instead of matching output. that was going to be my feedback as well. v850 already has a testsuite for the sim, so adding another testcase shouldn't be that hard. -mike --G16u3WRZgXF0iSKR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmJCeP8ACgkQQWM7n+g3 9YH4Kg/7BK3d+Gw/uB2zHQFVsMXTnW4+7bdNWYFUTjS+vcoduM3q6enEvXvoIQNl y3uecvnoG4ECCqYipLsGhqjJfuVozhc0/Y0tf145thrDG3sFPODcYf7yrbmCr4kT Q2LQx0pEyTpuHfb7M9tu8mAQbpiRkCdF5esI++TY1/RHhO+dcNNiSphV+uzKY6bE sgDku+5QDLh8PUV83SF9CskwLTyDIionVvQG9QXfSl6wpL2rEkVSV8MASljuh6bS 4AUlP1A6My+zw37hI0Dx6WPodGULV57QizNzghgS/pN2vAy6F6fJur0rpGzVIeUu N4lGWIutn22wEXGWbbEnu4RNbgK7af8rOIg0ZqGe/ozTOm+/PASA+6aC5HWbUnnv gjvIXUBI6wMGXunQfa7ptboZ0kqGUIpr+x0e1FY2gOuNWwywJhgGc4PxT1OPjWHW mdC7KtWhvvlAPSSVlSjNVbvGHg45vPT1Z6XR1ssDAH7a0jEI8lEgxkXHgaYOqPXv H9DCOVeMEuAUQhfbIIgc7aBRTqBJi1xSMunrao2c7BhRmJW9ruWH+ILAIFGS1pIo Pzzp91UjVMxvN/TED0vJndEv2OBWwIq/IdyEkpfaUOI2ZtYidZWHJ1X3Il+t6QBT 0OZKSgL8BLBuLnQ31nFskbEPdoLMa4Xux8fh0GMDHVALWXlpd2w= =C9jO -----END PGP SIGNATURE----- --G16u3WRZgXF0iSKR--