public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Commit: AArch64 sim: Use fsqrt for floating point square root.
@ 2016-07-21  8:17 Nick Clifton
  2016-07-21  8:20 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2016-07-21  8:17 UTC (permalink / raw)
  To: gdb-patches

Hi Guys,

  I am checking in the patch below to tweak the aarch64 simulator a
  little bit, so that it uses the float version of the square root math
  library function when operating on float values.

Cheers
  Nick

sim/aarch64/ChangeLog
2016-07-21  Nick Clifton  <nickc@redhat.com>

	* simulator.c (fsqrts): Use fsqrt rather than sqrt.

diff --git a/sim/aarch64/simulator.c b/sim/aarch64/simulator.c
index 7c15e7a..45844e2 100644
--- a/sim/aarch64/simulator.c
+++ b/sim/aarch64/simulator.c
@@ -7754,7 +7754,7 @@ fsqrts (sim_cpu *cpu)
   unsigned sd = INSTR (4, 0);
 
   TRACE_DECODE (cpu, "emulated at line %d", __LINE__);
-  aarch64_set_FP_float (cpu, sd, sqrt (aarch64_get_FP_float (cpu, sn)));
+  aarch64_set_FP_float (cpu, sd, sqrtf (aarch64_get_FP_float (cpu, sn)));
 }
 
 /* Double square root.  */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Commit: AArch64 sim: Use fsqrt for floating point square root.
  2016-07-21  8:17 Commit: AArch64 sim: Use fsqrt for floating point square root Nick Clifton
@ 2016-07-21  8:20 ` Andreas Schwab
  2016-07-21  8:24   ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2016-07-21  8:20 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gdb-patches

Nick Clifton <nickc@redhat.com> writes:

> 	* simulator.c (fsqrts): Use fsqrt rather than sqrt.

s/fsqrt/sqrtf/

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Commit: AArch64 sim: Use fsqrt for floating point square root.
  2016-07-21  8:20 ` Andreas Schwab
@ 2016-07-21  8:24   ` Nick Clifton
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2016-07-21  8:24 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

Hi Andreas,

>> 	* simulator.c (fsqrts): Use fsqrt rather than sqrt.
> 
> s/fsqrt/sqrtf/

Doh!  Thanks - fixed.

Cheers
  Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-21  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21  8:17 Commit: AArch64 sim: Use fsqrt for floating point square root Nick Clifton
2016-07-21  8:20 ` Andreas Schwab
2016-07-21  8:24   ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).