msvcrt: Add a number of floating point functions for 64-bit.

This commit is contained in:
Alexandre Julliard 2012-08-16 18:03:27 +02:00
parent 5dfc2a34ea
commit f80d443f5c
4 changed files with 97 additions and 11 deletions

View File

@ -532,6 +532,7 @@
@ cdecl _chdir(str) msvcrt._chdir
@ cdecl _chdrive(long) msvcrt._chdrive
@ cdecl _chgsign(double) msvcrt._chgsign
@ cdecl -arch=x86_64 _chgsignf(float) msvcrt._chgsignf
@ cdecl -i386 -norelay _chkesp() msvcrt._chkesp
@ cdecl _chmod(str long) msvcrt._chmod
@ cdecl _chsize(long long) msvcrt._chsize
@ -545,6 +546,7 @@
@ cdecl _controlfp(long long) msvcrt._controlfp
@ cdecl _controlfp_s(ptr long long) msvcrt._controlfp_s
@ cdecl _copysign(double double) msvcrt._copysign
@ cdecl -arch=x86_64 _copysignf(float float) msvcrt._copysignf
@ varargs _cprintf(str) msvcrt._cprintf
@ stub _cprintf_l
@ stub _cprintf_p
@ -627,10 +629,12 @@
@ cdecl _findnext64(long ptr) msvcrt._findnext64
@ cdecl _findnext64i32(long ptr) msvcrt._findnext64i32
@ cdecl _finite(double) msvcrt._finite
@ cdecl -arch=x86_64 _finitef(float) msvcrt._finitef
@ cdecl _flsbuf(long ptr) msvcrt._flsbuf
@ cdecl _flushall() msvcrt._flushall
@ extern _fmode msvcrt._fmode
@ cdecl _fpclass(double) msvcrt._fpclass
# stub -arch=x86_64 _fpclassf
@ cdecl _fpieee_flt(long ptr ptr) msvcrt._fpieee_flt
@ cdecl _fpreset() msvcrt._fpreset
@ stub _fprintf_l
@ -815,6 +819,7 @@
@ cdecl _ismbstrail(ptr ptr) msvcrt._ismbstrail
@ stub _ismbstrail_l
@ cdecl _isnan(double) msvcrt._isnan
@ cdecl -arch=x86_64 _isnanf(float) msvcrt._isnanf
@ cdecl _isprint_l(long ptr) msvcrt._isprint_l
@ stub _ispunct_l
@ cdecl _isspace_l(long ptr) msvcrt._isspace_l
@ -856,6 +861,7 @@
@ cdecl _lock_file(ptr) msvcrt._lock_file
@ cdecl _locking(long long long) msvcrt._locking
@ cdecl _logb(double) msvcrt._logb
@ cdecl -arch=x86_64 _logbf(float) msvcrt._logbf
@ cdecl -i386 _longjmpex(ptr long) msvcrt._longjmpex
@ cdecl _lrotl(long long) msvcrt._lrotl
@ cdecl _lrotr(long long) msvcrt._lrotr
@ -1018,6 +1024,7 @@
@ cdecl _mktime64(ptr) msvcrt._mktime64
@ cdecl _msize(ptr) msvcrt._msize
@ cdecl _nextafter(double double) msvcrt._nextafter
@ cdecl -arch=x86_64 _nextafterf(float float) msvcrt._nextafterf
@ cdecl _onexit(ptr) msvcrt._onexit
@ varargs _open(str long) msvcrt._open
@ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle
@ -1055,6 +1062,7 @@
@ cdecl _rotr(long long) msvcrt._rotr
@ cdecl -ret64 _rotr64(int64 long) msvcrt._rotr64
@ cdecl _scalb(double long) msvcrt._scalb
@ cdecl -arch=x86_64 _scalbf(float long) msvcrt._scalbf
@ varargs _scanf_l(str ptr) msvcrt._scanf_l
@ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l
@ varargs _scprintf(str) msvcrt._scprintf
@ -1084,6 +1092,7 @@
@ cdecl _seterrormode(long) msvcrt._seterrormode
@ cdecl -arch=i386,x86_64 -norelay _setjmp(ptr) msvcrt._setjmp
@ cdecl -arch=i386 -norelay _setjmp3(ptr long) msvcrt._setjmp3
@ cdecl -arch=x86_64 -norelay _setjmpex(ptr ptr) msvcrt._setjmpex
@ cdecl _setmaxstdio(long) msvcrt._setmaxstdio
@ cdecl _setmbcp(long) msvcrt._setmbcp
@ cdecl _setmode(long long) msvcrt._setmode
@ -1424,11 +1433,15 @@
@ cdecl abort() msvcrt.abort
@ cdecl abs(long) msvcrt.abs
@ cdecl acos(double) msvcrt.acos
@ cdecl -arch=x86_64 acosf(float) msvcrt.acosf
@ cdecl asctime(ptr) msvcrt.asctime
@ cdecl asctime_s(ptr long ptr) msvcrt.asctime_s
@ cdecl asin(double) msvcrt.asin
@ cdecl -arch=x86_64 asinf(float) msvcrt.asinf
@ cdecl atan(double) msvcrt.atan
@ cdecl -arch=x86_64 atanf(float) msvcrt.atanf
@ cdecl atan2(double double) msvcrt.atan2
@ cdecl -arch=x86_64 atan2f(float float) msvcrt.atan2f
@ cdecl atexit(ptr) msvcrt.atexit
@ cdecl atof(str) msvcrt.atof
@ cdecl atoi(str) msvcrt.atoi
@ -1438,14 +1451,18 @@
@ cdecl btowc(long) msvcrt.btowc
@ cdecl calloc(long long) msvcrt.calloc
@ cdecl ceil(double) msvcrt.ceil
@ cdecl -arch=x86_64 ceilf(float) msvcrt.ceilf
@ cdecl clearerr(ptr) msvcrt.clearerr
@ stub clearerr_s
@ cdecl clock() msvcrt.clock
@ cdecl cos(double) msvcrt.cos
@ cdecl -arch=x86_64 cosf(float) msvcrt.cosf
@ cdecl cosh(double) msvcrt.cosh
@ cdecl -arch=x86_64 coshf(float) msvcrt.coshf
@ cdecl -ret64 div(long long) msvcrt.div
@ cdecl exit(long) msvcrt.exit
@ cdecl exp(double) msvcrt.exp
@ cdecl -arch=x86_64 expf(float) msvcrt.expf
@ cdecl fabs(double) msvcrt.fabs
@ cdecl fclose(ptr) msvcrt.fclose
@ cdecl feof(ptr) msvcrt.feof
@ -1457,7 +1474,9 @@
@ cdecl fgetwc(ptr) msvcrt.fgetwc
@ cdecl fgetws(ptr long ptr) msvcrt.fgetws
@ cdecl floor(double) msvcrt.floor
@ cdecl -arch=x86_64 floorf(float) msvcrt.floorf
@ cdecl fmod(double double) msvcrt.fmod
@ cdecl -arch=x86_64 fmodf(float float) msvcrt.fmodf
@ cdecl fopen(str str) msvcrt.fopen
@ cdecl fopen_s(ptr str str) msvcrt.fopen_s
@ varargs fprintf(ptr str) msvcrt.fprintf
@ -1523,7 +1542,9 @@
@ stub lldiv
@ cdecl localeconv() msvcrt.localeconv
@ cdecl log(double) msvcrt.log
@ cdecl -arch=x86_64 logf(float) msvcrt.logf
@ cdecl log10(double) msvcrt.log10
@ cdecl -arch=x86_64 log10f(float) msvcrt.log10f
@ cdecl -arch=i386,x86_64 longjmp(ptr long) msvcrt.longjmp
@ cdecl malloc(long) msvcrt.malloc
@ cdecl mblen(ptr long) msvcrt.mblen
@ -1542,8 +1563,10 @@
@ cdecl memmove_s(ptr long ptr long) msvcrt.memmove_s
@ cdecl memset(ptr long long) msvcrt.memset
@ cdecl modf(double ptr) msvcrt.modf
@ cdecl -arch=x86_64 modff(float ptr) msvcrt.modff
@ cdecl perror(str) msvcrt.perror
@ cdecl pow(double double) msvcrt.pow
@ cdecl -arch=x86_64 powf(float float) msvcrt.powf
@ varargs printf(str) msvcrt.printf
@ varargs printf_s(str) msvcrt.printf_s
@ cdecl putc(long ptr) msvcrt.putc
@ -1563,14 +1586,18 @@
@ varargs scanf(str) msvcrt.scanf
@ varargs scanf_s(str) msvcrt.scanf_s
@ cdecl setbuf(ptr ptr) msvcrt.setbuf
@ cdecl -arch=x86_64 -norelay -private setjmp(ptr) msvcrt.setjmp
@ cdecl setlocale(long str) msvcrt.setlocale
@ cdecl setvbuf(ptr str long long) msvcrt.setvbuf
@ cdecl signal(long long) msvcrt.signal
@ cdecl sin(double) msvcrt.sin
@ cdecl -arch=x86_64 sinf(float) msvcrt.sinf
@ cdecl sinh(double) msvcrt.sinh
@ cdecl -arch=x86_64 sinhf(float) msvcrt.sinhf
@ varargs sprintf(ptr str) msvcrt.sprintf
@ varargs sprintf_s(ptr long str) msvcrt.sprintf_s
@ cdecl sqrt(double) msvcrt.sqrt
@ cdecl -arch=x86_64 sqrtf(float) msvcrt.sqrtf
@ cdecl srand(long) msvcrt.srand
@ varargs sscanf(str str) msvcrt.sscanf
@ varargs sscanf_s(str str) msvcrt.sscanf_s
@ -1607,7 +1634,9 @@
@ varargs swscanf_s(wstr wstr) msvcrt.swscanf_s
@ cdecl system(str) msvcrt.system
@ cdecl tan(double) msvcrt.tan
@ cdecl -arch=x86_64 tanf(float) msvcrt.tanf
@ cdecl tanh(double) msvcrt.tanh
@ cdecl -arch=x86_64 tanhf(float) msvcrt.tanhf
@ cdecl tmpfile() msvcrt.tmpfile
@ cdecl tmpfile_s(ptr) msvcrt.tmpfile_s
@ cdecl tmpnam(ptr) msvcrt.tmpnam

