From: Richard Henderson Date: Mon, 2 Jun 2003 22:54:01 +0000 (+0000) Subject: * alpha-tdep.c (alpha_register_reggroup_p): Zero is only X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df4a182bcbee1af06d242548a6fcce6e1609b74f;p=binutils-gdb.git * alpha-tdep.c (alpha_register_reggroup_p): Zero is only a member of all_reggroup. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 21326c274b4..fbd301dda9e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-02 Richard Henderson + + * alpha-tdep.c (alpha_register_reggroup_p): Zero is only + a member of all_reggroup. + 2003-06-02 Richard Henderson * alpha-tdep.c (alpha_register_type): Change from _virtual_type. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 6d9c58d4e5d..da514bf1c1e 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -107,10 +107,18 @@ alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum, if (REGISTER_NAME (regnum) == NULL || *REGISTER_NAME (regnum) == '\0') return 0; - /* Since we implement no pseudo registers, save/restore is equal to all. */ - if (group == all_reggroup - || group == save_reggroup - || group == restore_reggroup) + if (group == all_reggroup) + return 1; + + /* Zero should not be saved or restored. Technically it is a general + register (just as $f31 would be a float if we represented it), but + there's no point displaying it during "info regs", so leave it out + of all groups except for "all". */ + if (regnum == ALPHA_ZERO_REGNUM) + return 0; + + /* All other registers are saved and restored. */ + if (group == save_reggroup || group == restore_reggroup) return 1; /* All other groups are non-overlapping. */