From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vgHaEiVZjWHdMgAAWB0awg (envelope-from ) for ; Thu, 11 Nov 2021 12:55:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 3A7241F0BD; Thu, 11 Nov 2021 12:55:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 B6DC21E813 for ; Thu, 11 Nov 2021 12:55:48 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C015B3858037 for ; Thu, 11 Nov 2021 17:55:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C015B3858037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636653347; bh=A2MKrB5cME4P3Cz0FC63Rosizm6Qj/5RuMn6/Zjkk/w=; 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=hLv0HIgtpL4cAV6SbkmGSm6LTrNyyDs2qLw1HRzUBo532bBH4zTqp+xgv5NYfN+Zd v/QGcZ6glCdHcmkBLc8itoR2dMoAwqxhScQslCUYSpJT/UvOQJ/rxrG1cr/O4SNQPv JPI60f8HaFP1Ytj/MrRS846MXI7DFloZyVf8bB5s= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 14DBE3858410 for ; Thu, 11 Nov 2021 17:55:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 14DBE3858410 Received: by smtp.gentoo.org (Postfix, from userid 559) id 1158E342B7E; Thu, 11 Nov 2021 17:55:20 +0000 (UTC) Date: Thu, 11 Nov 2021 12:55:23 -0500 To: Jeff Law Subject: Re: Minor fix for H8 simulator Message-ID: Mail-Followup-To: Jeff Law , gdb-patches@sourceware.org References: <36fb4284-5ddc-50c3-959c-b30e0cc96096@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WQd6yaeNW8K1uvOt" Content-Disposition: inline In-Reply-To: <36fb4284-5ddc-50c3-959c-b30e0cc96096@gmail.com> 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: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --WQd6yaeNW8K1uvOt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 11 Nov 2021 09:50, Jeff Law via Gdb-patches wrote: > The upstream GCC tester has=C2=A0 showed spurious execution failures on t= he=20 > H8 target for the H8/SX multilibs. I suspected memory corruption or an=20 > uninitialized variable early as the same binary would sometimes work and= =20 > sometimes it got the wrong result. Worse yet, the point where the test=20 > determined it was getting the wrong result would change. >=20 > Because it only happened on the H8/SX variant I was able to zero in on=20 > the "mova" support and the "short form" of those instructions in particul= ar. >=20 > As the code stands it checks if code->op3.type =3D=3D 0 to try and identi= fy=20 > cases where op3 wasn't filled in and thus we've got the short form of=20 > the mova instruction. >=20 > But for the short-form of those instructions we never set any of the=20 > "op3" data structure. We get whatever was lying around -- it's usually=20 > zero and thus things usually work, but if the stale data was nonzero,=20 > then we'd fail to recognize the instruction as a short-form and fail to= =20 > set up the various fields appropriately. >=20 > I initially initialized the op3.type field to zero, but didn't like that= =20 > because it was inconsistent with how other operands were initialized.=20 > Bringing consistency meant using -1 as the initializer value and=20 > adjusting the check for short form mova appropriately. >=20 > I've had this in the upstream GCC tester for perhaps a year at this=20 > point and haven't seen any of the intermittent failures again. can you update the unittests too ? and while we have your eyes on H8, can you perhaps peek at the open reports= ? https://sourceware.org/bugzilla/buglist.cgi?bug_status=3DUNCONFIRMED&bug_st= atus=3DNEW&bug_status=3DASSIGNED&component=3Dsim&&short_desc=3Dh8300&short_= desc_type=3Dallwordssubstr -mike --WQd6yaeNW8K1uvOt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmGNWQsACgkQQWM7n+g3 9YEVpQ/+M8pjsywy/TIONd3cfmu1gnFHvE2cPgoEW9WcDI8l991es4OeSqcBYWTv Zu+CVinPly5uxifk+F7pC3A9NrcK1XNf13Qc9WT8U2U5SMaUEYJl1l9RsrdeQilP DC/AFQX9xm+CEKVAui3zROcJmDFMB3R7pSOQE8//mblJLB69LiQ4cuNrBLwvxd+d LmzaKFpvF4YgEN5a+ZSsUMCI6jWnknmEGOGDDAwYbIVMzygK7eQUZQ8lZWmQiACi TiaM6kotcTnSMd+P9vuF5kkuV5OF+tfSmYpydVh/BhBBAI2Uxi27K7orFCXKaoBE Z+021QWfQdYk+fFLjr6VJeH+RIqUkBM5n2u8pc5KpH13CW/bBse11OC6MBTmX6GD z5uBG3q663OHp5fUOjryYiAWVqqn3gADy9IeiflMJ3k6/j1eM/lnbRY17YauqEpE jxEHwynRZuwPOiSs/GGizVKekcS4WPt/m7eDcXfJaxa0HP+vIMVWqM4267FWAufN kyMtBr4uH4igKLnh+BKACo/gpJ57O3GqFfwcjDf4uSeAU58rZi1al1UYTp/PjIgE YcQ5QvkM3NvIDz99TzSvsnUuP9BxnYvTq06/h/iGTxngyfX80anx3hSxOzo23vN1 Fw6TDaJMk1QsF/RCIXo1B9alucYlB1sDSw8GvNEpfoWL2NdlrqI= =UIJu -----END PGP SIGNATURE----- --WQd6yaeNW8K1uvOt--