View File

@ -376,7 +376,7 @@
@ cdecl _controlfp(long long) msvcrt._controlfp
@ cdecl _controlfp_s(ptr long long) msvcrt._controlfp_s
@ cdecl _copysign(double double) msvcrt._copysign
# stub -arch=win64 _copysignf(float float)
@ cdecl -arch=x86_64 _copysignf(float float) msvcrt._copysignf
@ varargs _cprintf(str) msvcrt._cprintf
@ stub _cprintf_l
@ stub _cprintf_p
@ -461,7 +461,7 @@
@ cdecl _findnext64(long ptr) msvcrt._findnext64
@ cdecl _findnext64i32(long ptr) msvcrt._findnext64i32
@ cdecl _finite(double) msvcrt._finite
# stub -arch=win64 _finitef(float)
@ cdecl -arch=x86_64 _finitef(float) msvcrt._finitef
@ cdecl _flsbuf(long ptr) msvcrt._flsbuf
@ cdecl _flushall() msvcrt._flushall
@ extern _fmode msvcrt._fmode
@ -652,7 +652,7 @@
@ cdecl _ismbstrail(ptr ptr) msvcrt._ismbstrail
@ stub _ismbstrail_l
@ cdecl _isnan(double) msvcrt._isnan
# stub -arch=win64 _isnanf(float)
@ cdecl -arch=x86_64 _isnanf(float) msvcrt._isnanf
@ cdecl _isprint_l(long ptr) msvcrt._isprint_l
@ stub _ispunct_l
@ cdecl _isspace_l(long ptr) msvcrt._isspace_l
@ -694,7 +694,7 @@
@ cdecl _lock_file(ptr) msvcrt._lock_file
@ cdecl _locking(long long long) msvcrt._locking
@ cdecl _logb(double) msvcrt._logb
# stub _logbf(float)
@ cdecl -arch=x86_64 _logbf(float) msvcrt._logbf
@ cdecl -i386 _longjmpex(ptr long) msvcrt._longjmpex
@ cdecl _lrotl(long long) msvcrt._lrotl
@ cdecl _lrotr(long long) msvcrt._lrotr
@ -857,7 +857,7 @@
@ cdecl _mktime64(ptr) msvcrt._mktime64
@ cdecl _msize(ptr) msvcrt._msize
@ cdecl _nextafter(double double) msvcrt._nextafter
# stub -arch=win64 _nextafterf(float float)
@ cdecl -arch=x86_64 _nextafterf(float float) msvcrt._nextafterf
@ cdecl _onexit(ptr) msvcrt._onexit
@ varargs _open(str long) msvcrt._open
@ cdecl _open_osfhandle(long long) msvcrt._open_osfhandle

