From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5432 invoked by alias); 30 Nov 2014 16:35:17 -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 5419 invoked by uid 89); 30 Nov 2014 16:35:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout08.t-online.de Received: from mailout08.t-online.de (HELO mailout08.t-online.de) (194.25.134.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 30 Nov 2014 16:35:14 +0000 Received: from fwd19.aul.t-online.de (fwd19.aul.t-online.de [172.20.27.65]) by mailout08.t-online.de (Postfix) with SMTP id D15A941A757; Sun, 30 Nov 2014 17:35:09 +0100 (CET) Received: from [192.168.0.106] (ZZzg8ZZSQh-+5IaIA+02zbM9L6HhOt2Mw16eOgKxp4MhO9W7Ehmbh9JnGKAxLLqgNM@[84.180.116.254]) by fwd19.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1Xv7Sm-1KQozY0; Sun, 30 Nov 2014 17:35:08 +0100 Message-ID: <1417365306.3387.38.camel@yam-132-YW-E178-FTW> Subject: Re: [SH] Correct fabs and fneg insns in simulator From: Oleg Endo To: Joel Brobecker Cc: gdb-patches@sourceware.org, Kaz Kojima Date: Sun, 30 Nov 2014 16:35:00 -0000 In-Reply-To: <20141128155122.GL5042@adacore.com> References: <1413243560.31394.48.camel@yam-132-YW-E178-FTW> <20141128155122.GL5042@adacore.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-SW-Source: 2014-11/txt/msg00750.txt.bz2 Hi, On Fri, 2014-11-28 at 19:51 +0400, Joel Brobecker wrote: > 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. Thanks. > 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. Yes, that might be a good idea. Could you please send me the necessary papers (or initiate the procedure)? Cheers, Oleg