aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-descriptions.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/target-descriptions.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/target-descriptions.c')
-rw-r--r--gdb/target-descriptions.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 7af3875..7ae9058 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -116,34 +116,35 @@ make_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *ttype)
if (m_type != NULL)
return;
+ type_allocator alloc (m_gdbarch);
switch (e->kind)
{
case TDESC_TYPE_IEEE_HALF:
- m_type = arch_float_type (m_gdbarch, -1, "builtin_type_ieee_half",
+ m_type = init_float_type (alloc, -1, "builtin_type_ieee_half",
floatformats_ieee_half);
return;
case TDESC_TYPE_IEEE_SINGLE:
- m_type = arch_float_type (m_gdbarch, -1, "builtin_type_ieee_single",
+ m_type = init_float_type (alloc, -1, "builtin_type_ieee_single",
floatformats_ieee_single);
return;
case TDESC_TYPE_IEEE_DOUBLE:
- m_type = arch_float_type (m_gdbarch, -1, "builtin_type_ieee_double",
+ m_type = init_float_type (alloc, -1, "builtin_type_ieee_double",
floatformats_ieee_double);
return;
case TDESC_TYPE_ARM_FPA_EXT:
- m_type = arch_float_type (m_gdbarch, -1, "builtin_type_arm_ext",
+ m_type = init_float_type (alloc, -1, "builtin_type_arm_ext",
floatformats_arm_ext);
return;
case TDESC_TYPE_I387_EXT:
- m_type = arch_float_type (m_gdbarch, -1, "builtin_type_i387_ext",
+ m_type = init_float_type (alloc, -1, "builtin_type_i387_ext",
floatformats_i387_ext);
return;
case TDESC_TYPE_BFLOAT16:
- m_type = arch_float_type (m_gdbarch, -1, "builtin_type_bfloat16",
+ m_type = init_float_type (alloc, -1, "builtin_type_bfloat16",
floatformats_bfloat16);
return;
}