summaryrefslogtreecommitdiff
path: root/gdb/rs6000-lynx178-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 11:05:21 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 11:05:21 -0400
commitdf86565b31bf12aab6fdceade49169bc6f378b13 (patch)
tree76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/rs6000-lynx178-tdep.c
parentb6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff)
downloadbinutils-gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.gz
gdb: remove TYPE_LENGTH
Remove the macro, replace all uses with calls to type::length. Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb
Diffstat (limited to 'gdb/rs6000-lynx178-tdep.c')
-rw-r--r--gdb/rs6000-lynx178-tdep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/rs6000-lynx178-tdep.c b/gdb/rs6000-lynx178-tdep.c
index dc13dd3fa73..c234a93c8d8 100644
--- a/gdb/rs6000-lynx178-tdep.c
+++ b/gdb/rs6000-lynx178-tdep.c
@@ -94,7 +94,7 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
arg = args[argno];
type = check_typedef (value_type (arg));
- len = TYPE_LENGTH (type);
+ len = type->length ();
if (type->code () == TYPE_CODE_FLT)
{
@@ -184,7 +184,7 @@ ran_out_of_registers_for_arguments:
{
struct value *val = args[jj];
- space += align_up (TYPE_LENGTH (value_type (val)), 4);
+ space += align_up (value_type (val)->length (), 4);
}
/* Add location required for the rest of the parameters. */
@@ -218,7 +218,7 @@ ran_out_of_registers_for_arguments:
arg = args[argno];
type = check_typedef (value_type (arg));
- len = TYPE_LENGTH (type);
+ len = type->length ();
/* Float types should be passed in fpr's, as well as in the
@@ -276,7 +276,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
/* AltiVec extension: Functions that declare a vector data type as a
return value place that return value in VR2. */
if (valtype->code () == TYPE_CODE_ARRAY && valtype->is_vector ()
- && TYPE_LENGTH (valtype) == 16)
+ && valtype->length () == 16)
{
if (readbuf)
regcache->cooked_read (tdep->ppc_vr0_regnum + 2, readbuf);
@@ -301,7 +301,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
complex*8 and complex*16 are returned in FPR1:FPR2, and
complex*32 is returned in FPR1:FPR4. */
if (valtype->code () == TYPE_CODE_FLT
- && (TYPE_LENGTH (valtype) == 4 || TYPE_LENGTH (valtype) == 8))
+ && (valtype->length () == 4 || valtype->length () == 8))
{
struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum);
gdb_byte regval[8];
@@ -328,7 +328,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
lengths less than or equal to 32 bits, must be returned right
justified in GPR3 with signed values sign extended and unsigned
values zero extended, as necessary. */
- if (TYPE_LENGTH (valtype) <= tdep->wordsize)
+ if (valtype->length () <= tdep->wordsize)
{
if (readbuf)
{
@@ -337,7 +337,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
/* For reading we don't have to worry about sign extension. */
regcache_cooked_read_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
&regval);
- store_unsigned_integer (readbuf, TYPE_LENGTH (valtype), byte_order,
+ store_unsigned_integer (readbuf, valtype->length (), byte_order,
regval);
}
if (writebuf)
@@ -354,7 +354,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function,
/* Eight-byte non-floating-point scalar values must be returned in
GPR3:GPR4. */
- if (TYPE_LENGTH (valtype) == 8)
+ if (valtype->length () == 8)
{
gdb_assert (valtype->code () != TYPE_CODE_FLT);
gdb_assert (tdep->wordsize == 4);