From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id R48dCRKgQ2LUAgAAWB0awg (envelope-from ) for ; Tue, 29 Mar 2022 20:10:58 -0400 Received: by simark.ca (Postfix, from userid 112) id 0CADB1F0B6; Tue, 29 Mar 2022 20:10:58 -0400 (EDT) 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 B43E41E150 for ; Tue, 29 Mar 2022 20:10:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E1365386EC38 for ; Wed, 30 Mar 2022 00:10:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1365386EC38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1648599055; bh=iyEZZeONI7q1970P1FXYuBKczhjjOYP6lJZscFSPM+U=; 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=LSDJ6uheXj3LY+tsaPAM2ZxuWyOTCztliuZpPHoHM8/XMgHUqyxazSl/4ryrJjJzH f5PLNZMJ+55nivvO9uMXkyJVUETKcDZqgkwNC27tmF2Y/RnEwlL9XYAMfKziIm7gpf 8rhhecXMYkjqyBq7ioHPfpcvwNgp58+ckxnnPoPQ= Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 066CF3858C50; Wed, 30 Mar 2022 00:09:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 066CF3858C50 Received: by mail-pg1-x52e.google.com with SMTP id t4so13082949pgc.1; Tue, 29 Mar 2022 17:09:34 -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=iyEZZeONI7q1970P1FXYuBKczhjjOYP6lJZscFSPM+U=; b=njV9v7HxGeOoFhYKFZkzPH7CgXjYWJRukGtOywqPVk+J0sAZO+fHEzIjPP0zHSNWm0 NHmamPUnoAMMBVrNvYR+sHv77VHObU+npKEUFlXfWm4j6F01gLPAc3ERs7jSRW/pvafJ emTezyiu+S1NIT5ZJ4cw+esPJD4238a6lDa8fT4V4BQ71/fTxdAK268pxU4Yvju+b3IY aw91NzdTRT5UABRhg5MqmDtg0+lDAM3Jhg7xeOy1K0D3mmQ0Ik+85iGdECHPD7ZbqZT4 hzqdR/1q08m4W+SBTov/MHkYiMcPt6SJ6GuABHcNJ85CeQEIjOIfqX0wNWY+GJm/5zFd FE4w== X-Gm-Message-State: AOAM5309OQWtIGG2KUfhWMItiC7FjzmsAn7AjrTMH5K7aoFdVeLvzpMg QkLZt5XPFKRbViKvtXEG9pg= X-Google-Smtp-Source: ABdhPJzugzy6j+/NuxhrxTcDwIGHzBMhvIXalXKMcBxCcZ0fsrhLnGoCeqUYLRas4FLM9vXhUCFubQ== X-Received: by 2002:a63:cd:0:b0:397:fbb1:2006 with SMTP id 196-20020a6300cd000000b00397fbb12006mr4018125pga.192.1648598973856; Tue, 29 Mar 2022 17:09:33 -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 q10-20020a056a00088a00b004f7ceff389esm22639406pfj.152.2022.03.29.17.09.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Mar 2022 17:09:33 -0700 (PDT) Message-ID: <02c80854-5971-7d69-c1a9-5a21e114f55f@gmail.com> Date: Tue, 29 Mar 2022 18:09:31 -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: 7bit 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. Pushed with a trivial new test. Thanks, Jeff