GDB (xrefs)
|
#include "defs.h"
#include "expression.h"
#include "gdbtypes.h"
#include "value.h"
#include "dfp.h"
#include "dpd/decimal128.h"
#include "dpd/decimal64.h"
#include "dpd/decimal32.h"
Go to the source code of this file.
Defines | |
#define | OPPOSITE_BYTE_ORDER BFD_ENDIAN_BIG |
Functions | |
static void | match_endianness (const gdb_byte *from, int len, enum bfd_endian byte_order, gdb_byte *to) |
static void | set_decnumber_context (decContext *ctx, int len) |
static void | decimal_check_errors (decContext *ctx) |
static void | decimal_from_number (const decNumber *from, gdb_byte *to, int len) |
static void | decimal_to_number (const gdb_byte *from, int len, decNumber *to) |
void | decimal_to_string (const gdb_byte *decbytes, int len, enum bfd_endian byte_order, char *s) |
int | decimal_from_string (gdb_byte *decbytes, int len, enum bfd_endian byte_order, const char *string) |
void | decimal_from_integral (struct value *from, gdb_byte *to, int len, enum bfd_endian byte_order) |
void | decimal_from_floating (struct value *from, gdb_byte *to, int len, enum bfd_endian byte_order) |
DOUBLEST | decimal_to_doublest (const gdb_byte *from, int len, enum bfd_endian byte_order) |
void | decimal_binop (enum exp_opcode op, const gdb_byte *x, int len_x, enum bfd_endian byte_order_x, const gdb_byte *y, int len_y, enum bfd_endian byte_order_y, gdb_byte *result, int len_result, enum bfd_endian byte_order_result) |
int | decimal_is_zero (const gdb_byte *x, int len, enum bfd_endian byte_order) |
int | decimal_compare (const gdb_byte *x, int len_x, enum bfd_endian byte_order_x, const gdb_byte *y, int len_y, enum bfd_endian byte_order_y) |
void | decimal_convert (const gdb_byte *from, int len_from, enum bfd_endian byte_order_from, gdb_byte *to, int len_to, enum bfd_endian byte_order_to) |
#define OPPOSITE_BYTE_ORDER BFD_ENDIAN_BIG |
Referenced by match_endianness().
void decimal_binop | ( | enum exp_opcode | op, |
const gdb_byte * | x, | ||
int | len_x, | ||
enum bfd_endian | byte_order_x, | ||
const gdb_byte * | y, | ||
int | len_y, | ||
enum bfd_endian | byte_order_y, | ||
gdb_byte * | result, | ||
int | len_result, | ||
enum bfd_endian | byte_order_result | ||
) |
Definition at line 269 of file dfp.c.
References _, decimal_check_errors(), decimal_from_number(), decimal_to_number(), internal_error(), match_endianness(), and set_decnumber_context().
Referenced by scalar_binop().
static void decimal_check_errors | ( | decContext * | ctx | ) | [static] |
Definition at line 81 of file dfp.c.
Referenced by decimal_binop(), decimal_compare(), and decimal_from_string().
int decimal_compare | ( | const gdb_byte * | x, |
int | len_x, | ||
enum bfd_endian | byte_order_x, | ||
const gdb_byte * | y, | ||
int | len_y, | ||
enum bfd_endian | byte_order_y | ||
) |
Definition at line 335 of file dfp.c.
References _, decimal_check_errors(), decimal_to_number(), error(), match_endianness(), and set_decnumber_context().
Referenced by value_equal(), and value_less().
void decimal_convert | ( | const gdb_byte * | from, |
int | len_from, | ||
enum bfd_endian | byte_order_from, | ||
gdb_byte * | to, | ||
int | len_to, | ||
enum bfd_endian | byte_order_to | ||
) |
Definition at line 371 of file dfp.c.
References decimal_from_number(), decimal_to_number(), and match_endianness().
Referenced by printf_decfloat(), and value_cast().
void decimal_from_floating | ( | struct value * | from, |
gdb_byte * | to, | ||
int | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 241 of file dfp.c.
References decimal_from_string(), DOUBLEST_PRINT_FORMAT, value_as_double(), xfree(), and xstrprintf().
Referenced by value_cast().
void decimal_from_integral | ( | struct value * | from, |
gdb_byte * | to, | ||
int | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 209 of file dfp.c.
References _, check_typedef(), decimal_from_number(), error(), LONGEST, match_endianness(), type, TYPE_LENGTH, TYPE_UNSIGNED, value_as_long(), and value_type().
Referenced by value_args_as_decimal(), and value_cast().
static void decimal_from_number | ( | const decNumber * | from, |
gdb_byte * | to, | ||
int | len | ||
) | [static] |
Definition at line 100 of file dfp.c.
References set_decnumber_context().
Referenced by decimal_binop(), decimal_convert(), and decimal_from_integral().
int decimal_from_string | ( | gdb_byte * | decbytes, |
int | len, | ||
enum bfd_endian | byte_order, | ||
const char * | string | ||
) |
Definition at line 174 of file dfp.c.
References _, decimal_check_errors(), error(), match_endianness(), and set_decnumber_context().
Referenced by decimal_from_floating(), parse_number(), printf_decfloat(), and value_one().
int decimal_is_zero | ( | const gdb_byte * | x, |
int | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 320 of file dfp.c.
References decimal_to_number(), and match_endianness().
Referenced by value_logical_not().
DOUBLEST decimal_to_doublest | ( | const gdb_byte * | from, |
int | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 255 of file dfp.c.
References decimal_to_string(), and MAX_DECIMAL_STRING.
Referenced by unpack_double(), and unpack_long().
static void decimal_to_number | ( | const gdb_byte * | from, |
int | len, | ||
decNumber * | to | ||
) | [static] |
Definition at line 123 of file dfp.c.
Referenced by decimal_binop(), decimal_compare(), decimal_convert(), and decimal_is_zero().
void decimal_to_string | ( | const gdb_byte * | decbytes, |
int | len, | ||
enum bfd_endian | byte_order, | ||
char * | s | ||
) |
Definition at line 146 of file dfp.c.
References _, error(), and match_endianness().
Referenced by decimal_to_doublest(), print_decimal_floating(), and printf_decfloat().
static void match_endianness | ( | const gdb_byte * | from, |
int | len, | ||
enum bfd_endian | byte_order, | ||
gdb_byte * | to | ||
) | [static] |
Definition at line 37 of file dfp.c.
References len, and OPPOSITE_BYTE_ORDER.
Referenced by decimal_binop(), decimal_compare(), decimal_convert(), decimal_from_integral(), decimal_from_string(), decimal_is_zero(), and decimal_to_string().
static void set_decnumber_context | ( | decContext * | ctx, |
int | len | ||
) | [static] |
Definition at line 61 of file dfp.c.
Referenced by decimal_binop(), decimal_compare(), decimal_from_number(), and decimal_from_string().