Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.base/dfp-exprs.exp: new file adding tests for Decimal
Floating Point expressions.
* gdb.base/dfp-test.exp: new file adding tests for Decimal
Floating Point variables.
* gdb.base/dfp-test.c: new file containing program with Decimal
Floating variables, used by gdb.base/dfp-test.exp.
Thiago Jung Bauermann <bauerman@br.ibm.com>
* c-exp.y (YYSTYPE): Add typed_val_decfloat for decimal
floating point in YYSTYPE union.
(DECFLOAT) Add token and expression element handling code.
(parse_number): Parse DFP constants, which end with suffix 'df',
'dd' or 'dl'. Return DECFLOAT.
* eval.c (evaluate_subexp_standard): Call value_from_decfloat to
handle OP_DECFLOAT.
* expression.h (enum exp_opcode): Add an opcode (OP_DECFLOAT)
for DFP constants.
(union exp_element): Add decfloatconst to represent DFP
elements, which is 16 bytes by default.
* parse.c (write_exp_elt_decfloatcst): New function to write a
decimal float const into the expression.
(operator_length_standard): Set operator length for OP_DECFLOAT
to 4.
* parser-defs.h (write_exp_elt_decfloatcst): Prototype.
* valarith.c (value_neg): Add code to handle the negation
operation of DFP values.
* value.c (value_from_decfloat): New function to get the value
from a decimal floating point.
* value.h (value_from_decfloat): Prototype.
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.
Thiago Jung Bauermann <bauerman@br.ibm.com>
* Makefile.in (LIBDECNUMBER_DIR, LIBDECNUMBER, LIBDECNUMBER_SRC
LIBDECNUMBER_CFLAGS): New macros for libdecnumber.
(INTERNAL_CFLAGS_BASE): Add LIBDECNUMBER_CFLAGS in.
(INSTALLED_LIBS): Add -ldecnumber in.
(CLIBS): Add LIBDECNUMBER in.
(decimal128_h, decimal64_h, decimal32_h): New macros for decimal
headers.
(dfp_h): New macros for decimal floating point.
(dfp.o): New target.
(COMMON_OBS): Add dfp.o in.
(c-exp.o): Add dfp_h as dependency.
(valprint.o): Add dfp_h as dependency.
(value.o): Add dfp_h as dependency.
* dfp.h: New header file for decimal floating point support in
GDB.
* dfp.c: New source file for decimal floating point support in
GDB. Implement decimal_from_string and decimal_to_string based
on libdecnumber API.
* configure.ac: Add AC_C_BIGENDIAN test.
* config.in, configure: Regenerate.
* infcmd.c (registers_info): Check for a user register before
calling target's gdbarch_print_registers_info(). If found to be
so, extract the implicit value of user register and call
print_scalar_formatted().
* Makefile.in: (infcmd.o): Add $(user_regs_h).
set_solib_ops to install SVR4 operations.
(_initialize_svr4_solib): Do not set current_target_so_ops.
* config/i386/i386gnu.mh (NATDEPFILES): Move solib.o, solib-svr4.o ...
* config/i386/i386gnu.mt (TDEPFILES): ... to here.
(arm_wince_init_abi): Call set_solib_ops.
* i386-cygwin-tdep.c: Include "solib.h" and "solib-target.h".
(i386_cygwin_init_abi): Call set_solib_ops.
* solib-target.c: Include "solib-target.h".
(solib_target_so_ops): Make global.
(_initialize_solib_target): Do not set current_target_so_ops.
* solib-target.h: New file.
* Makefile.in: Update dependencies.
(mips_irix_init_abi): Call set_solib_ops.
* solib-irix.c: Include "solib.h" and "solib-irix.h".
(irix_so_ops): Make global.
(_initialize_irix_solib): Do not set current_target_so_ops.
* solib-irix.h: New file.
* Makefile.in: Update dependencies.
requirement.
(Requirements for Building GDB): Expand the list of Expat
uses.
(Library List Format, Memory Map Format): Mention Expat.
(Target Descriptions): Update Expat wording.
(amd64_init_abi): Use i387_convert_register_p.
* alpha-tdep.c (alpha_convert_register_p): Return zero for
eight byte types.
(alpha_register_to_value, alpha_value_to_register): Do not handle
eight byte types.
* i386-tdep.c (i386_convert_register_p): Use i387_convert_register_p.
* i387-tdep.c (i387_convert_register_p): New.
(i387_register_to_value, i387_value_to_register): Update comments.
* i387-tdep.h (i387_convert_register_p): Declare.
* ia64-tdep.c (ia64_convert_register_p): Return zero for
builtin_type_ia64_ext.
(ia64_gdbarch_init): Do not initialize builtin_type_ia64_ext here.
(_initialize_ia64_tdep): Initialize builtin_type_ia64_ext here.
* m68k-tdep.c (m68k_convert_register_p): Return zero for
builtin_type_m68881_ext.
(m68k_register_to_value, m68k_value_to_register): Update comments.
* gdbint.texinfo (Register and Memory Data, Target Conditionals):
Document that gdbarch_convert_register_p should return zero for no-op
conversions.