const T *from, gdb_byte *to) const
{
/* Ensure possible padding bytes in the target buffer are zeroed out. */
- memset (to, 0, TYPE_LENGTH (type));
+ memset (to, 0, type->length ());
to_target (floatformat_from_type (type), from, to);
}
const gdb_mpfr &from, gdb_byte *to) const
{
/* Ensure possible padding bytes in the target buffer are zeroed out. */
- memset (to, 0, TYPE_LENGTH (type));
+ memset (to, 0, type->length ());
to_target (floatformat_from_type (type), from, to);
}
{
gdb_assert (type->code () == TYPE_CODE_DECFLOAT);
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
int i;
#if WORDS_BIGENDIAN
{
gdb_assert (type->code () == TYPE_CODE_DECFLOAT);
- switch (TYPE_LENGTH (type))
+ switch (type->length ())
{
case 4:
decContextDefault (ctx, DEC_INIT_DECIMAL32);
set_decnumber_context (&set, type);
- switch (TYPE_LENGTH (type))
+ switch (type->length ())
{
case 4:
decimal32FromNumber ((decimal32 *) dec, from, &set);
gdb_byte dec[16];
match_endianness (addr, type, dec);
- switch (TYPE_LENGTH (type))
+ switch (type->length ())
{
case 4:
decimal32ToNumber ((decimal32 *) dec, to);
std::string result;
result.resize (MAX_DECIMAL_STRING);
- switch (TYPE_LENGTH (type))
+ switch (type->length ())
{
case 4:
decimal32ToString ((decimal32 *) dec, &result[0]);
set_decnumber_context (&set, type);
- switch (TYPE_LENGTH (type))
+ switch (type->length ())
{
case 4:
decimal32FromString ((decimal32 *) dec, string.c_str (), &set);
decimal_to_number (y, type_y, &number2);
/* Perform the comparison in the larger of the two sizes. */
- type_result = TYPE_LENGTH (type_x) > TYPE_LENGTH (type_y) ? type_x : type_y;
+ type_result = type_x->length () > type_y->length () ? type_x : type_y;
set_decnumber_context (&set, type_result);
decNumberCompare (&result, &number1, &number2, &set);
return floatformat_from_type (type1) == floatformat_from_type (type2);
case TYPE_CODE_DECFLOAT:
- return (TYPE_LENGTH (type1) == TYPE_LENGTH (type2)
+ return (type1->length () == type2->length ()
&& (type_byte_order (type1)
== type_byte_order (type2)));
return floatformat_totalsize_bytes (floatformat_from_type (type));
case TYPE_CODE_DECFLOAT:
- return TYPE_LENGTH (type);
+ return type->length ();
default:
gdb_assert_not_reached ("unexpected type code");
/* The floating-point formats match, so we simply copy the data, ensuring
possible padding bytes in the target buffer are zeroed out. */
- memset (to, 0, TYPE_LENGTH (to_type));
+ memset (to, 0, to_type->length ());
memcpy (to, from, target_float_format_length (to_type));
}