View File

@ -70,6 +70,63 @@ int CDECL MSVCRT__set_SSE2_enable(int flag)
#ifdef __x86_64__
/*********************************************************************
* _chgsignf (MSVCRT.@)
*/
float CDECL MSVCRT__chgsignf( float num )
{
/* FIXME: +-infinity,Nan not tested */
return -num;
}
/*********************************************************************
* _copysignf (MSVCRT.@)
*/
float CDECL MSVCRT__copysignf( float num, float sign )
{
/* FIXME: Behaviour for Nan/Inf? */
if (sign < 0.0)
return num < 0.0 ? num : -num;
return num < 0.0 ? -num : num;
}
/*********************************************************************
* _finitef (MSVCRT.@)
*/
int CDECL MSVCRT__finitef( float num )
{
return finitef(num) != 0; /* See comment for _isnan() */
}
/*********************************************************************
* _isnanf (MSVCRT.@)
*/
INT CDECL MSVCRT__isnanf( float num )
{
/* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
* Do the same, as the result may be used in calculations
*/
return isnanf(num) != 0;
}
/*********************************************************************
* _logbf (MSVCRT.@)
*/
float CDECL MSVCRT__logbf( float num )
{
if (!finitef(num)) *MSVCRT__errno() = MSVCRT_EDOM;
return logbf(num);
}
/*********************************************************************
* _nextafterf (MSVCRT.@)
*/
float CDECL MSVCRT__nextafterf( float num, float next )
{
if (!finitef(num) || !finitef(next)) *MSVCRT__errno() = MSVCRT_EDOM;
return nextafterf( num, next );
}
/*********************************************************************
* MSVCRT_acosf (MSVCRT.@)
*/

