diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-02 12:48:54 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-07-02 12:48:54 +0000 |
commit | 270677457f363b213b10923759f4f96ed1aa868b (patch) | |
tree | c93737e0d4e97ae68205efbed645741eccae5089 /gdb/mips-tdep.c | |
parent | df4df182b49ab6808495f557d3727b8dfd4b98da (diff) | |
download | gdb-270677457f363b213b10923759f4f96ed1aa868b.zip gdb-270677457f363b213b10923759f4f96ed1aa868b.tar.gz gdb-270677457f363b213b10923759f4f96ed1aa868b.tar.bz2 |
* gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
(init_float_type, init_complex_type): Add prototypes.
* gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
(_initialize_gdbtypes): Do not initialize them.
(build_flt): Rename to ...
(init_float_type): ... this. Make global.
(build_complex): Rename to ...
(init_complex_type): ... this. Make global. Remove BIT argument.
(gdbtypes_post_init): Update calls.
* ada-lang.c (ada_language_arch_info): Use init_float_type.
* jv-lang.c (build_java_types): Likewise.
* m2-lang.c (build_m2_types): Likewise.
* f-lang.c (build_fortran_types): Use init_float_type and
init_complex_type.
* target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
of using builtin_type_ieee_single, builtin_type_ieee_double, or
builtin_type_arm_ext.
* ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
* ia64-tdep.c (builtin_type_ia64_ext): Remove.
(_initialize_ia64_tdep): Do not initialize it.
(floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
Move up.
(ia64_ext_type): New function.
(ia64_register_reggroup_p, ia64_convert_register_p,
ia64_register_to_value, ia64_value_to_register,
ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
instead of builtin_type_ia64_ext.
* i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
(i387_ext_type): Add prototype.
* i386-tdep.c (i387_ext_type): New function.
(i386_extract_return_value, i386_store_return_value,
i386_register_type): Use it instead of builtin_type_i387_ext.
* amd64-tdep.c (amd64_register_type): Likewise.
* i387-tdep.c (print_i387_value, i387_register_to_value,
i387_value_to_register): Likewise.
(print_i387_value, print_i387_ext): Add GDBARCH argument.
(print_i387_ext, i387_print_float_info): Pass to subroutines.
* m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
* m68k-tdep.c (m68881_ext_type): New function.
(m68k_register_type, m68k_convert_register_p): Use it instead
of builtin_type_m68881_ext.
* arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
* arm-tdep.c (arm_ext_type): New function.
(arm_register_type): Use it instead of builtin_type_arm_ext.
* alpha-tdep.c (alpha_register_type): Use builtin types
instead of builtin_type_ieee_double.
* mips-tdep.c (mips_float_register_type, mips_double_register_type):
Remove.
(mips_register_type): Use builtin types instead of
builtin_type_ieee_single and builtin_type_ieee_double.
(mips_print_fp_register): Use builtin types instead of
mips_float_register_type and mips_double_register_type.
* hppa-tdep.c (hppa32_register_type, hppa64_register_type):
Use builtin types instead of builtin_type_ieee_single and
builtin_type_ieee_double.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 2af536c..f75e386 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -364,9 +364,6 @@ static CORE_ADDR heuristic_proc_start (struct gdbarch *, CORE_ADDR); static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *); -static struct type *mips_float_register_type (void); -static struct type *mips_double_register_type (void); - /* The list of available "set mips " and "show mips " commands */ static struct cmd_list_element *setmipscmdlist = NULL; @@ -670,9 +667,9 @@ mips_register_type (struct gdbarch *gdbarch, int regnum) /* The floating-point registers raw, or cooked, always match mips_isa_regsize(), and also map 1:1, byte for byte. */ if (mips_isa_regsize (gdbarch) == 4) - return builtin_type_ieee_single; + return builtin_type (gdbarch)->builtin_float; else - return builtin_type_ieee_double; + return builtin_type (gdbarch)->builtin_double; } else if (regnum < gdbarch_num_regs (gdbarch)) { @@ -4282,18 +4279,6 @@ mips_o64_return_value (struct gdbarch *gdbarch, struct type *func_type, regs could be 32 bits wide in one frame and 64 on the frame above and below). */ -static struct type * -mips_float_register_type (void) -{ - return builtin_type_ieee_single; -} - -static struct type * -mips_double_register_type (void) -{ - return builtin_type_ieee_double; -} - /* Copy a 32-bit single-precision value from the current frame into rare_buffer. */ @@ -4393,7 +4378,7 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, /* 4-byte registers: Print hex and floating. Also print even numbered registers as doubles. */ mips_read_fp_register_single (frame, regnum, raw_buffer); - flt1 = unpack_double (mips_float_register_type (), raw_buffer, &inv1); + flt1 = unpack_double (builtin_type (gdbarch)->builtin_float, raw_buffer, &inv1); get_formatted_print_options (&opts, 'x'); print_scalar_formatted (raw_buffer, @@ -4409,8 +4394,8 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, if ((regnum - gdbarch_num_regs (gdbarch)) % 2 == 0) { mips_read_fp_register_double (frame, regnum, raw_buffer); - doub = unpack_double (mips_double_register_type (), raw_buffer, - &inv2); + doub = unpack_double (builtin_type (gdbarch)->builtin_double, + raw_buffer, &inv2); fprintf_filtered (file, " dbl: "); if (inv2) @@ -4425,10 +4410,12 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame, /* Eight byte registers: print each one as hex, float and double. */ mips_read_fp_register_single (frame, regnum, raw_buffer); - flt1 = unpack_double (mips_float_register_type (), raw_buffer, &inv1); + flt1 = unpack_double (builtin_type (gdbarch)->builtin_float, + raw_buffer, &inv1); mips_read_fp_register_double (frame, regnum, raw_buffer); - doub = unpack_double (mips_double_register_type (), raw_buffer, &inv2); + doub = unpack_double (builtin_type (gdbarch)->builtin_double, + raw_buffer, &inv2); get_formatted_print_options (&opts, 'x'); print_scalar_formatted (raw_buffer, |