aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog17
-rw-r--r--gdb/doublest.c23
-rw-r--r--gdb/doublest.h8
-rw-r--r--gdb/gdbtypes.c45
-rw-r--r--gdb/gdbtypes.h5
5 files changed, 98 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b4bf80a..3657a77 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,20 @@
+2004-08-08 Andrew Cagney <cagney@gnu.org>
+
+ * gdbtypes.c (builtin_type_arm_ext, builtin_type_ieee_single)
+ (builtin_type_ieee_double, builtin_type_ia64_quad)
+ (builtin_type_ia64_spill, _initialize_gdbtypes): Add tables of
+ BE/LE floating-point types.
+ * gdbtypes.h (builtin_type_arm_ext, builtin_type_ieee_single)
+ (builtin_type_ieee_double, builtin_type_ia64_quad)
+ (builtin_type_ia64_spill): Declare.
+ * doublest.c (_initialize_doublest, floatformat_ieee_single)
+ (floatformat_ieee_double, floatformat_arm_ext)
+ (floatformat_ia64_spill, floatformat_ia64_quad): Add tables
+ of LE/BE floatformats.
+ * doublest.h: (struct floatformat, floatformat_ieee_single)
+ (floatformat_ieee_double, floatformat_arm_ext)
+ (floatformat_ia64_spill, floatformat_ia64_quad): Declare.
+
2004-08-08 Mark Kettenis <kettenis@gnu.org>
* i386gnu-nat.c (gnu_store_registers): Fix typo.
diff --git a/gdb/doublest.c b/gdb/doublest.c
index e4dbb2a..8991241 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -811,3 +811,26 @@ convert_typed_floating (const void *from, const struct type *from_type,
floatformat_from_doublest (to_fmt, &d, to);
}
}
+
+const struct floatformat *floatformat_ieee_single[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_ieee_double[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_arm_ext[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_ia64_spill[BFD_ENDIAN_UNKNOWN];
+const struct floatformat *floatformat_ia64_quad[BFD_ENDIAN_UNKNOWN];
+
+extern void _initialize_doublest (void);
+
+extern void
+_initialize_doublest (void)
+{
+ floatformat_ieee_single[BFD_ENDIAN_LITTLE] = &floatformat_ieee_single_little;
+ floatformat_ieee_single[BFD_ENDIAN_BIG] = &floatformat_ieee_single_big;
+ floatformat_ieee_double[BFD_ENDIAN_LITTLE] = &floatformat_ieee_double_little;
+ floatformat_ieee_double[BFD_ENDIAN_BIG] = &floatformat_ieee_double_big;
+ floatformat_arm_ext[BFD_ENDIAN_LITTLE] = &floatformat_arm_ext_littlebyte_bigword;
+ floatformat_arm_ext[BFD_ENDIAN_BIG] = &floatformat_arm_ext_big;
+ floatformat_ia64_spill[BFD_ENDIAN_LITTLE] = &floatformat_ia64_spill_little;
+ floatformat_ia64_spill[BFD_ENDIAN_BIG] = &floatformat_ia64_spill_big;
+ floatformat_ia64_quad[BFD_ENDIAN_LITTLE] = &floatformat_ia64_quad_little;
+ floatformat_ia64_quad[BFD_ENDIAN_BIG] = &floatformat_ia64_quad_big;
+}
diff --git a/gdb/doublest.h b/gdb/doublest.h
index 668efa7..a568862 100644
--- a/gdb/doublest.h
+++ b/gdb/doublest.h
@@ -25,6 +25,7 @@
#define DOUBLEST_H
struct type;
+struct floatformat;
/* Setup definitions for host and target floating point formats. We need to
consider the format for `float', `double', and `long double' for both target
@@ -87,4 +88,11 @@ extern void convert_typed_floating (const void *from,
const struct type *from_type,
void *to, const struct type *to_type);
+/* Table of convenient float-formats. */
+extern const struct floatformat *floatformat_ieee_single[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_ieee_double[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_arm_ext[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_ia64_spill[BFD_ENDIAN_UNKNOWN];
+extern const struct floatformat *floatformat_ia64_quad[BFD_ENDIAN_UNKNOWN];
+
#endif
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index e42d118..f8604bc 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -97,8 +97,10 @@ struct type *builtin_type_vec64;
struct type *builtin_type_vec64i;
struct type *builtin_type_vec128;
struct type *builtin_type_vec128i;
+struct type *builtin_type_ieee_single[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ieee_single_big;
struct type *builtin_type_ieee_single_little;
+struct type *builtin_type_ieee_double[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ieee_double_big;
struct type *builtin_type_ieee_double_little;
struct type *builtin_type_ieee_double_littlebyte_bigword;
@@ -107,10 +109,13 @@ struct type *builtin_type_m68881_ext;
struct type *builtin_type_i960_ext;
struct type *builtin_type_m88110_ext;
struct type *builtin_type_m88110_harris_ext;
+struct type *builtin_type_arm_ext[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_arm_ext_big;
struct type *builtin_type_arm_ext_littlebyte_bigword;
+struct type *builtin_type_ia64_spill[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ia64_spill_big;
struct type *builtin_type_ia64_spill_little;
+struct type *builtin_type_ia64_quad[BFD_ENDIAN_UNKNOWN];
struct type *builtin_type_ia64_quad_big;
struct type *builtin_type_ia64_quad_little;
struct type *builtin_type_void_data_ptr;
@@ -3577,6 +3582,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ieee_single_little.totalsize / 8,
0, "builtin_type_ieee_single_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ieee_single_little) = &floatformat_ieee_single_little;
+ builtin_type_ieee_single[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ieee_single_big.totalsize,
+ "builtin_type_ieee_single_big",
+ &floatformat_ieee_single_big);
+ builtin_type_ieee_single[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ieee_single_little.totalsize,
+ "builtin_type_ieee_single_little",
+ &floatformat_ieee_single_little);
builtin_type_ieee_double_big =
init_type (TYPE_CODE_FLT, floatformat_ieee_double_big.totalsize / 8,
0, "builtin_type_ieee_double_big", NULL);
@@ -3585,6 +3598,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ieee_double_little.totalsize / 8,
0, "builtin_type_ieee_double_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ieee_double_little) = &floatformat_ieee_double_little;
+ builtin_type_ieee_double[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ieee_double_big.totalsize,
+ "builtin_type_ieee_double_big",
+ &floatformat_ieee_double_big);
+ builtin_type_ieee_double[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ieee_double_little.totalsize,
+ "builtin_type_ieee_double_little",
+ &floatformat_ieee_double_little);
builtin_type_ieee_double_littlebyte_bigword =
init_type (TYPE_CODE_FLT, floatformat_ieee_double_littlebyte_bigword.totalsize / 8,
0, "builtin_type_ieee_double_littlebyte_bigword", NULL);
@@ -3617,6 +3638,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_arm_ext_littlebyte_bigword.totalsize / 8,
0, "builtin_type_arm_ext_littlebyte_bigword", NULL);
TYPE_FLOATFORMAT (builtin_type_arm_ext_littlebyte_bigword) = &floatformat_arm_ext_littlebyte_bigword;
+ builtin_type_arm_ext[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_arm_ext_big.totalsize,
+ "builtin_type_arm_ext_big",
+ &floatformat_arm_ext_big);
+ builtin_type_arm_ext[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_arm_ext_littlebyte_bigword.totalsize,
+ "builtin_type_arm_ext_littlebyte_bigword",
+ &floatformat_arm_ext_littlebyte_bigword);
builtin_type_ia64_spill_big =
init_type (TYPE_CODE_FLT, floatformat_ia64_spill_big.totalsize / 8,
0, "builtin_type_ia64_spill_big", NULL);
@@ -3625,6 +3654,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ia64_spill_little.totalsize / 8,
0, "builtin_type_ia64_spill_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ia64_spill_little) = &floatformat_ia64_spill_little;
+ builtin_type_ia64_spill[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ia64_spill_big.totalsize,
+ "builtin_type_ia64_spill_big",
+ &floatformat_ia64_spill_big);
+ builtin_type_ia64_spill[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ia64_spill_little.totalsize,
+ "builtin_type_ia64_spill_little",
+ &floatformat_ia64_spill_little);
builtin_type_ia64_quad_big =
init_type (TYPE_CODE_FLT, floatformat_ia64_quad_big.totalsize / 8,
0, "builtin_type_ia64_quad_big", NULL);
@@ -3633,6 +3670,14 @@ _initialize_gdbtypes (void)
init_type (TYPE_CODE_FLT, floatformat_ia64_quad_little.totalsize / 8,
0, "builtin_type_ia64_quad_little", NULL);
TYPE_FLOATFORMAT (builtin_type_ia64_quad_little) = &floatformat_ia64_quad_little;
+ builtin_type_ia64_quad[BFD_ENDIAN_BIG]
+ = build_flt (floatformat_ia64_quad_big.totalsize,
+ "builtin_type_ia64_quad_big",
+ &floatformat_ia64_quad_big);
+ builtin_type_ia64_quad[BFD_ENDIAN_LITTLE]
+ = build_flt (floatformat_ia64_quad_little.totalsize,
+ "builtin_type_ia64_quad_little",
+ &floatformat_ia64_quad_little);
deprecated_add_show_from_set
(add_set_cmd ("overload", no_class, var_zinteger, (char *) &overload_debug,
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index a9d98dc..3f90f6c 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1050,8 +1050,10 @@ extern struct type *builtin_type_vec128;
extern struct type *builtin_type_vec128i;
/* Explicit floating-point formats. See "floatformat.h". */
+extern struct type *builtin_type_ieee_single[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ieee_single_big;
extern struct type *builtin_type_ieee_single_little;
+extern struct type *builtin_type_ieee_double[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ieee_double_big;
extern struct type *builtin_type_ieee_double_little;
extern struct type *builtin_type_ieee_double_littlebyte_bigword;
@@ -1060,10 +1062,13 @@ extern struct type *builtin_type_m68881_ext;
extern struct type *builtin_type_i960_ext;
extern struct type *builtin_type_m88110_ext;
extern struct type *builtin_type_m88110_harris_ext;
+extern struct type *builtin_type_arm_ext[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_arm_ext_big;
extern struct type *builtin_type_arm_ext_littlebyte_bigword;
+extern struct type *builtin_type_ia64_spill[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ia64_spill_big;
extern struct type *builtin_type_ia64_spill_little;
+extern struct type *builtin_type_ia64_quad[BFD_ENDIAN_UNKNOWN];
extern struct type *builtin_type_ia64_quad_big;
extern struct type *builtin_type_ia64_quad_little;