Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: brobecker@adacore.com (Joel Brobecker)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC][13/19] Target FP: Perform Ada fixed-point scaling in target format
Date: Mon, 09 Oct 2017 16:58:00 -0000	[thread overview]
Message-ID: <20171009165830.1607ED83320@oc3748833570.ibm.com> (raw)
In-Reply-To: <20171009163008.5svu3sjyeubqaux7@adacore.com> from "Joel Brobecker" at Oct 09, 2017 12:30:08 PM

Joel Brobecker wrote:
> On Tue, Sep 05, 2017 at 08:21:35PM +0200, Ulrich Weigand wrote:
> > 	* ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
> > 	(cast_to_fixed): Likewise.
>          ^^^^^^^^^^^^^
>          cast_from_fixed :)
Fixed.

> > 	(ada_scaling_type): New function.
> > 	(ada_delta): Return value instead of DOUBLEST.  Perform target
> > 	arithmetic instead of host arithmetic.
> > 	(scaling_factor): Rename to ...
> > 	(ada_scaling_factor) ... this.  Return value instead of DOUBLEST.
> > 	Perform target arithmetic instead of host arithmetic.
> 
> Maybe mention that we are making this function non-static too?
Fixed.

> We have a fixed point tests in the testsuite (gdb.ada/fixed_points.exp),
> so having it run and pass after your change should be a very good sanity
> check on its own.

I did run the test suite including Ada tests on x86_64-linux, and this
test case does still pass.

> This is a C++ question, really. Does it make any difference if you
> declare the std::string first, and then only set its contents in
> a second statement? I can't remember the details, but it has to do
> with initialization vs assignment. I _really_ hope that the string
> class is sufficiently well designed that the two are really equivalent
> in practice?

Huh.  Indeed I see worse code when doing the assignment as a separate
statement, at least with GCC 4.8.  I'll make sure to use initialization
instead wherever possible.  Thanks for pointing this out!

Thanks for the review!

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2017-10-09 16:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 18:21 Ulrich Weigand
2017-10-09 16:30 ` Joel Brobecker
2017-10-09 16:58   ` Ulrich Weigand [this message]
2017-10-09 18:09     ` Joel Brobecker
2017-10-09 21:12       ` Simon Marchi
2017-10-11 17:49         ` Maciej W. Rozycki

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=20171009165830.1607ED83320@oc3748833570.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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