diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-13 11:30:08 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-18 11:12:38 -0600 |
commit | 77c5f49648cc39d9e4b1bd0411998ec42375654b (patch) | |
tree | 3408ebafaa9c105fddb231e71005171f4be8df26 /gdb/csky-tdep.c | |
parent | 46c04ea32f7f259432a68b002a13cdea86f9f902 (diff) | |
download | gdb-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.c | 5 |
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)) |