Target FP: Perform Ada fixed-point scaling in target format
[deliverable/binutils-gdb.git] / gdb / target-float.h
CommitLineData
70100014
UW
1/* Floating point definitions for GDB.
2
3 Copyright (C) 1986-2017 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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.
11
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.
16
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/>. */
19
20#ifndef TYPED_FLOAT_H
21#define TYPED_FLOAT_H
22
66c02b9e
UW
23#include "expression.h"
24
70100014
UW
25extern bool target_float_is_valid (const gdb_byte *addr,
26 const struct type *type);
27extern bool target_float_is_zero (const gdb_byte *addr,
28 const struct type *type);
29
f69fdf9b
UW
30extern std::string target_float_to_string (const gdb_byte *addr,
31 const struct type *type,
32 const char *format = nullptr);
33extern bool target_float_from_string (gdb_byte *addr,
34 const struct type *type,
35 const std::string &string);
36
50637b26
UW
37extern LONGEST target_float_to_longest (const gdb_byte *addr,
38 const struct type *type);
39extern void target_float_from_longest (gdb_byte *addr,
40 const struct type *type,
41 LONGEST val);
42extern void target_float_from_ulongest (gdb_byte *addr,
43 const struct type *type,
44 ULONGEST val);
45extern void target_float_convert (const gdb_byte *from,
46 const struct type *from_type,
47 gdb_byte *to, const struct type *to_type);
48
66c02b9e
UW
49extern void target_float_binop (enum exp_opcode opcode,
50 const gdb_byte *x, const struct type *type_x,
51 const gdb_byte *y, const struct type *type_y,
52 gdb_byte *res, const struct type *type_res);
53extern int target_float_compare (const gdb_byte *x, const struct type *type_x,
54 const gdb_byte *y, const struct type *type_y);
55
70100014 56#endif
This page took 0.033305 seconds and 4 git commands to generate.