GDB (xrefs)
|
#include "defs.h"
#include "doublest.h"
#include "floatformat.h"
#include "gdbtypes.h"
#include <math.h>
Go to the source code of this file.
Macros | |
#define | FLOATFORMAT_CHAR_BIT 8 |
#define | FLOATFORMAT_LARGEST_BYTES 16 |
Functions | |
static unsigned long | get_field (const bfd_byte *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len) |
static enum floatformat_byteorders | floatformat_normalize_byteorder (const struct floatformat *fmt, const void *from, void *to) |
static void | convert_floatformat_to_doublest (const struct floatformat *fmt, const void *from, DOUBLEST *to) |
static void | put_field (unsigned char *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len, unsigned long stuff_to_put) |
static void | convert_doublest_to_floatformat (const struct floatformat *fmt, const DOUBLEST *from, void *to) |
int | floatformat_is_negative (const struct floatformat *fmt, const bfd_byte *uval) |
enum float_kind | floatformat_classify (const struct floatformat *fmt, const bfd_byte *uval) |
const char * | floatformat_mantissa (const struct floatformat *fmt, const bfd_byte *val) |
void | floatformat_to_doublest (const struct floatformat *fmt, const void *in, DOUBLEST *out) |
void | floatformat_from_doublest (const struct floatformat *fmt, const DOUBLEST *in, void *out) |
static const struct floatformat * | floatformat_from_length (struct gdbarch *gdbarch, int len) |
const struct floatformat * | floatformat_from_type (const struct type *type) |
DOUBLEST | extract_typed_floating (const void *addr, const struct type *type) |
void | store_typed_floating (void *addr, const struct type *type, DOUBLEST val) |
void | convert_typed_floating (const void *from, const struct type *from_type, void *to, const struct type *to_type) |
Variables | |
static const struct floatformat * | host_float_format = GDB_HOST_FLOAT_FORMAT |
static const struct floatformat * | host_double_format = GDB_HOST_DOUBLE_FORMAT |
static const struct floatformat * | host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT |
#define FLOATFORMAT_CHAR_BIT 8 |
Definition at line 35 of file doublest.c.
Referenced by convert_doublest_to_floatformat(), convert_floatformat_to_doublest(), floatformat_classify(), floatformat_is_negative(), floatformat_mantissa(), floatformat_normalize_byteorder(), get_field(), and put_field().
#define FLOATFORMAT_LARGEST_BYTES 16 |
Definition at line 39 of file doublest.c.
Referenced by convert_doublest_to_floatformat(), convert_floatformat_to_doublest(), floatformat_classify(), floatformat_is_negative(), and floatformat_mantissa().
|
static |
Definition at line 343 of file doublest.c.
References FLOATFORMAT_CHAR_BIT, floatformat_from_doublest(), FLOATFORMAT_LARGEST_BYTES, floatformat_normalize_byteorder(), L, gdb.printing::long, and put_field().
Referenced by floatformat_from_doublest().
|
static |
Definition at line 165 of file doublest.c.
References float_infinite, float_nan, FLOATFORMAT_CHAR_BIT, floatformat_classify(), FLOATFORMAT_LARGEST_BYTES, floatformat_normalize_byteorder(), floatformat_to_doublest(), gdb_assert, get_field(), and min.
Referenced by floatformat_to_doublest().
void convert_typed_floating | ( | const void * | from, |
const struct type * | from_type, | ||
void * | to, | ||
const struct type * | to_type | ||
) |
Definition at line 862 of file doublest.c.
References _, floatformat_from_doublest(), floatformat_from_type(), floatformat_to_doublest(), min, TYPE_LENGTH, and warning().
Referenced by do_ppc_sysv_return_value(), i386_extract_return_value(), i386_store_return_value(), i387_register_to_value(), i387_value_to_register(), ia64_extract_return_value(), ia64_push_dummy_call(), ia64_register_to_value(), ia64_store_return_value(), ia64_value_to_register(), m68k_register_to_value(), m68k_svr4_extract_return_value(), m68k_svr4_store_return_value(), m68k_value_to_register(), ppc64_sysv_abi_push_freg(), ppc64_sysv_abi_return_value_base(), ppc_sysv_abi_push_dummy_call(), rs6000_lynx178_push_dummy_call(), rs6000_lynx178_return_value(), rs6000_push_dummy_call(), rs6000_register_to_value(), rs6000_return_value(), and rs6000_value_to_register().
Definition at line 817 of file doublest.c.
References floatformat_from_type(), and floatformat_to_doublest().
Referenced by print_i387_value(), sh64_register_convert_to_raw(), sh_register_convert_to_raw(), unpack_double(), and unpack_long().
enum float_kind floatformat_classify | ( | const struct floatformat * | fmt, |
const bfd_byte * | uval | ||
) |
Definition at line 532 of file doublest.c.
References float_infinite, float_nan, float_normal, float_subnormal, float_zero, FLOATFORMAT_CHAR_BIT, FLOATFORMAT_LARGEST_BYTES, floatformat_normalize_byteorder(), gdb_assert, get_field(), and min.
Referenced by convert_floatformat_to_doublest(), and print_floating().
Definition at line 727 of file doublest.c.
References convert_doublest_to_floatformat(), gdb_assert, host_double_format, host_float_format, and host_long_double_format.
Referenced by convert_doublest_to_floatformat(), convert_from_extended(), convert_to_extended(), convert_typed_floating(), sh64_register_convert_to_raw(), sh_register_convert_to_raw(), and store_typed_floating().
|
static |
Definition at line 768 of file doublest.c.
References _, error(), gdbarch_byte_order(), gdbarch_double_bit(), gdbarch_double_format(), gdbarch_float_bit(), gdbarch_float_format(), gdbarch_half_bit(), gdbarch_half_format(), gdbarch_long_double_bit(), gdbarch_long_double_format(), and TARGET_CHAR_BIT.
Referenced by floatformat_from_type().
Definition at line 802 of file doublest.c.
References floatformat_from_length(), gdb_assert, gdbarch_byte_order(), get_type_arch(), TYPE_CODE, TYPE_CODE_FLT, TYPE_FLOATFORMAT, and TYPE_LENGTH.
Referenced by arm_extract_return_value(), arm_store_return_value(), convert_typed_floating(), extract_typed_floating(), print_floating(), store_typed_floating(), and unpack_double().
Definition at line 506 of file doublest.c.
References FLOATFORMAT_CHAR_BIT, FLOATFORMAT_LARGEST_BYTES, floatformat_normalize_byteorder(), gdb_assert, and get_field().
Referenced by print_floating().
Definition at line 619 of file doublest.c.
References FLOATFORMAT_CHAR_BIT, FLOATFORMAT_LARGEST_BYTES, floatformat_normalize_byteorder(), gdb_assert, get_field(), len, and xsnprintf().
Referenced by print_floating().
|
static |
Definition at line 113 of file doublest.c.
References FLOATFORMAT_CHAR_BIT, and gdb_assert.
Referenced by convert_doublest_to_floatformat(), convert_floatformat_to_doublest(), floatformat_classify(), floatformat_is_negative(), and floatformat_mantissa().
Definition at line 697 of file doublest.c.
References convert_floatformat_to_doublest(), gdb_assert, host_double_format, host_float_format, and host_long_double_format.
Referenced by convert_floatformat_to_doublest(), convert_from_extended(), convert_to_extended(), convert_typed_floating(), extract_typed_floating(), sh64_extract_return_value(), sh64_register_convert_to_virtual(), and sh_register_convert_to_virtual().
|
static |
Definition at line 44 of file doublest.c.
References FLOATFORMAT_CHAR_BIT, gdb_assert, len, and gdb.printing::long.
Referenced by convert_floatformat_to_doublest(), floatformat_classify(), floatformat_is_negative(), and floatformat_mantissa().
|
static |
Definition at line 277 of file doublest.c.
References FLOATFORMAT_CHAR_BIT, gdb_assert, and len.
Referenced by convert_doublest_to_floatformat().
Definition at line 830 of file doublest.c.
References floatformat_from_doublest(), floatformat_from_type(), and TYPE_LENGTH.
Referenced by define_symbol(), scalar_binop(), sh64_extract_return_value(), sh64_register_convert_to_virtual(), sh_register_convert_to_virtual(), and value_from_double().
|
static |
Definition at line 692 of file doublest.c.
Referenced by floatformat_from_doublest(), and floatformat_to_doublest().
|
static |
Definition at line 691 of file doublest.c.
Referenced by floatformat_from_doublest(), and floatformat_to_doublest().
|
static |
Definition at line 694 of file doublest.c.
Referenced by floatformat_from_doublest(), and floatformat_to_doublest().