diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-04-17 10:50:33 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-04-17 10:50:33 +0200 |
| commit | 248cd2e749dcc5931113a405e232e9a90c130089 (patch) | |
| tree | 6eddccb3f60c2969ae2a839280866f91a4a6fb0a /src/emu | |
| parent | 3b550eeed3ecd47546ad0c0664a458af463c57af (diff) | |
| download | box64-248cd2e749dcc5931113a405e232e9a90c130089.tar.gz box64-248cd2e749dcc5931113a405e232e9a90c130089.zip | |
Fixed nexttoward(f) wrapped functions, and improved long double handling
Diffstat (limited to 'src/emu')
| -rwxr-xr-x | src/emu/x87emu_private.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/emu/x87emu_private.c b/src/emu/x87emu_private.c index 5f638bfb..cd35c116 100755 --- a/src/emu/x87emu_private.c +++ b/src/emu/x87emu_private.c @@ -196,6 +196,21 @@ double FromLD(void* ld) return ret; } +#ifndef HAVE_LD80BITS +long double LD2localLD(void* ld) +{ + // local implementation may not be try Quad precision, but double-double precision, so simple way to keep the 80bits precision in the conversion + double ret; + LD2D(ld, &ret); + return ret; +} +#else +long double LD2localLD(void* ld) +{ + return *(long double*)ld; +} +#endif + void fpu_loadenv(x64emu_t* emu, char* p, int b16) { emu->cw = *(uint16_t*)p; |