x86: fix loading/storing of Float80 types
This commit is contained in:
parent
af934452af
commit
ae55cba281
1 changed files with 5 additions and 5 deletions
|
@ -354,17 +354,17 @@ genX87Tags(uint16_t ftw, uint8_t top, int8_t spm)
|
||||||
double
|
double
|
||||||
loadFloat80(const void *_mem)
|
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
|
void
|
||||||
storeFloat80(void *_mem, double value)
|
storeFloat80(void *_mem, double value)
|
||||||
{
|
{
|
||||||
fp80_t *fp80((fp80_t *)_mem);
|
fp80_t fp80 = fp80_cvfd(value);
|
||||||
|
memcpy(_mem, fp80.bits, 10);
|
||||||
*fp80 = fp80_cvfd(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace X86_ISA
|
} // namespace X86_ISA
|
||||||
|
|
Loading…
Reference in a new issue