Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
17be9355
Commit
17be9355
authored
Mar 14, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Copy some missing math functions from msvcrt.
parent
799731f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
70 deletions
+67
-70
misc.c
dlls/ntdll/misc.c
+63
-66
ntdll.spec
dlls/ntdll/ntdll.spec
+4
-4
No files found.
dlls/ntdll/misc.c
View file @
17be9355
...
...
@@ -53,72 +53,6 @@ LPCSTR debugstr_us( const UNICODE_STRING *us )
}
/*********************************************************************
* _ftol (NTDLL.@)
*
* VERSION
* [GNUC && i386]
*/
#if defined(__GNUC__) && defined(__i386__)
LONGLONG
CDECL
NTDLL__ftol
(
void
)
{
/* don't just do DO_FPU("fistp",retval), because the rounding
* mode must also be set to "round towards zero"... */
double
fl
;
POP_FPU
(
fl
);
return
(
LONGLONG
)
fl
;
}
#endif
/* defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _ftol (NTDLL.@)
*
* FIXME
* Should be register function
* VERSION
* [!GNUC && i386]
*/
#if !defined(__GNUC__) && defined(__i386__)
LONGLONG
CDECL
NTDLL__ftol
(
double
fl
)
{
FIXME
(
"should be register function
\n
"
);
return
(
LONGLONG
)
fl
;
}
#endif
/* !defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _CIpow (NTDLL.@)
* VERSION
* [GNUC && i386]
*/
#if defined(__GNUC__) && defined(__i386__)
double
CDECL
NTDLL__CIpow
(
void
)
{
double
x
,
y
;
POP_FPU
(
y
);
POP_FPU
(
x
);
return
pow
(
x
,
y
);
}
#endif
/* defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* _CIpow (NTDLL.@)
*
* FIXME
* Should be register function
*
* VERSION
* [!GNUC && i386]
*/
#if !defined(__GNUC__) && defined(__i386__)
double
CDECL
NTDLL__CIpow
(
double
x
,
double
y
)
{
FIXME
(
"should be register function
\n
"
);
return
pow
(
x
,
y
);
}
#endif
/* !defined(__GNUC__) && defined(__i386__) */
/*********************************************************************
* wine_get_version (NTDLL.@)
*/
const
char
*
CDECL
NTDLL_wine_get_version
(
void
)
...
...
@@ -252,6 +186,69 @@ double CDECL NTDLL_tan( double d )
return
tan
(
d
);
}
#if defined(__GNUC__) && defined(__i386__)
#define FPU_DOUBLE(var) double var; \
__asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : )
#define FPU_DOUBLES(var1,var2) double var1,var2; \
__asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \
__asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : )
/*********************************************************************
* _CIcos (NTDLL.@)
*/
double
CDECL
NTDLL__CIcos
(
void
)
{
FPU_DOUBLE
(
x
);
return
NTDLL_cos
(
x
);
}
/*********************************************************************
* _CIlog (NTDLL.@)
*/
double
CDECL
NTDLL__CIlog
(
void
)
{
FPU_DOUBLE
(
x
);
return
NTDLL_log
(
x
);
}
/*********************************************************************
* _CIpow (NTDLL.@)
*/
double
CDECL
NTDLL__CIpow
(
void
)
{
FPU_DOUBLES
(
x
,
y
);
return
NTDLL_pow
(
x
,
y
);
}
/*********************************************************************
* _CIsin (NTDLL.@)
*/
double
CDECL
NTDLL__CIsin
(
void
)
{
FPU_DOUBLE
(
x
);
return
NTDLL_sin
(
x
);
}
/*********************************************************************
* _CIsqrt (NTDLL.@)
*/
double
CDECL
NTDLL__CIsqrt
(
void
)
{
FPU_DOUBLE
(
x
);
return
NTDLL_sqrt
(
x
);
}
/*********************************************************************
* _ftol (NTDLL.@)
*/
LONGLONG
CDECL
NTDLL__ftol
(
void
)
{
FPU_DOUBLE
(
x
);
return
(
LONGLONG
)
x
;
}
#endif
/* defined(__GNUC__) && defined(__i386__) */
static
void
NTDLL_mergesort
(
void
*
arr
,
void
*
barr
,
size_t
elemsize
,
int
(
__cdecl
*
compar
)(
const
void
*
,
const
void
*
),
...
...
dlls/ntdll/ntdll.spec
View file @
17be9355
...
...
@@ -1240,11 +1240,11 @@
@ stub ZwWriteRequestData
@ stdcall ZwWriteVirtualMemory(long ptr ptr long ptr) NtWriteVirtualMemory
@ stdcall ZwYieldExecution() NtYieldExecution
# @ stub
_CIcos
# @ stub
_CIlog
@ cdecl -private -arch=i386 _CIcos() NTDLL_
_CIcos
@ cdecl -private -arch=i386 _CIlog() NTDLL_
_CIlog
@ cdecl -private -arch=i386 _CIpow() NTDLL__CIpow
# @ stub
_CIsin
# @ stub
_CIsqrt
@ cdecl -private -arch=i386 _CIsin() NTDLL_
_CIsin
@ cdecl -private -arch=i386 _CIsqrt() NTDLL_
_CIsqrt
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr)
@ stdcall -private -arch=x86_64 -norelay __chkstk()
# @ stub __isascii
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment