diff options
author | Stu Grossman <grossman@cygnus> | 1996-04-12 16:53:08 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1996-04-12 16:53:08 +0000 |
commit | c6fbd98bed167d79e49c0d4a38b5432853f11799 (patch) | |
tree | 3e8906fb8ca09716451258bd1d0281cd3189e52a /gdb/findvar.c | |
parent | 9b1271617bf446b2015601820d2f996b3d16fe8a (diff) | |
download | gdb-c6fbd98bed167d79e49c0d4a38b5432853f11799.zip gdb-c6fbd98bed167d79e49c0d4a38b5432853f11799.tar.gz gdb-c6fbd98bed167d79e49c0d4a38b5432853f11799.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index 7764a21..6cb7d37 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -34,22 +34,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ const struct floatformat floatformat_unknown; -#ifdef HAVE_LONG_DOUBLE -void (*floatformat_to_doublest) - PARAMS ((const struct floatformat *, - char *, DOUBLEST *)) = floatformat_to_long_double; -void (*floatformat_from_doublest) - PARAMS ((const struct floatformat *, - DOUBLEST *, char *)) = floatformat_from_long_double; -#else -void (*floatformat_to_doublest) - PARAMS ((const struct floatformat *, - char *, DOUBLEST *)) = floatformat_to_double; -void (*floatformat_from_doublest) - PARAMS ((const struct floatformat *, - DOUBLEST *, char *)) = floatformat_from_double; -#endif - /* Registers we shouldn't try to store. */ #if !defined (CANNOT_STORE_REGISTER) #define CANNOT_STORE_REGISTER(regno) 0 @@ -320,7 +304,7 @@ extract_floating (addr, len) return retval; } else - floatformat_to_doublest (TARGET_FLOAT_FORMAT, addr, &dretval); + FLOATFORMAT_TO_DOUBLEST (TARGET_FLOAT_FORMAT, addr, &dretval); } else if (len == sizeof (double)) { @@ -332,7 +316,7 @@ extract_floating (addr, len) return retval; } else - floatformat_to_doublest (TARGET_DOUBLE_FORMAT, addr, &dretval); + FLOATFORMAT_TO_DOUBLEST (TARGET_DOUBLE_FORMAT, addr, &dretval); } else if (len == sizeof (DOUBLEST)) { @@ -344,7 +328,7 @@ extract_floating (addr, len) return retval; } else - floatformat_to_doublest (TARGET_LONG_DOUBLE_FORMAT, addr, &dretval); + FLOATFORMAT_TO_DOUBLEST (TARGET_LONG_DOUBLE_FORMAT, addr, &dretval); } else { @@ -369,7 +353,7 @@ store_floating (addr, len, val) memcpy (addr, &floatval, sizeof (floatval)); } else - floatformat_from_doublest (TARGET_FLOAT_FORMAT, &val, addr); + FLOATFORMAT_FROM_DOUBLEST (TARGET_FLOAT_FORMAT, &val, addr); } else if (len == sizeof (double)) { @@ -380,14 +364,14 @@ store_floating (addr, len, val) memcpy (addr, &doubleval, sizeof (doubleval)); } else - floatformat_from_doublest (TARGET_DOUBLE_FORMAT, &val, addr); + FLOATFORMAT_FROM_DOUBLEST (TARGET_DOUBLE_FORMAT, &val, addr); } else if (len == sizeof (DOUBLEST)) { if (HOST_LONG_DOUBLE_FORMAT == TARGET_LONG_DOUBLE_FORMAT) memcpy (addr, &val, sizeof (val)); else - floatformat_from_doublest (TARGET_LONG_DOUBLE_FORMAT, &val, addr); + FLOATFORMAT_FROM_DOUBLEST (TARGET_LONG_DOUBLE_FORMAT, &val, addr); } else { |