Target FP: Add string routines to target-float.{c,h}
[deliverable/binutils-gdb.git] / gdb / gdbarch-selftests.c
index 58ed11287a0c3bef9e5a678f89d6d301fc4d4431..c748fcc6606ac0b5dbf3372ade48a5ff8b6a3c18 100644 (file)
@@ -24,6 +24,7 @@
 #include "inferior.h"
 #include "gdbthread.h"
 #include "target.h"
+#include "target-float.h"
 
 namespace selftests {
 
@@ -178,11 +179,8 @@ register_to_value_test (struct gdbarch *gdbarch)
 
              if (TYPE_CODE (type) == TYPE_CODE_FLT)
                {
-                 DOUBLEST d = 1.25;
-
                  /* Generate valid float format.  */
-                 floatformat_from_doublest (floatformat_from_type (type),
-                                            &d, expected.data ());
+                 target_float_from_string (expected.data (), type, "1.25");
                }
              else
                {
This page took 0.024024 seconds and 4 git commands to generate.