aboutsummaryrefslogtreecommitdiff
path: root/gdb/dfp.c
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-06 16:02:33 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-06 16:02:33 +0100
commitb07e9c466ed24af614090ac42d6730a291608f69 (patch)
treecd800a1298a4333f68ab971b516017362029fa0b /gdb/dfp.c
parent3b2ca8248cae742c00cb4e94138edf1403d43d47 (diff)
downloadgdb-b07e9c466ed24af614090ac42d6730a291608f69.zip
gdb-b07e9c466ed24af614090ac42d6730a291608f69.tar.gz
gdb-b07e9c466ed24af614090ac42d6730a291608f69.tar.bz2
Target FP: Remove unused floating-point routines
This patch removes the following routines, which now have no remaining users in GDB: - extract_typed_floating - store_typed_floating - convert_typed_floating - decimal_from_doublest - decimal_to_doublest - value_as_double - unpack_double - value_from_double - value_from_decfloat This completes removal of DOUBLEST from all files except doublest.{c,h} and target-float.c. gdb/ChangeLog: 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com> * doublest.c: Do not include "gdbtypes.h". (extract_typed_floating): Remove. (store_typed_floating): Remove. (convert_typed_floating): Remove. * doublest.h (struct type): Remove. (DOUBLEST_PRINT_FORMAT): Remove. (DOUBLEST_SCAN_FORMAT): Remove. (extract_typed_floating): Remove. (store_typed_floating): Remove. (convert_typed_floating): Remove. * dfp.c (decimal_from_doublest): Remove. (decimal_to_doublest): Remove. * dfp.h: Do not include "doublest.h". (decimal_from_doublest): Remove. (decimal_to_doublest): Remove. * value.c: Do not include "doublest.h" and "dfp.h". (value_as_double): Remove. (unpack_double): Remove. (value_from_double): Remove. (value_from_decfloat): Remove. * value.h: Do not include "doublest.h". (value_as_double): Remove. (unpack_double): Remove. (value_from_double): Remove. (value_from_decfloat): Remove.
Diffstat (limited to 'gdb/dfp.c')
-rw-r--r--gdb/dfp.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/gdb/dfp.c b/gdb/dfp.c
index d470268..ec05134 100644
--- a/gdb/dfp.c
+++ b/gdb/dfp.c
@@ -268,29 +268,6 @@ decimal_to_longest (const gdb_byte *from, int len, enum bfd_endian byte_order)
return strtoll (str.c_str (), NULL, 10);
}
-/* Converts a value of a float type to a decimal float of
- specified LEN bytes.
-
- This is an ugly way to do the conversion, but libdecnumber does
- not offer a direct way to do it. */
-void
-decimal_from_doublest (DOUBLEST from,
- gdb_byte *to, int len, enum bfd_endian byte_order)
-{
- std::string str = string_printf ("%.30" DOUBLEST_PRINT_FORMAT, from);
- decimal_from_string (to, len, byte_order, str);
-}
-
-/* Converts a decimal float of LEN bytes to a double value. */
-DOUBLEST
-decimal_to_doublest (const gdb_byte *from, int len, enum bfd_endian byte_order)
-{
- /* This is an ugly way to do the conversion, but libdecnumber does
- not offer a direct way to do it. */
- std::string str = decimal_to_string (from, len, byte_order);
- return strtod (str.c_str (), NULL);
-}
-
/* Perform operation OP with operands X and Y with sizes LEN_X and LEN_Y
and byte orders BYTE_ORDER_X and BYTE_ORDER_Y, and store value in
RESULT with size LEN_RESULT and byte order BYTE_ORDER_RESULT. */