diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-12 16:33:20 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-12 16:33:20 +0000 |
commit | 9694a2a0f15577d7b84c108b0d1fd84669a46d0c (patch) | |
tree | cc3ffe7602fc133f5e136ae51a665add182f48d5 /gdb/doublest.c | |
parent | c1ceb89a91cb5a67f809eb1068543a8e391421fe (diff) | |
download | gdb-9694a2a0f15577d7b84c108b0d1fd84669a46d0c.tar.gz |
2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (TARGET_FLOAT_BIT): Replace by gdbarch_float_bit.
* p-lang.c (pascal_create_fundamental_type): Likewise.
* objc-lang.c (objc_create_fundamental_type): Likewise.
* mdebugread.c (_initialize_mdebugread): Likewise.
* m2-lang.c (m2_create_fundamental_type)
(_initialize_m2_language): Likewise.
* gdbtypes.c (build_gdbtypes): Likewise.
* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* c-lang.c (c_create_fundamental_type): Likewise.
* ada-lang.c (ada_create_fundamental_type)
(ada_language_arch_info): Likewise.
* gdbarch.sh (TARGET_FLOAT_FORMAT): Replace by gdbarch_float_format.
* value.c (unpack_double): Likewise (comment).
* gdbtypes.c (build_gdbtypes): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* gdbarch.sh (TARGET_DOUBLE_BIT): Replace by gdbarch_double_bit.
* valarith.c (value_binop): Likewise.
* p-lang.c (pascal_create_fundamental_type): Likewise.
* objc-lang.c (objc_create_fundamental_type): Likewise.
* mdebugread.c (_initialize_mdebugread): Likewise.
* m2-lang.c (m2_create_fundamental_type): Likewise.
* gdbtypes.c (build_gdbtypes): Likewise.
* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* cris-tdep.c (cris_gdbarch_init): Likewise (comment).
* c-lang.c (c_create_fundamental_type): Likewise.
* ada-lex.l (processReal): Likewise.
* ada-lang.c (ada_create_fundamental_type)
(ada_language_arch_info): Likewise.
* gdbarch.sh (TARGET_DOUBLE_FORMAT): Replace by gdbarch_double_format.
* value.c (unpack_double): Likewise (comment).
* gdbtypes.c (build_gdbtypes): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* gdbarch.sh (TARGET_LONG_DOUBLE_BIT): Replace by
gdbarch_long_double_bit.
* p-lang.c (pascal_create_fundamental_type): Likewise.
* objc-lang.c (objc_create_fundamental_type): Likewise.
* m2-lang.c (m2_create_fundamental_type): Likewise.
* gdbtypes.c (build_gdbtypes): Likewise.
* f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* c-lang.c (c_create_fundamental_type): Likewise.
* ada-lex.l (processReal): Likewise.
* ada-lang.c (ada_create_fundamental_type)
(ada_language_arch_info): Likewise.
* gdbarch.sh (TARGET_LONG_DOUBLE_FORMAT): Replace by
gdbarch_long_double_format.
* gdbtypes.c (build_gdbtypes): Likewise.
* doublest.c (floatformat_from_length): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
Diffstat (limited to 'gdb/doublest.c')
-rw-r--r-- | gdb/doublest.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gdb/doublest.c b/gdb/doublest.c index 6107c725854..f05740d0eb9 100644 --- a/gdb/doublest.c +++ b/gdb/doublest.c @@ -724,20 +724,24 @@ static const struct floatformat * floatformat_from_length (int len) { const struct floatformat *format; - if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT) - format = TARGET_FLOAT_FORMAT[gdbarch_byte_order (current_gdbarch)]; - else if (len * TARGET_CHAR_BIT == TARGET_DOUBLE_BIT) - format = TARGET_DOUBLE_FORMAT[gdbarch_byte_order (current_gdbarch)]; - else if (len * TARGET_CHAR_BIT == TARGET_LONG_DOUBLE_BIT) - format = TARGET_LONG_DOUBLE_FORMAT[gdbarch_byte_order (current_gdbarch)]; + if (len * TARGET_CHAR_BIT == gdbarch_float_bit (current_gdbarch)) + format = gdbarch_float_format (current_gdbarch) + [gdbarch_byte_order (current_gdbarch)]; + else if (len * TARGET_CHAR_BIT == gdbarch_double_bit (current_gdbarch)) + format = gdbarch_double_format (current_gdbarch) + [gdbarch_byte_order (current_gdbarch)]; + else if (len * TARGET_CHAR_BIT == gdbarch_long_double_bit (current_gdbarch)) + format = gdbarch_long_double_format (current_gdbarch) + [gdbarch_byte_order (current_gdbarch)]; /* On i386 the 'long double' type takes 96 bits, while the real number of used bits is only 80, both in processor and in memory. The code below accepts the real bit size. */ - else if ((TARGET_LONG_DOUBLE_FORMAT != NULL) + else if ((gdbarch_long_double_format (current_gdbarch) != NULL) && (len * TARGET_CHAR_BIT == - TARGET_LONG_DOUBLE_FORMAT[0]->totalsize)) - format = TARGET_LONG_DOUBLE_FORMAT[gdbarch_byte_order (current_gdbarch)]; + gdbarch_long_double_format (current_gdbarch)[0]->totalsize)) + format = gdbarch_long_double_format (current_gdbarch) + [gdbarch_byte_order (current_gdbarch)]; else format = NULL; if (format == NULL) |