if (TYPE_LENGTH (t) > 8)
{
- switch (TYPE_CODE (t))
+ switch (t->code ())
{
case TYPE_CODE_INT:
case TYPE_CODE_RANGE:
static struct type *
s390_effective_inner_type (struct type *type, unsigned int min_size)
{
- while (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ while (type->code () == TYPE_CODE_STRUCT)
{
struct type *inner = NULL;
/* Find a non-static field, if any. Unless there's exactly one,
abort the unwrapping. */
- for (int i = 0; i < TYPE_NFIELDS (type); i++)
+ for (int i = 0; i < type->num_fields (); i++)
{
- struct field f = TYPE_FIELD (type, i);
+ struct field f = type->field (i);
if (field_is_static (&f))
continue;
or double. */
type = s390_effective_inner_type (type, 0);
- return (TYPE_CODE (type) == TYPE_CODE_FLT
- || TYPE_CODE (type) == TYPE_CODE_DECFLOAT);
+ return (type->code () == TYPE_CODE_FLT
+ || type->code () == TYPE_CODE_DECFLOAT);
}
/* Return non-zero if TYPE should be passed like a vector. */
/* Structs containing just a vector are passed like a vector. */
type = s390_effective_inner_type (type, TYPE_LENGTH (type));
- return TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type);
+ return type->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type);
}
/* Determine whether N is a power of two. */
static int
s390_function_arg_integer (struct type *type)
{
- enum type_code code = TYPE_CODE (type);
+ enum type_code code = type->code ();
if (TYPE_LENGTH (type) > 8)
return 0;
CORE_ADDR param_area_start, new_sp;
struct type *ftype = check_typedef (value_type (function));
- if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
+ if (ftype->code () == TYPE_CODE_PTR)
ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
arg_prep.copy = sp;
and arg_state.argp with the size of the parameter area. */
for (i = 0; i < nargs; i++)
s390_handle_arg (&arg_state, args[i], tdep, word_size, byte_order,
- TYPE_VARARGS (ftype) && i >= TYPE_NFIELDS (ftype));
+ TYPE_VARARGS (ftype) && i >= ftype->num_fields ());
param_area_start = align_down (arg_state.copy - arg_state.argp, 8);
/* Write all parameters. */
for (i = 0; i < nargs; i++)
s390_handle_arg (&arg_state, args[i], tdep, word_size, byte_order,
- TYPE_VARARGS (ftype) && i >= TYPE_NFIELDS (ftype));
+ TYPE_VARARGS (ftype) && i >= ftype->num_fields ());
/* Store return PSWA. In 31-bit mode, keep addressing mode bit. */
if (word_size == 4)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
int length = TYPE_LENGTH (type);
- int code = TYPE_CODE (type);
+ int code = type->code ();
if (code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT)
{
type = check_typedef (type);
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION: