GDB (API)
/home/stan/gdb/src/gdb/dfp.h
Go to the documentation of this file.
00001 /* Decimal floating point support for GDB.
00002 
00003    Copyright (C) 2007-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 /* Decimal floating point is one of the extension to IEEE 754, which is
00021    described in http://grouper.ieee.org/groups/754/revision.html and
00022    http://www2.hursley.ibm.com/decimal/.  It completes binary floating
00023    point by representing floating point more exactly.  */
00024 
00025 #ifndef DFP_H
00026 #define DFP_H
00027 
00028 /* When using decimal128, this is the maximum string length + 1
00029  * (value comes from libdecnumber's DECIMAL128_String constant).  */
00030 #define MAX_DECIMAL_STRING  43
00031 
00032 extern void decimal_to_string (const gdb_byte *, int, enum bfd_endian, char *);
00033 extern int decimal_from_string (gdb_byte *, int, enum bfd_endian,
00034                                 const char *);
00035 extern void decimal_from_integral (struct value *from, gdb_byte *to,
00036                                    int len, enum bfd_endian byte_order);
00037 extern void decimal_from_floating (struct value *from, gdb_byte *to,
00038                                    int len, enum bfd_endian byte_order);
00039 extern DOUBLEST decimal_to_doublest (const gdb_byte *from, int len,
00040                                      enum bfd_endian byte_order);
00041 extern void decimal_binop (enum exp_opcode,
00042                            const gdb_byte *, int, enum bfd_endian,
00043                            const gdb_byte *, int, enum bfd_endian,
00044                            gdb_byte *, int, enum bfd_endian);
00045 extern int decimal_is_zero (const gdb_byte *, int, enum bfd_endian);
00046 extern int decimal_compare (const gdb_byte *, int, enum bfd_endian,
00047                             const gdb_byte *, int, enum bfd_endian);
00048 extern void decimal_convert (const gdb_byte *, int, enum bfd_endian,
00049                              gdb_byte *, int, enum bfd_endian);
00050 
00051 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines