gdb/dfp.h - gdb

Macros defined

Source code

  1. /* Decimal floating point support for GDB.

  2.    Copyright (C) 2007-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. /* Decimal floating point is one of the extension to IEEE 754, which is
  15.    described in http://grouper.ieee.org/groups/754/revision.html and
  16.    http://www2.hursley.ibm.com/decimal/.  It completes binary floating
  17.    point by representing floating point more exactly.  */

  18. #ifndef DFP_H
  19. #define DFP_H

  20. /* When using decimal128, this is the maximum string length + 1
  21. * (value comes from libdecnumber's DECIMAL128_String constant).  */
  22. #define MAX_DECIMAL_STRING  43

  23. extern void decimal_to_string (const gdb_byte *, int, enum bfd_endian, char *);
  24. extern int decimal_from_string (gdb_byte *, int, enum bfd_endian,
  25.                                 const char *);
  26. extern void decimal_from_integral (struct value *from, gdb_byte *to,
  27.                                    int len, enum bfd_endian byte_order);
  28. extern void decimal_from_floating (struct value *from, gdb_byte *to,
  29.                                    int len, enum bfd_endian byte_order);
  30. extern DOUBLEST decimal_to_doublest (const gdb_byte *from, int len,
  31.                                      enum bfd_endian byte_order);
  32. extern void decimal_binop (enum exp_opcode,
  33.                            const gdb_byte *, int, enum bfd_endian,
  34.                            const gdb_byte *, int, enum bfd_endian,
  35.                            gdb_byte *, int, enum bfd_endian);
  36. extern int decimal_is_zero (const gdb_byte *, int, enum bfd_endian);
  37. extern int decimal_compare (const gdb_byte *, int, enum bfd_endian,
  38.                             const gdb_byte *, int, enum bfd_endian);
  39. extern void decimal_convert (const gdb_byte *, int, enum bfd_endian,
  40.                              gdb_byte *, int, enum bfd_endian);

  41. #endif