From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2391 invoked by alias); 28 Nov 2014 15:51:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2381 invoked by uid 89); 28 Nov 2014 15:51:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 28 Nov 2014 15:51:28 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 73CDF116690; Fri, 28 Nov 2014 10:51:26 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8emvC0qqk9PD; Fri, 28 Nov 2014 10:51:26 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 00EDE11668D; Fri, 28 Nov 2014 10:51:25 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9D5F940F79; Fri, 28 Nov 2014 19:51:22 +0400 (RET) Date: Fri, 28 Nov 2014 15:51:00 -0000 From: Joel Brobecker To: Oleg Endo Cc: gdb-patches@sourceware.org, Kaz Kojima Subject: Re: [SH] Correct fabs and fneg insns in simulator Message-ID: <20141128155122.GL5042@adacore.com> References: <1413243560.31394.48.camel@yam-132-YW-E178-FTW> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1413243560.31394.48.camel@yam-132-YW-E178-FTW> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg00711.txt.bz2 Hello Oleg,, > It seems that the implementation of the SH fabs and fneg insns in the > simulator is not correct. They use the FP_UNARY macro which checks the > FPSCR.PR setting and raises an exception if PR = 1 (double precision) > and the register number is not even (i.e. a valid DF reg number). > For normal unary FP insns this is fine. However, fneg and fabs perform > the same (integer) operations regardless of the FPSCR.PR setting. > > This issue initially popped up here > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63260 > > I've checked some of the failing tests mentioned in GCC PR 63260 above > with the patch applied and the failures go away. > > Could somebody please apply it if it's OK? > > I'm not subscribed to gdb-patches, please CC me when replying. > > Cheers, > Oleg > > sim/ChangeLog: > > 2014-10-14 Oleg Endo > > * sh/gencode.c (fabs, fneg): Implement as integer operation > instead of using the FP_UNARY macro. Thank you for the patch. We don't have an SH maintainer for GDB, and in the absence of any feedback from other interested people, we will just trust you on this. So I pushed this patch under the "tiny patch" rule. If you ever think of contributing other patches to GDB, we'll probably have to start thinking about getting your copyright assignment to cover GDB as well. -- Joel