Commit abe0823b authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Implemented a few trivial math functions.

parent d72da002
......@@ -488,7 +488,7 @@
@ cdecl __wgetmainargs(ptr ptr ptr long ptr) msvcrt.__wgetmainargs
@ extern __winitenv msvcrt.__winitenv
@ cdecl _abnormal_termination() msvcrt._abnormal_termination
@ stub _abs64
@ cdecl -ret64 _abs64(int64) msvcrt._abs64
@ cdecl _access(str long) msvcrt._access
@ cdecl _access_s(str long) msvcrt._access_s
@ extern _acmdln msvcrt._acmdln
......@@ -1049,9 +1049,9 @@
@ cdecl _rmdir(str) msvcrt._rmdir
@ cdecl _rmtmp() msvcrt._rmtmp
@ cdecl _rotl(long long) msvcrt._rotl
@ stub _rotl64
@ cdecl -ret64 _rotl64(int64 long) msvcrt._rotl64
@ cdecl _rotr(long long) msvcrt._rotr
@ stub _rotr64
@ cdecl -ret64 _rotr64(int64 long) msvcrt._rotr64
@ cdecl _scalb(double long) msvcrt._scalb
@ varargs _scanf_l(str ptr) msvcrt._scanf_l
@ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l
......
......@@ -312,7 +312,7 @@
@ cdecl __wgetmainargs(ptr ptr ptr long ptr) msvcrt.__wgetmainargs
@ extern __winitenv msvcrt.__winitenv
@ cdecl _abnormal_termination() msvcrt._abnormal_termination
@ stub _abs64
@ cdecl -ret64 _abs64(int64) msvcrt._abs64
@ cdecl _access(str long) msvcrt._access
@ cdecl _access_s(str long) msvcrt._access_s
@ extern _acmdln msvcrt._acmdln
......@@ -897,9 +897,9 @@
@ cdecl _rmdir(str) msvcrt._rmdir
@ cdecl _rmtmp() msvcrt._rmtmp
@ cdecl _rotl(long long) msvcrt._rotl
@ stub _rotl64
@ cdecl -ret64 _rotl64(int64 long) msvcrt._rotl64
@ cdecl _rotr(long long) msvcrt._rotr
@ stub _rotr64
@ cdecl -ret64 _rotr64(int64 long) msvcrt._rotr64
@ cdecl -arch=i386 _safe_fdiv() msvcrt._safe_fdiv
@ cdecl -arch=i386 _safe_fdivr() msvcrt._safe_fdivr
@ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem
......
......@@ -304,7 +304,7 @@
@ cdecl __wgetmainargs(ptr ptr ptr long ptr) msvcrt.__wgetmainargs
@ extern __winitenv msvcrt.__winitenv
@ cdecl _abnormal_termination() msvcrt._abnormal_termination
@ stub _abs64
@ cdecl -ret64 _abs64(int64) msvcrt._abs64
@ cdecl _access(str long) msvcrt._access
@ cdecl _access_s(str long) msvcrt._access_s
@ extern _acmdln msvcrt._acmdln
......@@ -883,9 +883,9 @@
@ cdecl _rmdir(str) msvcrt._rmdir
@ cdecl _rmtmp() msvcrt._rmtmp
@ cdecl _rotl(long long) msvcrt._rotl
@ stub _rotl64
@ cdecl -ret64 _rotl64(int64 long) msvcrt._rotl64
@ cdecl _rotr(long long) msvcrt._rotr
@ stub _rotr64
@ cdecl -ret64 _rotr64(int64 long) msvcrt._rotr64
@ cdecl -arch=i386 _safe_fdiv() msvcrt._safe_fdiv
@ cdecl -arch=i386 _safe_fdivr() msvcrt._safe_fdivr
@ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem
......
......@@ -640,15 +640,6 @@ unsigned int CDECL _rotl(unsigned int num, int shift)
}
/*********************************************************************
* _logb (MSVCRT.@)
*/
double CDECL _logb(double num)
{
if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
return logb(num);
}
/*********************************************************************
* _lrotl (MSVCRT.@)
*/
MSVCRT_ulong CDECL MSVCRT__lrotl(MSVCRT_ulong num, int shift)
......@@ -676,6 +667,57 @@ unsigned int CDECL _rotr(unsigned int num, int shift)
}
/*********************************************************************
* _rotl64 (MSVCRT.@)
*/
unsigned __int64 CDECL _rotl64(unsigned __int64 num, int shift)
{
shift &= 63;
return (num << shift) | (num >> (64-shift));
}
/*********************************************************************
* _rotr64 (MSVCRT.@)
*/
unsigned __int64 CDECL _rotr64(unsigned __int64 num, int shift)
{
shift &= 63;
return (num >> shift) | (num << (64-shift));
}
/*********************************************************************
* abs (MSVCRT.@)
*/
int CDECL MSVCRT_abs( int n )
{
return n >= 0 ? n : -n;
}
/*********************************************************************
* labs (MSVCRT.@)
*/
MSVCRT_long CDECL MSVCRT_labs( MSVCRT_long n )
{
return n >= 0 ? n : -n;
}
/*********************************************************************
* _abs64 (MSVCRT.@)
*/
__int64 CDECL _abs64( __int64 n )
{
return n >= 0 ? n : -n;
}
/*********************************************************************
* _logb (MSVCRT.@)
*/
double CDECL _logb(double num)
{
if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
return logb(num);
}
/*********************************************************************
* _scalb (MSVCRT.@)
*/
double CDECL MSVCRT__scalb(double num, MSVCRT_long power)
......
......@@ -269,7 +269,7 @@
@ cdecl __wgetmainargs(ptr ptr ptr long ptr)
@ extern __winitenv MSVCRT___winitenv
@ cdecl _abnormal_termination()
# stub _abs64
@ cdecl -ret64 _abs64(int64)
@ cdecl _access(str long) MSVCRT__access
@ cdecl _access_s(str long)
@ extern _acmdln MSVCRT__acmdln
......@@ -840,9 +840,9 @@
@ cdecl _rmdir(str) MSVCRT__rmdir
@ cdecl _rmtmp()
@ cdecl _rotl(long long)
# stub _rotl64
@ cdecl -ret64 _rotl64(int64 long)
@ cdecl _rotr(long long)
# stub _rotr64
@ cdecl -ret64 _rotr64(int64 long)
@ cdecl -arch=i386 _safe_fdiv()
@ cdecl -arch=i386 _safe_fdivr()
@ cdecl -arch=i386 _safe_fprem()
......@@ -1210,7 +1210,7 @@
@ cdecl _y1(double)
@ cdecl _yn(long double )
@ cdecl abort() MSVCRT_abort
@ cdecl abs(long) ntdll.abs
@ cdecl abs(long) MSVCRT_abs
@ cdecl acos(double) MSVCRT_acos
@ cdecl -arch=x86_64 acosf(float) MSVCRT_acosf
@ cdecl asctime(ptr) MSVCRT_asctime
......@@ -1316,7 +1316,7 @@
@ cdecl iswupper(long) MSVCRT_iswupper
@ cdecl iswxdigit(long) MSVCRT_iswxdigit
@ cdecl isxdigit(long) MSVCRT_isxdigit
@ cdecl labs(long) ntdll.labs
@ cdecl labs(long) MSVCRT_labs
@ cdecl ldexp( double long) MSVCRT_ldexp
@ cdecl ldiv(long long) MSVCRT_ldiv
@ cdecl localeconv() MSVCRT_localeconv
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment