aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-12-19 22:24:49 +0000
committerJim Blandy <jimb@codesourcery.com>2001-12-19 22:24:49 +0000
commit23b7362fd74b2ac828e9bb7c0251aaa144948757 (patch)
tree3e84a8a7fd4750274ed4888d85f9b18994f1ef9a /gdb
parent2cd045cd85ef7e9873a80672ea3b0e9ff47f3c66 (diff)
downloadgdb-23b7362fd74b2ac828e9bb7c0251aaa144948757.zip
gdb-23b7362fd74b2ac828e9bb7c0251aaa144948757.tar.gz
gdb-23b7362fd74b2ac828e9bb7c0251aaa144948757.tar.bz2
* s390-tdep.c (s390_register_raw_size): Replace unnecessarily
obscure range comparison with legible equivalent.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/s390-tdep.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9091a60..6d55fa7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-19 Jim Blandy <jimb@redhat.com>
+
+ * s390-tdep.c (s390_register_raw_size): Replace unnecessarily
+ obscure range comparison with legible equivalent.
+
Wed Dec 19 12:18:57 2001 Jeffrey A Law (law@redhat.com)
* config/pa/tm-hppa.h (STORE_RETURN_VALUE): Use hppa_store_return_value.
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index ddeacad..ba8c9a3 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -42,14 +42,15 @@
/* Number of bytes of storage in the actual machine representation
- for register N.
- Note that the unsigned cast here forces the result of the
- subtraction to very high positive values if N < S390_FP0_REGNUM */
+ for register N. */
int
s390_register_raw_size (int reg_nr)
{
- return ((unsigned) reg_nr - S390_FP0_REGNUM) <
- S390_NUM_FPRS ? S390_FPR_SIZE : 4;
+ if (S390_FP0_REGNUM <= reg_nr
+ && reg_nr < S390_FP0_REGNUM + S390_NUM_FPRS)
+ return S390_FPR_SIZE;
+ else
+ return 4;
}
int
@@ -1759,6 +1760,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
gdbarch = gdbarch_alloc (&info, NULL);
set_gdbarch_believe_pcc_promotion (gdbarch, 0);
+ set_gdbarch_char_signed (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frame_args_address (gdbarch, s390_frame_args_address);