2009-09-15 Kai Tietz <kai.tietz@onevision.com>

* lib32/lib64: Add symbols _localtime32, _gmtime32, and _mkgmtime32.
        * misc/...: Add version for 32-bit time_t case.



git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@1370 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
Kai Tietz 2009-09-15 19:08:18 +00:00
parent 99b326bf23
commit ef996a31cd
23 changed files with 104 additions and 35 deletions

View File

@ -1,3 +1,8 @@
2009-09-15 Kai Tietz <kai.tietz@onevision.com>
* lib32/lib64: Add symbols _localtime32, _gmtime32, and _mkgmtime32.
* misc/...: Add version for 32-bit time_t case.
2009-09-10 Kai Tietz <kai.tietz@onevision.com>
* lib32/ and lib64/: Comment in msvcrXX.def and in msvcrt.def the

View File

@ -402,6 +402,9 @@ _mbsupr
_memccpy
_memicmp
_mkdir
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_mktemp
_msize
_nextafter
@ -559,6 +562,7 @@ getchar
getenv
gets
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -590,6 +594,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
longjmp

View File

@ -329,6 +329,9 @@ _mbsstr
_mbstok
_mbstrlen
_mbsupr
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_memccpy
_memicmp
_mkdir
@ -568,6 +571,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -599,6 +603,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
longjmp

View File

@ -570,6 +570,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -601,6 +602,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
longjmp
@ -720,6 +722,9 @@ _ftime64
_futime64
_gmtime64
_localtime64
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_mbcasemap
_mktime64
_osplatform DATA

View File

@ -428,6 +428,7 @@ _memccpy
_memicmp
_mkdir
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_mktemp
_mktime64
@ -697,6 +698,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -728,6 +730,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
log10f

View File

@ -429,6 +429,7 @@ _memccpy
_memicmp
_mkdir
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_mktemp
_mktime64
@ -698,6 +699,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -729,6 +731,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
log10f

View File

@ -429,6 +429,7 @@ _memccpy
_memicmp
_mkdir
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_mktemp
_mktime64
@ -699,6 +700,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -730,6 +732,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
;log10f

View File

@ -401,6 +401,7 @@ getchar
getenv
gets
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -432,6 +433,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
malloc

View File

@ -501,6 +501,7 @@ _memccpy
_memicmp
_mkdir
_mkgmtime
_mkgmtime32 = _mkgmtime
_mkgmtime64
_mktemp
_mktime64
@ -767,6 +768,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -798,6 +800,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
malloc

View File

@ -1433,6 +1433,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -1464,6 +1465,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
malloc

View File

@ -1517,6 +1517,7 @@ gets
getwc
getwchar
gmtime
_gmtime32 = gmtime
is_wctype
isalnum
isalpha
@ -1548,6 +1549,7 @@ ldexp
ldiv
localeconv
localtime
_localtime32 = localtime
log
log10
malloc

View File

@ -19,7 +19,7 @@ __MINGW_USYMBOL(ceilf):
fstcw 4(%rsp) /* store fpu control word */
movl $0x0800,%edx /* round towards +oo */
orl 4(%rsp),%edx
orl 4(%rsp),%edx
andl $0xfbff,%edx
movl %edx,(%rsp)
fldcw (%rsp) /* load modified control word */

View File

@ -17,7 +17,7 @@
__MINGW_USYMBOL(ceill):
#ifdef _WIN64
fldt (%rdx)
subq $16,%rsp
subq $24,%rsp
fstcw 8(%rsp) /* store fpu control word */
@ -34,7 +34,7 @@ __MINGW_USYMBOL(ceill):
fldcw 8(%rsp) /* restore original control word */
addq $16,%rsp
addq $24,%rsp
movq %rcx,%rax
movq $0,8(%rcx)
fstpt (%rcx)

View File

@ -16,8 +16,9 @@
.def __MINGW_USYMBOL(exp2); .scl 2; .type 32; .endef
__MINGW_USYMBOL(exp2):
#ifdef _WIN64
movsd %xmm0,-16(%rsp)
fldl -16(%rsp)
subq $24, %rsp
movsd %xmm0,(%rsp)
fldl (%rsp)
fxam /* Is NaN or +-Inf? */
fstsw %ax
movb $0x45, %dh
@ -33,16 +34,18 @@ __MINGW_USYMBOL(exp2):
faddp /* 2^(fract(x)) */
fscale /* e^x */
fstp %st(1)
fstpl -16(%rsp)
movsd -16(%rsp),%xmm0
fstpl (%rsp)
movsd (%rsp),%xmm0
addq $24, %rsp
ret
1: testl $0x200, %eax /* Test sign. */
jz 2f /* If positive, jump. */
fstp %st
fldz /* Set result to 0. */
2: fstpl -16(%rsp)
movsd -16(%rsp),%xmm0
2: fstpl (%rsp)
movsd (%rsp),%xmm0
addq $24,%rsp
ret
#else
fldl 4(%esp)

View File

