summaryrefslogtreecommitdiff
path: root/gdb/h8300-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
commit7813437494ac39f3aef392d06ed5416e84fe386b (patch)
tree15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/h8300-tdep.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadbinutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 79c74001bc8..3c2f502a124 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