From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WFmaEZ9bjWEhMwAAWB0awg (envelope-from ) for ; Thu, 11 Nov 2021 13:06:23 -0500 Received: by simark.ca (Postfix, from userid 112) id 4031C1F0BD; Thu, 11 Nov 2021 13:06:23 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,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 4E1691E813 for ; Thu, 11 Nov 2021 13:06:22 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C2608385781C for ; Thu, 11 Nov 2021 18:06:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2608385781C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636653981; bh=us1C5CxaGS1H845IBCdCNByNONWgbT2P/sEuDtH27tI=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EtO0UojXuDHG24of5z7APz9xNlh/oNArMeCylQwm7I2pXk+obxOwV5R0ZTpS0cicT BgLKdWcOc1SqFdKKNa1+aNR30gzLimcfCLbLwWxoeLHivp2q4BbN/WMlwHu0hQAHyo MpJiY4T0FbY/nIGDNxJjRFmJX14GhY7zt0G9QxAc= Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 6EAFE3858410 for ; Thu, 11 Nov 2021 18:06:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EAFE3858410 Received: by mail-pl1-x634.google.com with SMTP id b11so6312307pld.12 for ; Thu, 11 Nov 2021 10:06:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=us1C5CxaGS1H845IBCdCNByNONWgbT2P/sEuDtH27tI=; b=0RYF6HUray1OjfDjRLvbUJsNBO+EjjFOlUPmTQW9r09Jg/XF2NeSLBuazYH6fhETmk +fauljaGBCBFWv8uzCFUoOBgit8ptK+wVWjAHKcR82Sdn4Na0AWVINM1yljGReappcnT WaxYu5118a5R4ZrWUYfhSxaVANX4klVM4adOXw2b2hoRQcOPnhtsXWSNchltv4tJf9S+ y3O+I85qBWDRMeu3sLLSOYsQRd6I5xgubEiQijlRZ+yo1vnqZQ/BJo8T2DIYcZvxCxv3 psNcy1VMZliFa9mhJY5rH0R2E4I4V8Yj7ehvV+YthAMhXfMoSmYotmrPFgKFvhifWg1J w0KA== X-Gm-Message-State: AOAM532swf78NsK8aCBRSLNACogYwCIEwBnV2jsJ6/G0Ngy6rJhXlpDv B5mWiBg2QsYHG1ISyYw3l8ZMuk6A58c= X-Google-Smtp-Source: ABdhPJwDi3A1PZW81T/M2pbIbPHq4QgIFJWWTMdBrfK77iZooCjjoNp7KFsKx1sQrirTQimUGzwnjw== X-Received: by 2002:a17:902:8f94:b0:143:8e81:3ec1 with SMTP id z20-20020a1709028f9400b001438e813ec1mr881870plo.52.1636653961927; Thu, 11 Nov 2021 10:06:01 -0800 (PST) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id c8sm2977482pgn.72.2021.11.11.10.06.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Nov 2021 10:06:01 -0800 (PST) Message-ID: Date: Thu, 11 Nov 2021 11:06:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: Minor fix for H8 simulator Content-Language: en-US To: gdb-patches@sourceware.org References: <36fb4284-5ddc-50c3-959c-b30e0cc96096@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Jeff Law via Gdb-patches Reply-To: Jeff Law Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 11/11/2021 10:55 AM, Mike Frysinger wrote: > On 11 Nov 2021 09:50, Jeff Law via Gdb-patches wrote: >> The upstream GCC tester has  showed spurious execution failures on the >> H8 target for the H8/SX multilibs. I suspected memory corruption or an >> uninitialized variable early as the same binary would sometimes work and >> sometimes it got the wrong result. Worse yet, the point where the test >> determined it was getting the wrong result would change. >> >> Because it only happened on the H8/SX variant I was able to zero in on >> the "mova" support and the "short form" of those instructions in particular. >> >> As the code stands it checks if code->op3.type == 0 to try and identify >> cases where op3 wasn't filled in and thus we've got the short form of >> the mova instruction. >> >> But for the short-form of those instructions we never set any of the >> "op3" data structure. We get whatever was lying around -- it's usually >> zero and thus things usually work, but if the stale data was nonzero, >> then we'd fail to recognize the instruction as a short-form and fail to >> set up the various fields appropriately. >> >> I initially initialized the op3.type field to zero, but didn't like that >> because it was inconsistent with how other operands were initialized. >> Bringing consistency meant using -1 as the initializer value and >> adjusting the check for short form mova appropriately. >> >> I've had this in the upstream GCC tester for perhaps a year at this >> point and haven't seen any of the intermittent failures again. > can you update the unittests too ? IIRC it was dependent upon what instructions had recently executed as those impacted the state of code->op3.type -- my analysis is from over a year ago and had been sitting in my todo box for a while.  Even just reproducing was fairly painful. > > and while we have your eyes on H8, can you perhaps peek at the open reports ? > https://sourceware.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&component=sim&&short_desc=h8300&short_desc_type=allwordssubstr I can take a look at them as I'm familiar with the H8/S and earlier ISAs.  I've got virtually no experience with the SX variants. Jeff