aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/i960/tm-i960.h26
-rw-r--r--gdb/config/m68k/tm-m68k.h13
-rw-r--r--gdb/config/m88k/tm-m88k.h11
3 files changed, 34 insertions, 16 deletions
diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h
index 1337362..9523800 100644
--- a/gdb/config/i960/tm-i960.h
+++ b/gdb/config/i960/tm-i960.h
@@ -169,26 +169,32 @@ extern CORE_ADDR saved_pc_after_call ();
extern struct ext_format ext_format_i960;
-#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
+#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
{ \
- if ((REGNUM) >= FP0_REGNUM) \
- ieee_extended_to_double (&ext_format_i960, (FROM), (double *)(TO)); \
- else \
+ double val; \
+ if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
+ { \
+ ieee_extended_to_double (&ext_format_i960, (FROM), &val); \
+ store_floating ((TO), REGISTER_VIRTUAL_SIZE (REGNUM), val); \
+ } \
+ else \
memcpy ((TO), (FROM), 4); \
}
/* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */
-#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
+#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
{ \
- if ((REGNUM) >= FP0_REGNUM) \
- double_to_ieee_extended (&ext_format_i960, (double *)(FROM), (TO)); \
- else \
- memcpy ((TO), (FROM), 4); \
+ if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
+ { \
+ double val = extract_floating ((FROM), REGISTER_VIRTUAL_SIZE (REGNUM)); \
+ double_to_ieee_extended (&ext_format_i960, &val, (TO)); \
+ } \
+ else \
+ memcpy ((TO), (FROM), 4); \
}
-
/* Return the GDB type object for the "standard" data type
of data in register N. */
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index db7b6a4..a57db13 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -156,8 +156,12 @@ extern const struct ext_format ext_format_68881;
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
{ \
- if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
- ieee_extended_to_double (&ext_format_68881, (FROM), (double *)(TO)); \
+ double val; \
+ if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
+ { \
+ ieee_extended_to_double (&ext_format_68881, (FROM), &val); \
+ store_floating ((TO), REGISTER_VIRTUAL_SIZE (REGNUM), val); \
+ } \
else \
memcpy ((TO), (FROM), 4); \
}
@@ -168,7 +172,10 @@ extern const struct ext_format ext_format_68881;
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
{ \
if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
- double_to_ieee_extended (&ext_format_68881, (double *)(FROM), (TO)); \
+ { \
+ double val = extract_floating ((FROM), REGISTER_VIRTUAL_SIZE (REGNUM)); \
+ double_to_ieee_extended (&ext_format_68881, &val, (TO)); \
+ } \
else \
memcpy ((TO), (FROM), 4); \
}
diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h
index 68bdd61..c8a7d9b 100644
--- a/gdb/config/m88k/tm-m88k.h
+++ b/gdb/config/m88k/tm-m88k.h
@@ -386,10 +386,13 @@ if (!target_is_m88110) \
#define REGISTER_CONVERTIBLE(N) ((N) >= XFP_REGNUM)
- /* Convert data from raw format for register REGNUM
- to virtual format for register REGNUM. */
+extern const struct ext_format ext_format_m88110;
+
+/* Convert data from raw format for register REGNUM
+ to virtual format for register REGNUM. */
+
+/* FIXME: Use store_floating like tm-m68k.h. */
- extern const struct ext_format ext_format_m88110;
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
{ \
if ((REGNUM) < XFP_REGNUM) \
@@ -401,6 +404,8 @@ if (!target_is_m88110) \
/* Convert data from virtual format for register REGNUM
to raw format for register REGNUM. */
+/* FIXME: Use extract_floating like tm-m68k.h. */
+
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
{ \
if ((REGNUM) < XFP_REGNUM) \