diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-11-06 16:04:03 +0100 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-11-06 16:04:03 +0100 |
commit | 1cfb73dbb7503d1cfb088c14d1125a5030a1f386 (patch) | |
tree | a3446d08987ce758763ba739f3b8cb09d0f260db /gdb/dfp.h | |
parent | b07e9c466ed24af614090ac42d6730a291608f69 (diff) | |
download | fsf-binutils-gdb-1cfb73dbb7503d1cfb088c14d1125a5030a1f386.zip fsf-binutils-gdb-1cfb73dbb7503d1cfb088c14d1125a5030a1f386.tar.gz fsf-binutils-gdb-1cfb73dbb7503d1cfb088c14d1125a5030a1f386.tar.bz2 |
Target FP: Merge doublest.c and dfp.c into target-float.c
Now that all target FP operations are performed via target-float.c,
this file remains the sole caller of functions in doublest.c and dfp.c.
Therefore, this patch merges the latter files into the former and
makes all their function static there.
gdb/ChangeLog:
2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
* Makefile.in (SFILES): Remove doublest.c and dfp.c.
(HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
(COMMON_OBS): Remove doublest.o and dfp.o.
Do not build target-float.c (instead of doublest.c)
with -Wformat-nonliteral.
* doublest.c: Remove file.
* doublest.h: Remove file.
* dfp.c: Remove file.
* dfp.h: Remove file.
* target-float.c: Do not include "doublest.h" and "dfp.h".
(DOUBLEST): Move here from doublest.h.
(enum float_kind): Likewise.
(FLOATFORMAT_CHAR_BIT): Likewise.
(FLOATFORMAT_LARGEST_BYTES): Likewise.
(floatformat_totalsize_bytes): Move here from doublest.c. Make static.
(floatformat_precision): Likewise.
(floatformat_normalize_byteorder, get_field, put_field): Likewise.
(floatformat_is_negative, floatformat_classify, floatformat_mantissa):
Likewise.
(host_float_format, host_double_format, host_long_double_format):
Likewise.
(floatformat_to_string, floatformat_from_string): Likewise.
(floatformat_to_doublest): Likewise. Also, inline the original
convert_floatformat_to_doublest.
(floatformat_from_doublest): Likewise. Also, inline the original
convert_floatformat_from_doublest.
Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
(MAX_DECIMAL_STRING): Move here from dfp.c.
(match_endianness): Likewise.
(set_decnumber_context, decimal_check_errors): Likewise.
(decimal_from_number, decimal_to_number): Likewise.
(decimal_to_string, decimal_from_string): Likewise. Make static.
(decimal_from_longest, decimal_from_ulongest): Likewise.
(decimal_to_longest): Likewise.
(decimal_binop, decimal_is_zero, decimal_compare): Likewise.
(decimal_convert): Likewise.
Diffstat (limited to 'gdb/dfp.h')
-rw-r--r-- | gdb/dfp.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/gdb/dfp.h b/gdb/dfp.h deleted file mode 100644 index af52fa2..0000000 --- a/gdb/dfp.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Decimal floating point support for GDB. - - Copyright (C) 2007-2017 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -/* Decimal floating point is one of the extension to IEEE 754, which is - described in http://grouper.ieee.org/groups/754/revision.html and - http://www2.hursley.ibm.com/decimal/. It completes binary floating - point by representing floating point more exactly. */ - -#ifndef DFP_H -#define DFP_H - -#include "expression.h" /* For enum exp_opcode. */ - -extern std::string decimal_to_string (const gdb_byte *, int, enum bfd_endian, - const char *format = nullptr); -extern bool decimal_from_string (gdb_byte *, int, enum bfd_endian, - const std::string &string); -extern void decimal_from_longest (LONGEST from, gdb_byte *to, - int len, enum bfd_endian byte_order); -extern void decimal_from_ulongest (ULONGEST from, gdb_byte *to, - int len, enum bfd_endian byte_order); -extern LONGEST decimal_to_longest (const gdb_byte *from, int len, - enum bfd_endian byte_order); -extern void decimal_binop (enum exp_opcode, - const gdb_byte *, int, enum bfd_endian, - const gdb_byte *, int, enum bfd_endian, - gdb_byte *, int, enum bfd_endian); -extern int decimal_is_zero (const gdb_byte *, int, enum bfd_endian); -extern int decimal_compare (const gdb_byte *, int, enum bfd_endian, - const gdb_byte *, int, enum bfd_endian); -extern void decimal_convert (const gdb_byte *, int, enum bfd_endian, - gdb_byte *, int, enum bfd_endian); - -#endif |