projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af93445
)
x86: fix loading/storing of Float80 types
author
Tony Gutierrez
<anthony.gutierrez@amd.com>
Sat, 19 Nov 2016 17:35:14 +0000
(12:35 -0500)
committer
Tony Gutierrez
<anthony.gutierrez@amd.com>
Sat, 19 Nov 2016 17:35:14 +0000
(12:35 -0500)
src/arch/x86/utility.cc
patch
|
blob
|
history
diff --git
a/src/arch/x86/utility.cc
b/src/arch/x86/utility.cc
index cf30723487bb03eefb3b49f047e405b02b054ae2..eb0247d7fb32645c5597760e873d185b086f6112 100644
(file)
--- 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