This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]