diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:02 -0400 |
commit | 2062087b358cc5320d52b32c50866dbd08fb2631 (patch) | |
tree | bbf2de8f0df655ce90cbc94e2edbab7b0082919e /gdb/i386-tdep.c | |
parent | a409645d13f6cddef4827cf7240c01ec3e09559c (diff) | |
download | binutils-2062087b358cc5320d52b32c50866dbd08fb2631.zip binutils-2062087b358cc5320d52b32c50866dbd08fb2631.tar.gz binutils-2062087b358cc5320d52b32c50866dbd08fb2631.tar.bz2 |
gdb: add type::is_vector / type::set_is_vector
Add the `is_vector` and `set_is_vector` methods on `struct type`, in
order to remove the `TYPE_VECTOR` macro. In this patch, the macro is
changed to use the getter, so all the call sites of the macro that are
used as a setter are changed to use the setter method directly. The
next patch will remove the macro completely.
gdb/ChangeLog:
* gdbtypes.h (struct type) <is_vector, set_is_vector>: New methods.
(TYPE_VECTOR): Use type::is_vector, change all write call sites to
use type::set_is_vector.
Change-Id: I415e8d169f058662e0750329bfa4017bea3ca0cb
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 1b7971c..98aaa14 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3137,7 +3137,7 @@ i386_zmm_type (struct gdbarch *gdbarch) append_composite_type_field (t, "v4_int128", init_vector_type (bt->builtin_int128, 4)); - TYPE_VECTOR (t) = 1; + t->set_is_vector (true); t->set_name ("builtin_type_vec512i"); tdep->i386_zmm_type = t; } @@ -3193,7 +3193,7 @@ i386_ymm_type (struct gdbarch *gdbarch) append_composite_type_field (t, "v2_int128", init_vector_type (bt->builtin_int128, 2)); - TYPE_VECTOR (t) = 1; + t->set_is_vector (true); t->set_name ("builtin_type_vec256i"); tdep->i386_ymm_type = t; } @@ -3235,7 +3235,7 @@ i386_mmx_type (struct gdbarch *gdbarch) append_composite_type_field (t, "v8_int8", init_vector_type (bt->builtin_int8, 8)); - TYPE_VECTOR (t) = 1; + t->set_is_vector (true); t->set_name ("builtin_type_vec64i"); tdep->i386_mmx_type = t; } |