X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsh-tdep.c;h=7aadf9165ca5755c5a3411be4ef962dba133bc0b;hb=8118159c69a957292ce701b3d2937f19a0d0f973;hp=c6bef85588ea091ee34abd9a87a193871b759203;hpb=7813437494ac39f3aef392d06ed5416e84fe386b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index c6bef85588..7aadf9165c 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -813,7 +813,7 @@ static int sh_use_struct_convention (int renesas_abi, struct type *type) { int len = TYPE_LENGTH (type); - int nelem = TYPE_NFIELDS (type); + int nelem = type->num_fields (); /* The Renesas ABI returns aggregate types always on stack. */ if (renesas_abi && (type->code () == TYPE_CODE_STRUCT @@ -832,13 +832,13 @@ sh_use_struct_convention (int renesas_abi, struct type *type) /* If the first field in the aggregate has the same length as the entire aggregate type, the type is returned in registers. */ - if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) == len) + if (TYPE_LENGTH (type->field (0).type ()) == len) return 0; /* If the size of the aggregate is 8 bytes and the first field is of size 4 bytes its alignment is equal to long long's alignment, so it's returned in registers. */ - if (len == 8 && TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) == 4) + if (len == 8 && TYPE_LENGTH (type->field (0).type ()) == 4) return 0; /* Otherwise use struct convention. */ @@ -849,7 +849,7 @@ static int sh_use_struct_convention_nofpu (int renesas_abi, struct type *type) { /* The Renesas ABI returns long longs/doubles etc. always on stack. */ - if (renesas_abi && TYPE_NFIELDS (type) == 0 && TYPE_LENGTH (type) >= 8) + if (renesas_abi && type->num_fields () == 0 && TYPE_LENGTH (type) >= 8) return 1; return sh_use_struct_convention (renesas_abi, type); } @@ -1046,11 +1046,11 @@ sh_treat_as_flt_p (struct type *type) if (type->code () != TYPE_CODE_STRUCT) return 0; /* Otherwise structs with more than one member are not treated as float. */ - if (TYPE_NFIELDS (type) != 1) + if (type->num_fields () != 1) return 0; /* Otherwise if the type of that member is float, the whole type is treated as float. */ - if (TYPE_FIELD_TYPE (type, 0)->code () == TYPE_CODE_FLT) + if (type->field (0).type ()->code () == TYPE_CODE_FLT) return 1; /* Otherwise it's not treated as float. */ return 0; @@ -1084,7 +1084,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, registers have been used so far. */ if (sh_is_renesas_calling_convention (func_type) && TYPE_VARARGS (func_type)) - last_reg_arg = TYPE_NFIELDS (func_type) - 2; + last_reg_arg = func_type->num_fields () - 2; /* First force sp to a 4-byte alignment. */ sp = sh_frame_align (gdbarch, sp); @@ -1225,7 +1225,7 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, registers have been used so far. */ if (sh_is_renesas_calling_convention (func_type) && TYPE_VARARGS (func_type)) - last_reg_arg = TYPE_NFIELDS (func_type) - 2; + last_reg_arg = func_type->num_fields () - 2; /* First force sp to a 4-byte alignment. */ sp = sh_frame_align (gdbarch, sp);