aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-07-21 09:17:54 +0100
committerNick Clifton <nickc@redhat.com>2016-07-21 09:19:24 +0100
commit0f118bc7a620f3e3ceff6f2fadca7b8d287a553b (patch)
treed63dcadcbbc90e82e04763a4b568fb23b8919250 /sim
parentb1b53fb3ef077bf4412da53f0057b9c0e9ed4f3e (diff)
downloadgdb-0f118bc7a620f3e3ceff6f2fadca7b8d287a553b.zip
gdb-0f118bc7a620f3e3ceff6f2fadca7b8d287a553b.tar.gz
gdb-0f118bc7a620f3e3ceff6f2fadca7b8d287a553b.tar.bz2
Use fsqrt() to calculate float (rather than double) square root.
* simulator.c (fsqrts): Use fsqrt rather than sqrt.
Diffstat (limited to 'sim')
-rw-r--r--sim/aarch64/ChangeLog4
-rw-r--r--sim/aarch64/simulator.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index 2d9a9d2..e58d8b2 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -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>
* cpustate.h: Include config.h.
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. */