diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-09-27 19:05:21 +0200 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-09-27 19:05:21 +0200 |
commit | 96a5a1d3780a46b578842d9aeea3e98211dc20ec (patch) | |
tree | 1ea8a1e41e011af010bf0d36a50dca4117deb7c6 /gdb/sh-tdep.h | |
parent | 0db7851f9f490f0b60689df5a218ccce60896e3d (diff) | |
download | gdb-96a5a1d3780a46b578842d9aeea3e98211dc20ec.zip gdb-96a5a1d3780a46b578842d9aeea3e98211dc20ec.tar.gz gdb-96a5a1d3780a46b578842d9aeea3e98211dc20ec.tar.bz2 |
Complete tdep move to convert_typed_floating
Many tdep files need to perform conversions between two floating-point
types, usually when accessing FP registers. Most targets now use the
convert_typed_floating helper routine to do so. However, a small number
still use the old method of converting via a DOUBLEST. Since we want
to get rid of DOUBLEST, these targets need to be moved to the new
method as well.
The main obstacle is that for convert_typed_floating we need an actual
*type*, not just a floatformat.
In arm-tdep.c, this is very straightforward, since there is already a
type using the ARM extended floatformat.
For sh-tdep.c and sh64-tdep.c, no such type already exists, so I've
added one to the gdbarch_tdep struct as done on other targets.
gdb/ChangeLog
2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
* arm-tdep.c: (convert_from_extended): Remove.
(convert_to_extended): Likewise.
(arm_extract_return_value): Use convert_typed_floating.
(arm_store_return_value): Likewise.
* sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
* sh-tdep.c: Do not include "floatformat.h".
(sh_littlebyte_bigword_type): New function.
(sh_register_convert_to_virtual): Use convert_typed_floating.
(sh_register_convert_to_raw): Likewise.
* sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
(sh64_littlebyte_bigword_type): New function.
(sh64_extract_return_value): Use convert_typed_floating.
(sh64_register_convert_to_virtual): Likewise.
(sh64_register_convert_to_raw): Likewise.
Diffstat (limited to 'gdb/sh-tdep.h')
-rw-r--r-- | gdb/sh-tdep.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h index d15ef05..6e44df8 100644 --- a/gdb/sh-tdep.h +++ b/gdb/sh-tdep.h @@ -101,6 +101,8 @@ struct gdbarch_tdep inside the associated core file section. */ struct sh_corefile_regmap *core_fpregmap; int sizeof_fpregset; + /* ISA-specific data types. */ + struct type *sh_littlebyte_bigword_type; }; extern const struct regset sh_corefile_gregset; |