From 7ed29001c4a965520f6a243ec7ad41c156f96a20 Mon Sep 17 00:00:00 2001 From: Pedro Franco de Carvalho Date: Fri, 26 Oct 2018 09:37:53 -0300 Subject: [PATCH] Add decfloat registers to float reggroup This patch changes default_register_reggroup_p to return true when the register type is decimal floating point and the reggroup is float_reggroup. gdb/ChangeLog: 2018-10-26 Pedro Franco de Carvalho * reggroups.c (default_register_reggroup_p): Return true for decfloat registers and float_reggroup. --- gdb/ChangeLog | 5 +++++ gdb/reggroups.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b7323e54b7..e170dd0b3d0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-10-26 Pedro Franco de Carvalho + + * reggroups.c (default_register_reggroup_p): Return true for + decfloat registers and float_reggroup. + 2018-10-26 Pedro Franco de Carvalho * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove. diff --git a/gdb/reggroups.c b/gdb/reggroups.c index f0fd3d7cf28..f7a7cb1108b 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -202,7 +202,9 @@ default_register_reggroup_p (struct gdbarch *gdbarch, int regnum, if (group == all_reggroup) return 1; vector_p = TYPE_VECTOR (register_type (gdbarch, regnum)); - float_p = TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT; + float_p = (TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT + || (TYPE_CODE (register_type (gdbarch, regnum)) + == TYPE_CODE_DECFLOAT)); raw_p = regnum < gdbarch_num_regs (gdbarch); if (group == float_reggroup) return float_p; -- 2.30.2