aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/m68k/tm-m68k.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/config/m68k/tm-m68k.h')
-rw-r--r--gdb/config/m68k/tm-m68k.h13
1 files changed, 10 insertions, 3 deletions
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); \
}