diff mbox

Commit: AArch64 sim: Use fsqrt for floating point square root.

Message ID 87lh0v9zh3.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton July 21, 2016, 8:17 a.m. UTC
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.

Comments

Andreas Schwab July 21, 2016, 8:19 a.m. UTC | #1
Nick Clifton <nickc@redhat.com> writes:

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

s/fsqrt/sqrtf/

Andreas.
Nick Clifton July 21, 2016, 8:24 a.m. UTC | #2
Hi Andreas,

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

Doh!  Thanks - fixed.

Cheers
  Nick
diff mbox

Patch

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.  */