Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* c-lang.c (c_create_fundamental_type): Create fundamental
	types for DFP.
	* c-typeprint.c (c_type_print_varspec_prefix): Add
	TYPE_CODE_DECFLOAT to no prefix needed case.
	(c_type_print_varspec_suffix): Add TYPE_CODE_DECFLOAT to no
	suffix needed case.
	* c-valprint.c (c_val_print): Call print_decimal_floating to
	print DFP values.
	* dwarf2read.c (read_base_type): Read DW_ATE_decimal_float
	attribute code and return TYPE_CODE_DECFLOAT.
	(dwarf_base_type): Set dwarf2_fundamental_type for DFP values.
	* gdbtypes.c (gdbtypes_post_init): Initialize builtin_decfloat,
	builtin_decdouble and builtin_declong.
	* gdbtypes.h (enum type_code): Add TYPE_CODE_DECFLOAT as a
	type code for DFP.
	(FT_DECFLOAT, FT_DBL_PREC_DECFLOAT, FT_EXT_PREC_DECFLOAT): New
	types, for decimal floating point.
	(FT_NUM_MEMBERS):  Increment, new types added.
	(struct builtin_type): Add builtin_decfloat, builtin_decdouble
	and builtin_declong.
	* valprint.c (print_decimal_floating): New function to print DFP
	values.
	* value.h (print_decimal_floating): Prototype.
This commit is contained in:
Thiago Jung Bauermann
2007-10-25 17:57:34 +00:00
parent 9b913628cf
commit 7678ef8fb0
9 changed files with 105 additions and 2 deletions

View File

@@ -65,7 +65,12 @@ struct block;
#define FT_UNSIGNED_BYTE 27
#define FT_TEMPLATE_ARG 28
#define FT_NUM_MEMBERS 29 /* Highest FT_* above, plus one. */
/* The following three fundamental types are for decimal floating point. */
#define FT_DECFLOAT 29
#define FT_DBL_PREC_DECFLOAT 30
#define FT_EXT_PREC_DECFLOAT 31
#define FT_NUM_MEMBERS 32 /* Highest FT_* above, plus one. */
/* Some macros for char-based bitfields. */
@@ -169,7 +174,9 @@ enum type_code
TYPE_CODE_TEMPLATE, /* C++ template */
TYPE_CODE_TEMPLATE_ARG, /* C++ template arg */
TYPE_CODE_NAMESPACE /* C++ namespace. */
TYPE_CODE_NAMESPACE, /* C++ namespace. */
TYPE_CODE_DECFLOAT /* Decimal floating point. */
};
/* For now allow source to use TYPE_CODE_CLASS for C++ classes, as an
@@ -1041,6 +1048,9 @@ struct builtin_type
struct type *builtin_bool;
struct type *builtin_long_long;
struct type *builtin_unsigned_long_long;
struct type *builtin_decfloat;
struct type *builtin_decdouble;
struct type *builtin_declong;
};
/* Return the type table for the specified architecture. */