i386_16_byte_align_p (struct type *type)
{
type = check_typedef (type);
- if ((TYPE_CODE (type) == TYPE_CODE_DECFLOAT
- || (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)))
+ if ((type->code () == TYPE_CODE_DECFLOAT
+ || (type->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type)))
&& TYPE_LENGTH (type) == 16)
return 1;
- if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+ if (type->code () == TYPE_CODE_ARRAY)
return i386_16_byte_align_p (TYPE_TARGET_TYPE (type));
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_UNION)
+ if (type->code () == TYPE_CODE_STRUCT
+ || type->code () == TYPE_CODE_UNION)
{
int i;
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
{
if (i386_16_byte_align_p (TYPE_FIELD_TYPE (type, i)))
return 1;
int len = TYPE_LENGTH (type);
gdb_byte buf[I386_MAX_REGISTER_SIZE];
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ if (type->code () == TYPE_CODE_FLT)
{
if (tdep->st0_regnum < 0)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int len = TYPE_LENGTH (type);
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ if (type->code () == TYPE_CODE_FLT)
{
ULONGEST fstat;
gdb_byte buf[I386_MAX_REGISTER_SIZE];
i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- enum type_code code = TYPE_CODE (type);
+ enum type_code code = type->code ();
int len = TYPE_LENGTH (type);
gdb_assert (code == TYPE_CODE_STRUCT
/* Structures consisting of a single `float', `double' or 'long
double' member are returned in %st(0). */
- if (code == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1)
+ if (code == TYPE_CODE_STRUCT && type->num_fields () == 1)
{
type = check_typedef (TYPE_FIELD_TYPE (type, 0));
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ if (type->code () == TYPE_CODE_FLT)
return (len == 4 || len == 8 || len == 12);
}
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- enum type_code code = TYPE_CODE (type);
+ enum type_code code = type->code ();
if (((code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_UNION
the structure. Since that should work for all structures that
have only one member, we don't bother to check the member's type
here. */
- if (code == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1)
+ if (code == TYPE_CODE_STRUCT && type->num_fields () == 1)
{
type = check_typedef (TYPE_FIELD_TYPE (type, 0));
return i386_return_value (gdbarch, function, type, regcache,
append_composite_type_field (t, "lbound", bt->builtin_data_ptr);
append_composite_type_field (t, "ubound", bt->builtin_data_ptr);
- TYPE_NAME (t) = "builtin_type_bound128";
+ t->set_name ("builtin_type_bound128");
tdep->i386_bnd_type = t;
}
init_vector_type (bt->builtin_int128, 4));
TYPE_VECTOR (t) = 1;
- TYPE_NAME (t) = "builtin_type_vec512i";
+ t->set_name ("builtin_type_vec512i");
tdep->i386_zmm_type = t;
}
init_vector_type (bt->builtin_int128, 2));
TYPE_VECTOR (t) = 1;
- TYPE_NAME (t) = "builtin_type_vec256i";
+ t->set_name ("builtin_type_vec256i");
tdep->i386_ymm_type = t;
}
init_vector_type (bt->builtin_int8, 8));
TYPE_VECTOR (t) = 1;
- TYPE_NAME (t) = "builtin_type_vec64i";
+ t->set_name ("builtin_type_vec64i");
tdep->i386_mmx_type = t;
}
if (gdbarch_ptr_bit (gdbarch) == 32)
{
- if ((TYPE_CODE (type) == TYPE_CODE_INT
- || TYPE_CODE (type) == TYPE_CODE_FLT)
+ if ((type->code () == TYPE_CODE_INT
+ || type->code () == TYPE_CODE_FLT)
&& TYPE_LENGTH (type) > 4)
return 4;
/* Handle x86's funny long double. */
- if (TYPE_CODE (type) == TYPE_CODE_FLT
+ if (type->code () == TYPE_CODE_FLT
&& gdbarch_long_double_bit (gdbarch) == TYPE_LENGTH (type) * 8)
return 4;
}