int rawnum = mep_pseudo_to_raw[cookednum];
gdb_byte buf64[8];
- gdb_assert (TYPE_LENGTH (register_type (gdbarch, rawnum)) == sizeof (buf64));
- gdb_assert (TYPE_LENGTH (register_type (gdbarch, cookednum)) == 4);
+ gdb_assert (register_type (gdbarch, rawnum)->length () == sizeof (buf64));
+ gdb_assert (register_type (gdbarch, cookednum)->length () == 4);
status = regcache->raw_read (rawnum, buf64);
if (status == REG_VALID)
{
int rawnum = mep_pseudo_to_raw[cookednum];
gdb_byte buf64[8];
- gdb_assert (TYPE_LENGTH (register_type (gdbarch, rawnum)) == sizeof (buf64));
- gdb_assert (TYPE_LENGTH (register_type (gdbarch, cookednum)) == 4);
+ gdb_assert (register_type (gdbarch, rawnum)->length () == sizeof (buf64));
+ gdb_assert (register_type (gdbarch, cookednum)->length () == 4);
/* Slow, but legible. */
store_unsigned_integer (buf64, 8, byte_order,
extract_unsigned_integer (buf, 4, byte_order));
static int
mep_use_struct_convention (struct type *type)
{
- return (TYPE_LENGTH (type) > MEP_GPR_SIZE);
+ return (type->length () > MEP_GPR_SIZE);
}
/* Return values > MEP_GPR_SIZE bytes are returned in memory,
pointed to by R0. */
- gdb_assert (TYPE_LENGTH (type) <= MEP_GPR_SIZE);
+ gdb_assert (type->length () <= MEP_GPR_SIZE);
if (byte_order == BFD_ENDIAN_BIG)
- offset = MEP_GPR_SIZE - TYPE_LENGTH (type);
+ offset = MEP_GPR_SIZE - type->length ();
else
offset = 0;
/* Return values that do fit in a single register are returned in R0. */
- regcache->cooked_read_part (MEP_R0_REGNUM, offset, TYPE_LENGTH (type),
+ regcache->cooked_read_part (MEP_R0_REGNUM, offset, type->length (),
valbuf);
}
int byte_order = gdbarch_byte_order (arch);
/* Values that fit in a single register go in R0. */
- if (TYPE_LENGTH (type) <= MEP_GPR_SIZE)
+ if (type->length () <= MEP_GPR_SIZE)
{
/* Values that don't occupy a full register appear at the least
significant end of the value. This is the offset to where the
int offset;
if (byte_order == BFD_ENDIAN_BIG)
- offset = MEP_GPR_SIZE - TYPE_LENGTH (type);
+ offset = MEP_GPR_SIZE - type->length ();
else
offset = 0;
- regcache->cooked_write_part (MEP_R0_REGNUM, offset, TYPE_LENGTH (type),
+ regcache->cooked_write_part (MEP_R0_REGNUM, offset, type->length (),
valbuf);
}
returned in R0. Fetch R0's value and then read the memory
at that address. */
regcache_raw_read_unsigned (regcache, MEP_R0_REGNUM, &addr);
- read_memory (addr, readbuf, TYPE_LENGTH (type));
+ read_memory (addr, readbuf, type->length ());
}
if (writebuf)
{
for (i = 0; i < argc; i++)
{
- unsigned arg_len = TYPE_LENGTH (value_type (argv[i]));
+ unsigned arg_len = value_type (argv[i])->length ();
if (arg_len > MEP_GPR_SIZE)
{
ULONGEST value;
/* Arguments that fit in a GPR get expanded to fill the GPR. */
- if (TYPE_LENGTH (value_type (argv[i])) <= MEP_GPR_SIZE)
+ if (value_type (argv[i])->length () <= MEP_GPR_SIZE)
value = extract_unsigned_integer (value_contents (argv[i]).data (),
- TYPE_LENGTH (value_type (argv[i])),
+ value_type (argv[i])->length (),
byte_order);
/* Arguments too large to fit in a GPR get copied to the stack,