aboutsummaryrefslogtreecommitdiff
path: root/gdb/csky-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 11:30:08 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:38 -0600
commit77c5f49648cc39d9e4b1bd0411998ec42375654b (patch)
tree3408ebafaa9c105fddb231e71005171f4be8df26 /gdb/csky-tdep.c
parent46c04ea32f7f259432a68b002a13cdea86f9f902 (diff)
downloadgdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.zip
gdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.tar.gz
gdb-77c5f49648cc39d9e4b1bd0411998ec42375654b.tar.bz2
Unify arch_float_type and init_float_type
This unifies arch_float_type and init_float_type by using a type allocator. Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/csky-tdep.c')
-rw-r--r--gdb/csky-tdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index f704750..e1bafea 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -737,8 +737,11 @@ csky_register_type (struct gdbarch *gdbarch, int reg_nr)
/* Float register has 64 bits, and only in ck810. */
if ((reg_nr >=CSKY_FR0_REGNUM) && (reg_nr <= CSKY_FR0_REGNUM + 15))
- return arch_float_type (gdbarch, 64, "builtin_type_csky_ext",
+ {
+ type_allocator alloc (gdbarch);
+ return init_float_type (alloc, 64, "builtin_type_csky_ext",
floatformats_ieee_double);
+ }
/* Profiling general register has 48 bits, we use 64bit. */
if ((reg_nr >= CSKY_PROFGR_REGNUM) && (reg_nr <= CSKY_PROFGR_REGNUM + 44))