diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-05-24 22:15:23 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2017-05-24 22:15:23 +0100 |
commit | 8c8f9122ce6e6c00f72914479af57a7b87244554 (patch) | |
tree | f0349c49459fa7c1ac290985dbaa39a72c487ec5 /gdb/i387-tdep.c | |
parent | 68fce50f04f495980f4ea81746339a9de5b52ebb (diff) | |
download | binutils-gdb-8c8f9122ce6e6c00f72914479af57a7b87244554.tar.gz |
Restrict i387_convert_register_p
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.
Diffstat (limited to 'gdb/i387-tdep.c')
-rw-r--r-- | gdb/i387-tdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 92061098e32..925f4e54778 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -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; |