18 April 2018, 17:08 | #1 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
|
Request: Long double (80bit) functions in x86/x64 assembly for WinUAE
Another weird request, eab probably is wrong forum but...
Because MSVC does not support long doubles (they are alias to double. No, don't discuss any reasons here!) and I'd like to have host FPU emulated long double support (not everyone wants or needs slower bit perfect softfloat floating point emulation). So I'd like to do following ugly solution: I need x86/x64 assembly file that has functions for each basic floating point function that takes two parameters, input (pointer to long double) and output (also pointer to long double) For example following C code in x86/x64 assemly: Code:
void fadd(void *srclongdouble, void *dstlongdouble) { long double *src = (long double*)srclongdouble; long double *dst = (long double*)dstlongdouble; *dst = (*src) + (*dst); } Same for all other basic floating point functions. (sub, neg, mul, div etc..) but I am sure I can do them if I have one simple example (fadd) that handles weird x86 FPU stack stuff I don't want to know... And functions to convert long double to int/double and back. |
20 April 2018, 05:56 | #2 |
Registered User
Join Date: Nov 2014
Location: NSW/Australia
Posts: 462
|
Apologies as it's not exactly what you are after but have you considered the Berkeley Soft Float library? http://www.jhauser.us/arithmetic/SoftFloat.html It supports 80-bit double precision.
At worst it might be useful to compile it and see what the resulting assembly looks like for the functions you are after if noone can help. |
20 April 2018, 08:50 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
|
Softfloat is already used in softfloat mode but it is much slower than native FPU because it needs lots of integer calculations, some of them need to be 128 bit wide.
I want to use host FPU directly. EDIT: I think I finally got it. (also: x86 syntax is ugly) Last edited by Toni Wilen; 23 April 2018 at 21:46. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Request Fectures] For x86 bridge boards. | Zilog | support.WinUAE | 3 | 06 December 2017 09:47 |
Instructions for building QEMU plugins (x86 and x64) from source? | headkase | support.WinUAE | 31 | 10 July 2016 16:01 |
WinUAE x64 Crahses | BlackByte | support.WinUAE | 9 | 23 December 2015 12:51 |
REQUEST: Build latest vasm for win7 x64 | jimmy2x2x | Coders. General | 6 | 21 November 2014 18:06 |
Lost F key Functions on WINuae startup | breadbaker | support.WinUAE | 8 | 06 December 2005 20:09 |
|
|