View File

@ -325,7 +325,7 @@
@ cdecl _chdir(str) MSVCRT__chdir
@ cdecl _chdrive(long) MSVCRT__chdrive
@ cdecl _chgsign(double) MSVCRT__chgsign
# stub -arch=win64 _chgsignf(float)
@ cdecl -arch=x86_64 _chgsignf(float) MSVCRT__chgsignf
@ cdecl -i386 -norelay _chkesp()
@ cdecl _chmod(str long) MSVCRT__chmod
@ cdecl _chsize(long long) MSVCRT__chsize
@ -340,7 +340,7 @@
@ cdecl _controlfp(long long)
@ cdecl _controlfp_s(ptr long long)
@ cdecl _copysign(double double) MSVCRT__copysign
# stub -arch=win64 _copysignf(float float)
@ cdecl -arch=x86_64 _copysignf(float float) MSVCRT__copysignf
@ varargs _cprintf(str)
# stub _cprintf_l(str ptr)
# stub _cprintf_p(str)
@ -423,7 +423,7 @@
@ cdecl _findnext64i32(long ptr) MSVCRT__findnext64i32
@ cdecl _findnexti64(long ptr) MSVCRT__findnexti64
@ cdecl _finite(double) MSVCRT__finite
# stub -arch=win64 _finitef(float)
@ cdecl -arch=x86_64 _finitef(float) MSVCRT__finitef
@ cdecl _flsbuf(long ptr) MSVCRT__flsbuf
@ cdecl _flushall() MSVCRT__flushall
@ extern _fmode MSVCRT__fmode
@ -599,7 +599,7 @@
@ cdecl _ismbstrail(ptr ptr)
# stub _ismbstrail_l(long ptr)
@ cdecl _isnan(double) MSVCRT__isnan
# stub -arch=win64 _isnanf(float)
@ cdecl -arch=x86_64 _isnanf(float) MSVCRT__isnanf
@ cdecl _isprint_l(long ptr) MSVCRT__isprint_l
@ cdecl _isspace_l(long ptr) MSVCRT__isspace_l
@ cdecl _isupper_l(long ptr) MSVCRT__isupper_l
@ -638,7 +638,7 @@
@ cdecl _lock_file(ptr) MSVCRT__lock_file
@ cdecl _locking(long long long) MSVCRT__locking
@ cdecl _logb(double) MSVCRT__logb
# stub _logbf(float)
@ cdecl -arch=x86_64 _logbf(float) MSVCRT__logbf
@ cdecl -i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
@ -808,7 +808,7 @@
# stub -arch=win32 _msize_debug(ptr long)
# stub -arch=win64 _msize_dbg(ptr long)
@ cdecl _nextafter(double double) MSVCRT__nextafter
# stub -arch=win64 _nextafterf(float float)
@ cdecl -arch=x86_64 _nextafterf(float float) MSVCRT__nextafterf
@ cdecl _onexit(ptr) MSVCRT__onexit
@ varargs _open(str long) MSVCRT__open
@ cdecl _open_osfhandle(long long) MSVCRT__open_osfhandle