This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v4 03/12] Add decfloat registers to float reggroup
- From: Pedro Franco de Carvalho <pedromfc at linux dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: uweigand at de dot ibm dot com, edjunior at gmail dot com
- Date: Tue, 14 Aug 2018 21:05:59 -0300
- Subject: [PATCH v4 03/12] Add decfloat registers to float reggroup
- References: <20180815000608.26840-1-pedromfc@linux.ibm.com>
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:
YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
* reggroups.c (default_register_reggroup_p): Return true for
decfloat registers and float_reggroup.
---
gdb/reggroups.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index f0fd3d7cf2..f7a7cb1108 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.13.6