@ -17,7 +17,7 @@
__MINGW_USYMBOL(floorl):
#ifdef _WIN64
fldt (%rdx)
subq $16,%rsp
subq $24,%rsp
fstcw 8(%rsp) /* store fpu control word */
@ -34,7 +34,7 @@ __MINGW_USYMBOL(floorl):
fldcw 8(%rsp) /* restore original control word */
addq $16,%rsp
addq $24,%rsp
movq %rcx,%rax
movq $0,8(%rcx)
fstpt (%rcx)

View File

@ -17,15 +17,17 @@
.def __MINGW_USYMBOL(fma); .scl 2; .type 32; .endef
__MINGW_USYMBOL(fma):
#ifdef _WIN64
movsd %xmm0,-16(%rsp)
movsd %xmm1,-24(%rsp)
movsd %xmm2,-32(%rsp)
fldl -16(%rsp)
fmull -24(%rsp)
fldl -32(%rsp)
subq $56, %rsp
movsd %xmm0,(%rsp)
movsd %xmm1,16(%rsp)
movsd %xmm2,32(%rsp)
fldl (%rsp)
fmull 16(%rsp)
fldl 32(%rsp)
faddp
fstpl -16(%rsp)
movsd -16(%rsp),%xmm0
fstpl (%rsp)
movsd (%rsp),%xmm0
addq $56, %rsp
ret
#else
fldl 4(%esp)

View File

@ -17,15 +17,17 @@
.def __MINGW_USYMBOL(fmaf); .scl 2; .type 32; .endef
__MINGW_USYMBOL(fmaf):
#ifdef _WIN64
movss %xmm0,-12(%rsp)
movss %xmm1,-20(%rsp)
movss %xmm2,-28(%rsp)
flds -12(%rsp)
fmuls -20(%rsp)
flds -28(%rsp)
subq $56, %rsp
movss %xmm0,(%rsp)
movss %xmm1,16(%rsp)
movss %xmm2,32(%rsp)
flds (%rsp)
fmuls 16(%rsp)
flds 32(%rsp)
faddp
fstps -12(%rsp)
movss -12(%rsp),%xmm0
fstps (%rsp)
movss (%rsp),%xmm0
addq $56, %rsp
ret
#else
flds 4(%esp)

View File

@ -16,8 +16,9 @@
.def __MINGW_USYMBOL(ilogb); .scl 2; .type 32; .endef
__MINGW_USYMBOL(ilogb):
#ifdef _WIN64
movsd %xmm0,-16(%rsp)
fldl -16(%rsp)
subq $24, %rsp
movsd %xmm0,(%rsp)
fldl (%rsp)
fxam /* Is NaN or +-Inf? */
fstsw %ax
movb $0x45, %dh
@ -33,10 +34,13 @@ __MINGW_USYMBOL(ilogb):
fwait
popq %rax
addq $24, %rsp
ret
1: fstp %st
movl $0x7fffffff, %eax
addq $24, %rsp
ret
#else

View File

@ -16,8 +16,9 @@
.def __MINGW_USYMBOL(ilogbf); .scl 2; .type 32; .endef
__MINGW_USYMBOL(ilogbf):
#ifdef _WIN64
movss %xmm0,-12(%rsp)
flds -12(%rsp)
subq $24, %rsp
movss %xmm0,(%rsp)
flds (%rsp)
fxam /* Is NaN or +-Inf? */
fstsw %ax
movb $0x45, %dh
@ -33,10 +34,12 @@ __MINGW_USYMBOL(ilogbf):
fwait
popq %rax
addq $24, %rsp
ret
1: fstp %st
movl $0x7fffffff, %eax
addq $24, %rsp
ret
#else
flds 4(%esp)

View File

@ -11,4 +11,9 @@ time_t __cdecl _mkgmtime(struct tm *_Tm)
{
return _mkgmtime64(_Tm);
}
#else
time_t __cdecl _mkgmtime(struct tm *_Tm)
{
return _mkgmtime32(_Tm);
}
#endif

View File

@ -11,5 +11,10 @@ struct tm *__cdecl gmtime(const time_t *_Time)
{
return _gmtime64(_Time);
}
#else
struct tm *__cdecl gmtime(const time_t *_Time)
{
return _gmtime32(_Time);
}
#endif

View File

@ -11,5 +11,10 @@ struct tm *__cdecl localtime(const time_t *_Time)
{
return _localtime64(_Time);
}
#else
struct tm *__cdecl localtime(const time_t *_Time)
{
return _localtime32(_Time);
}
#endif

View File

@ -4,16 +4,18 @@
int main()
{
DWORD start_ticks;
DWORD start_ticks,synch_ticks;
int i;
long double ld, sum;
sum = 0.0L;
ld = 1.0L;
start_ticks = GetTickCount();
for (i = 0;i < 0x1fffff ; i++) { sum += powl (ld, 0.5L); ld+=0.03; }
start_ticks = synch_ticks = GetTickCount();
while (start_ticks == synch_ticks)
start_ticks = GetTickCount ();
for (i = 0;i < 0x3fffff * 19 ; i++) { sum += powl (ld, 0.5L); ld+=0.03; }
start_ticks = GetTickCount() - start_ticks;
__mingw_printf ("Loop %d times with result %Lg\n", i, ld);
printf ("Used about %u ms\n", start_ticks);
printf ("Has %g calculations / ms\n", (double) i / (double) start_ticks);
return 0;
}