mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
* s390-tdep.c (s390_register_name): S390_LAST_REGNUM is, in fact,
the last register number, not one greater than the last register number. * s390-tdep.c (s390_register_virtual_type): Replace clever but incorrect range comparison with correct, legible equivalent.
This commit is contained in:
@ -1,5 +1,12 @@
|
|||||||
2001-12-19 Jim Blandy <jimb@redhat.com>
|
2001-12-19 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
|
* s390-tdep.c (s390_register_name): S390_LAST_REGNUM is, in fact,
|
||||||
|
the last register number, not one greater than the last register
|
||||||
|
number.
|
||||||
|
|
||||||
|
* s390-tdep.c (s390_register_virtual_type): Replace clever but
|
||||||
|
incorrect range comparison with correct, legible equivalent.
|
||||||
|
|
||||||
* s390-tdep.c (s390_register_raw_size): Replace unnecessarily
|
* s390-tdep.c (s390_register_raw_size): Replace unnecessarily
|
||||||
obscure range comparison with legible equivalent.
|
obscure range comparison with legible equivalent.
|
||||||
|
|
||||||
|
@ -161,9 +161,10 @@ s390_register_name (int reg_nr)
|
|||||||
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15"
|
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (reg_nr >= S390_LAST_REGNUM)
|
if (reg_nr <= S390_LAST_REGNUM)
|
||||||
|
return register_names[reg_nr];
|
||||||
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
return register_names[reg_nr];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1672,8 +1673,10 @@ s390_use_struct_convention (int gcc_p, struct type *value_type)
|
|||||||
struct type *
|
struct type *
|
||||||
s390_register_virtual_type (int regno)
|
s390_register_virtual_type (int regno)
|
||||||
{
|
{
|
||||||
return ((unsigned) regno - S390_FPC_REGNUM) <
|
if (S390_FP0_REGNUM <= regno && regno < S390_FP0_REGNUM + S390_NUM_FPRS)
|
||||||
S390_NUM_FPRS ? builtin_type_double : builtin_type_int;
|
return builtin_type_double;
|
||||||
|
else
|
||||||
|
return builtin_type_int;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user