summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorTony Gutierrez <anthony.gutierrez@amd.com>2016-11-19 12:35:14 -0500
committerTony Gutierrez <anthony.gutierrez@amd.com>2016-11-19 12:35:14 -0500
commitae55cba281bb37390335f5ad1e5f0f02820a75f8 (patch)
treec2ee7d215ebe0893af8f4624f42b49fb60a2c6a9 /src/arch/x86
parentaf934452af57df02100aa17836fdbb21c68a77a8 (diff)
downloadgem5-ae55cba281bb37390335f5ad1e5f0f02820a75f8.tar.xz
x86: fix loading/storing of Float80 types
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/utility.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/x86/utility.cc b/src/arch/x86/utility.cc
index cf3072348..eb0247d7f 100644
--- a/src/arch/x86/utility.cc
+++ b/src/arch/x86/utility.cc
@@ -354,17 +354,17 @@ genX87Tags(uint16_t ftw, uint8_t top, int8_t spm)
double
loadFloat80(const void *_mem)
{
- const fp80_t *fp80((const fp80_t *)_mem);
+ fp80_t fp80;
+ memcpy(fp80.bits, _mem, 10);
- return fp80_cvtd(*fp80);
+ return fp80_cvtd(fp80);
}
void
storeFloat80(void *_mem, double value)
{
- fp80_t *fp80((fp80_t *)_mem);
-
- *fp80 = fp80_cvfd(value);
+ fp80_t fp80 = fp80_cvfd(value);
+ memcpy(_mem, fp80.bits, 10);
}
} // namespace X86_ISA