Restrict i387_convert_register_p
authorYao Qi <yao.qi@linaro.org>
Wed, 24 May 2017 21:15:23 +0000 (22:15 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 24 May 2017 21:15:23 +0000 (22:15 +0100)
gdb:

2017-05-24  Yao Qi  <yao.qi@linaro.org>

* i387-tdep.c (i387_convert_register_p): Return false if type
code isn't TYPE_CODE_FLT.

gdb/ChangeLog
gdb/i387-tdep.c

index 1234e1473af5a65e6b190981360707a74b82d712..29cd3061a3235d3744b2da58af316e00e9640562 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-24  Yao Qi  <yao.qi@linaro.org>
+
+       * i387-tdep.c (i387_convert_register_p): Return false if type
+       code isn't TYPE_CODE_FLT.
+
 2017-05-24  Yao Qi  <yao.qi@linaro.org>
 
        * alpha-tdep.c (alpha_convert_register_p): Return true if type
index 92061098e322ef84a073c0d88065c4ae2dfddba2..925f4e547785367b62cd018927f40afda7b7627e 100644 (file)
@@ -341,8 +341,9 @@ i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
   if (i386_fp_regnum_p (gdbarch, regnum))
     {
       /* Floating point registers must be converted unless we are
-        accessing them in their hardware type.  */
-      if (type == i387_ext_type (gdbarch))
+        accessing them in their hardware type or TYPE is not float.  */
+      if (type == i387_ext_type (gdbarch)
+         || TYPE_CODE (type) != TYPE_CODE_FLT)
        return 0;
       else
        return 1;
This page took 0.037447 seconds and 4 git commands to generate.