Use fsqrt() to calculate float (rather than double) square root.

* simulator.c (fsqrts): Use fsqrt rather than sqrt.
This commit is contained in:
Nick Clifton 2016-07-21 09:17:54 +01:00
parent b1b53fb3ef
commit 0f118bc7a6
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2016-07-21 Nick Clifton <nickc@redhat.com>
* simulator.c (fsqrts): Use fsqrt rather than sqrt.
2016-06-30 Jim Wilson <jim.wilson@linaro.org> 2016-06-30 Jim Wilson <jim.wilson@linaro.org>
* cpustate.h: Include config.h. * cpustate.h: Include config.h.

View File

@ -7754,7 +7754,7 @@ fsqrts (sim_cpu *cpu)
unsigned sd = INSTR (4, 0); unsigned sd = INSTR (4, 0);
TRACE_DECODE (cpu, "emulated at line %d", __LINE__); 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. */ /* Double square root. */