diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
commit | 7813437494ac39f3aef392d06ed5416e84fe386b (patch) | |
tree | 15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/rs6000-lynx178-tdep.c | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | fsf-binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip fsf-binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz fsf-binutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2 |
gdb: remove TYPE_CODE macro
Remove TYPE_CODE, changing all the call sites to use type::code
directly. This is quite a big diff, but this was mostly done using sed
and coccinelle. A few call sites were done by hand.
gdb/ChangeLog:
* gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
type::code instead.
Diffstat (limited to 'gdb/rs6000-lynx178-tdep.c')
-rw-r--r-- | gdb/rs6000-lynx178-tdep.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/rs6000-lynx178-tdep.c b/gdb/rs6000-lynx178-tdep.c index 0a20a17..7f1825d 100644 --- a/gdb/rs6000-lynx178-tdep.c +++ b/gdb/rs6000-lynx178-tdep.c @@ -96,7 +96,7 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch, type = check_typedef (value_type (arg)); len = TYPE_LENGTH (type); - if (TYPE_CODE (type) == TYPE_CODE_FLT) + if (type->code () == TYPE_CODE_FLT) { /* Floating point arguments are passed in fpr's, as well as gpr's. @@ -222,7 +222,7 @@ ran_out_of_registers_for_arguments: /* Float types should be passed in fpr's, as well as in the stack. */ - if (TYPE_CODE (type) == TYPE_CODE_FLT && f_argno < 13) + if (type->code () == TYPE_CODE_FLT && f_argno < 13) { gdb_assert (len <= 8); @@ -274,7 +274,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 (TYPE_CODE (valtype) == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype) + if (valtype->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype) && TYPE_LENGTH (valtype) == 16) { if (readbuf) @@ -290,16 +290,16 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function, allocated buffer into which the callee is assumed to store its return value. All explicit parameters are appropriately relabeled. */ - if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT - || TYPE_CODE (valtype) == TYPE_CODE_UNION - || TYPE_CODE (valtype) == TYPE_CODE_ARRAY) + if (valtype->code () == TYPE_CODE_STRUCT + || valtype->code () == TYPE_CODE_UNION + || valtype->code () == TYPE_CODE_ARRAY) return RETURN_VALUE_STRUCT_CONVENTION; /* Scalar floating-point values are returned in FPR1 for float or double, and in FPR1:FPR2 for quadword precision. Fortran complex*8 and complex*16 are returned in FPR1:FPR2, and complex*32 is returned in FPR1:FPR4. */ - if (TYPE_CODE (valtype) == TYPE_CODE_FLT + if (valtype->code () == TYPE_CODE_FLT && (TYPE_LENGTH (valtype) == 4 || TYPE_LENGTH (valtype) == 8)) { struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum); @@ -355,7 +355,7 @@ rs6000_lynx178_return_value (struct gdbarch *gdbarch, struct value *function, if (TYPE_LENGTH (valtype) == 8) { - gdb_assert (TYPE_CODE (valtype) != TYPE_CODE_FLT); + gdb_assert (valtype->code () != TYPE_CODE_FLT); gdb_assert (tdep->wordsize == 4); if (readbuf) |