Automatic date update in version.in
[binutils-gdb/blckswan.git] / gdb / target-float.h
blobe1a2b81df91771a6dcc880a9d73b372d84b1c8e1
1 /* Floating point definitions for GDB.
3 Copyright (C) 1986-2022 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef TARGET_FLOAT_H
21 #define TARGET_FLOAT_H
23 #include "expression.h"
25 extern bool target_float_is_valid (const gdb_byte *addr,
26 const struct type *type);
27 extern bool target_float_is_zero (const gdb_byte *addr,
28 const struct type *type);
30 extern std::string target_float_to_string (const gdb_byte *addr,
31 const struct type *type,
32 const char *format = nullptr);
33 extern bool target_float_from_string (gdb_byte *addr,
34 const struct type *type,
35 const std::string &string);
37 extern LONGEST target_float_to_longest (const gdb_byte *addr,
38 const struct type *type);
39 extern void target_float_from_longest (gdb_byte *addr,
40 const struct type *type,
41 LONGEST val);
42 extern void target_float_from_ulongest (gdb_byte *addr,
43 const struct type *type,
44 ULONGEST val);
45 extern double target_float_to_host_double (const gdb_byte *addr,
46 const struct type *type);
47 extern void target_float_from_host_double (gdb_byte *addr,
48 const struct type *type,
49 double val);
50 extern void target_float_convert (const gdb_byte *from,
51 const struct type *from_type,
52 gdb_byte *to, const struct type *to_type);
54 extern void target_float_binop (enum exp_opcode opcode,
55 const gdb_byte *x, const struct type *type_x,
56 const gdb_byte *y, const struct type *type_y,
57 gdb_byte *res, const struct type *type_res);
58 extern int target_float_compare (const gdb_byte *x, const struct type *type_x,
59 const gdb_byte *y, const struct type *type_y);
61 #endif /* TARGET_FLOAT_H */