From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4ES8KsKIQ2IFfAAAWB0awg (envelope-from ) for ; Tue, 29 Mar 2022 18:31:30 -0400 Received: by simark.ca (Postfix, from userid 112) id 51D2E1F0B6; Tue, 29 Mar 2022 18:31:30 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,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 07B4A1E150 for ; Tue, 29 Mar 2022 18:31:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5AD54385801E for ; Tue, 29 Mar 2022 22:31:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AD54385801E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1648593088; bh=d+O//cdICM8HD243nDl3Hm6fBXzQC2nAM8wpmSBUWdU=; 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=JC66+YC74sGGy5VHR3EaG8hGd1GfhceU+0zgMJ9lvASNQBToC25Lw5w4sc/H9NjrL uW+5kjThSW55i3wQEs9RiIQhaq6thQkcqLK1TyM/i91+77BADsTFWFkQS/n3uL3J0X LK1kWGKNHKd55K9w+zL1i2KBTa/4caCK2SOOeui8= Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 632673858C54; Tue, 29 Mar 2022 22:30:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 632673858C54 Received: by mail-pj1-x1030.google.com with SMTP id a16-20020a17090a6d9000b001c7d6c1bb13so4360413pjk.4; Tue, 29 Mar 2022 15:30:05 -0700 (PDT) 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=d+O//cdICM8HD243nDl3Hm6fBXzQC2nAM8wpmSBUWdU=; b=D3/Oz2zj6aOfEbQE4zEgtto0dEO5sfOOR3ffFgBgPigJCbdXCZdYQJVxyhm98WExqa niH1jT9eVXgvdk9ev/R/YN5Ql0rg/Ks4xveoVVUtELJb2Ap1QQ80KpFrXIzqVRB4EwCa 9Zd1bFOCJfEZY2DU7h57FMsYe7KiYPTdR7QpfrWcDE24+um92Oq5HI+oAKPrdtDRpyGH 83CKDSF7avda3vYD3rg+2HwZMc/m9YLO3bPB7pmyry6mljdAbsuMhaLc44hzVvTU4T6g UUSs19KyUbFpf3CnAiOfWIuqaXjyjySuGHMp31A+I2ylg7PhGCvrzsTbMvyjBSPQisHI v2Dw== X-Gm-Message-State: AOAM533Rsstq2gi0ORE/p8V6TqveWzVdyJjnz+YhjHUqNAmLVMkaSHyz 7/5ElPYcrDbE+kNXJ8Fp+4Q= X-Google-Smtp-Source: ABdhPJwIf9B0uEjsRepxJd3tgACtLxUgWzt/fRM2Wze5o7Tsmpe1kklIJ9bJ3ktsTxMjjCkg/ZsYCg== X-Received: by 2002:a17:90a:f295:b0:1c6:d4ba:abfa with SMTP id fs21-20020a17090af29500b001c6d4baabfamr1387747pjb.159.1648593004208; Tue, 29 Mar 2022 15:30:04 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id o1-20020a637e41000000b003804d0e2c9esm16661265pgn.35.2022.03.29.15.30.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Mar 2022 15:30:03 -0700 (PDT) Message-ID: <7bb924fd-620f-f2af-5877-f3a0f9dc32de@gmail.com> Date: Tue, 29 Mar 2022 16:30:02 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Fix for MUL instruction on the v850 Content-Language: en-US To: Hans-Peter Nilsson , binutils@sourceware.org, gdb-patches@sourceware.org References: <3524b3c5-354f-b1cb-b9f4-ea815fa5774a@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 3/28/2022 9:12 PM, Mike Frysinger wrote: > 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. This 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 result >>> 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 value 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 promotions, >>> 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? >> 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. Fair enough.  I'll cover it with a sim test. jeff