Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Oleg Endo <oleg.endo@t-online.de>
Cc: gdb-patches@sourceware.org, Kaz Kojima <kkojima@rr.iij4u.or.jp>
Subject: Re: [SH] Correct fabs and fneg insns in simulator
Date: Fri, 28 Nov 2014 15:51:00 -0000	[thread overview]
Message-ID: <20141128155122.GL5042@adacore.com> (raw)
In-Reply-To: <1413243560.31394.48.camel@yam-132-YW-E178-FTW>

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 <olegendo@gcc.gnu.org>
> 
> 	* 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


  reply	other threads:[~2014-11-28 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13 23:39 Oleg Endo
2014-11-28 15:51 ` Joel Brobecker [this message]
2014-11-30 16:35   ` Oleg Endo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141128155122.GL5042@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kkojima@rr.iij4u.or.jp \
    --cc=oleg.endo@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox