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/target-descriptions.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/target-descriptions.c')
-rw-r--r-- | gdb/target-descriptions.c | 13 |
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; } |