mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* defs.h: Define TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
defaults for bi-endian targets. Replace function pointers for floatformat routines with macros. No need for these to be runtime selectable. * findvar.c: Get rid of floatformat function pointers. Use macros in extract_floating and store_floating. * remote-nindy.c (nindy_fetch_registers nindy_store_registers): Use floatformat macros.
This commit is contained in:
32
gdb/defs.h
32
gdb/defs.h
@@ -874,21 +874,23 @@ extern const struct floatformat floatformat_unknown;
|
||||
# define TARGET_DOUBLE_FORMAT &floatformat_ieee_double_little
|
||||
# endif
|
||||
# endif
|
||||
# ifndef TARGET_LONG_DOUBLE_FORMAT
|
||||
# define TARGET_LONG_DOUBLE_FORMAT &floatformat_unknown
|
||||
# endif
|
||||
#else /* TARGET_BYTE_ORDER_SELECTABLE */
|
||||
# ifndef TARGET_FLOAT_FORMAT
|
||||
Need a definition for target float format
|
||||
# define TARGET_FLOAT_FORMAT (target_byte_order == BIG_ENDIAN \
|
||||
? &floatformat_ieee_single_big \
|
||||
: &floatformat_ieee_single_little)
|
||||
# endif
|
||||
# ifndef TARGET_DOUBLE_FORMAT
|
||||
Need a definition for target double format
|
||||
# endif
|
||||
# ifndef TARGET_LONG_DOUBLE_FORMAT
|
||||
Need a definition for target long double format
|
||||
# define TARGET_DOUBLE_FORMAT (target_byte_order == BIG_ENDIAN \
|
||||
? &floatformat_ieee_double_big \
|
||||
: &floatformat_ieee_double_little)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_LONG_DOUBLE_FORMAT
|
||||
# define TARGET_LONG_DOUBLE_FORMAT &floatformat_unknown
|
||||
#endif
|
||||
|
||||
/* Use `long double' if the host compiler supports it. (Note that this is not
|
||||
necessarily any longer than `double'. On SunOS/gcc, it's the same as
|
||||
double.) This is necessary because GDB internally converts all floating
|
||||
@@ -904,20 +906,14 @@ extern void floatformat_to_long_double PARAMS ((const struct floatformat *,
|
||||
char *, DOUBLEST *));
|
||||
extern void floatformat_from_long_double PARAMS ((const struct floatformat *,
|
||||
DOUBLEST *, char *));
|
||||
#define FLOATFORMAT_TO_DOUBLEST floatformat_to_long_double
|
||||
#define FLOATFORMAT_FROM_DOUBLEST floatformat_from_long_double
|
||||
#else
|
||||
typedef double DOUBLEST;
|
||||
#define FLOATFORMAT_TO_DOUBLEST floatformat_to_double
|
||||
#define FLOATFORMAT_FROM_DOUBLEST floatformat_from_double
|
||||
#endif
|
||||
|
||||
/* Pointer to appropriate conversion routine to convert between target floating
|
||||
point format and DOUBLEST. */
|
||||
|
||||
extern void
|
||||
(*floatformat_to_doublest) PARAMS ((const struct floatformat *,
|
||||
char *, DOUBLEST *));
|
||||
extern void
|
||||
(*floatformat_from_doublest) PARAMS ((const struct floatformat *,
|
||||
DOUBLEST *, char *));
|
||||
|
||||
extern DOUBLEST extract_floating PARAMS ((void *, int));
|
||||
|
||||
extern void store_floating PARAMS ((void *, int, DOUBLEST));
|
||||
|
||||
Reference in New Issue
Block a user