Add decfloat registers to float reggroup
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Fri, 26 Oct 2018 12:37:53 +0000 (09:37 -0300)
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Fri, 26 Oct 2018 12:48:33 +0000 (09:48 -0300)
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  <pedromfc@linux.ibm.com>

* reggroups.c (default_register_reggroup_p): Return true for
decfloat registers and float_reggroup.

gdb/ChangeLog
gdb/reggroups.c

index 8b7323e54b75ca085a59882c46b19541a6520105..e170dd0b3d0ff6517d71e0a9e4d1de7ef4aabcda 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
+
+       * reggroups.c (default_register_reggroup_p): Return true for
+       decfloat registers and float_reggroup.
+
 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
 
        * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
index f0fd3d7cf28449cde1f283cda9900b8ceae11034..f7a7cb1108b295e86a6f5d54cb2f5f761a97f380 100644 (file)
@@ -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;