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/h8300-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/h8300-tdep.c')
-rw-r--r-- | gdb/h8300-tdep.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 79c7400..3c2f502 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -740,7 +740,7 @@ h8300_extract_return_value (struct type *type, struct regcache *regcache, store_unsigned_integer (valbuf + 2, 2, byte_order, c); break; case 8: /* long long is now 8 bytes. */ - if (TYPE_CODE (type) == TYPE_CODE_INT) + if (type->code () == TYPE_CODE_INT) { regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr); c = read_memory_unsigned_integer ((CORE_ADDR) addr, len, byte_order); @@ -771,7 +771,7 @@ h8300h_extract_return_value (struct type *type, struct regcache *regcache, store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c); break; case 8: /* long long is now 8 bytes. */ - if (TYPE_CODE (type) == TYPE_CODE_INT) + if (type->code () == TYPE_CODE_INT) { regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c); store_unsigned_integer (valbuf, 4, byte_order, c); @@ -792,8 +792,8 @@ h8300_use_struct_convention (struct type *value_type) /* Types of 1, 2 or 4 bytes are returned in R0/R1, everything else on the stack. */ - if (TYPE_CODE (value_type) == TYPE_CODE_STRUCT - || TYPE_CODE (value_type) == TYPE_CODE_UNION) + if (value_type->code () == TYPE_CODE_STRUCT + || value_type->code () == TYPE_CODE_UNION) return 1; return !(TYPE_LENGTH (value_type) == 1 || TYPE_LENGTH (value_type) == 2 @@ -805,14 +805,14 @@ h8300h_use_struct_convention (struct type *value_type) { /* Types of 1, 2 or 4 bytes are returned in R0, INT types of 8 bytes are returned in R0/R1, everything else on the stack. */ - if (TYPE_CODE (value_type) == TYPE_CODE_STRUCT - || TYPE_CODE (value_type) == TYPE_CODE_UNION) + if (value_type->code () == TYPE_CODE_STRUCT + || value_type->code () == TYPE_CODE_UNION) return 1; return !(TYPE_LENGTH (value_type) == 1 || TYPE_LENGTH (value_type) == 2 || TYPE_LENGTH (value_type) == 4 || (TYPE_LENGTH (value_type) == 8 - && TYPE_CODE (value_type) == TYPE_CODE_INT)); + && value_type->code () == TYPE_CODE_INT)); } /* Function: store_return_value |