Re: [Mingw-w64-public] [PATCH] winapifamily: fix check for WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_DESKTOP_APP)

2019-12-12 Thread Martin Storsjö
On Fri, 13 Dec 2019, Steve Lhomme wrote: Hi, On 2019-12-12 22:13, Martin Storsjö wrote: On Thu, 12 Dec 2019, Steve Lhomme wrote: WINAPI_FAMILY_DESKTOP_APP is (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP) (ie available for desktop and store apps) The current macro results in: (WINAPI_FAMI

Re: [Mingw-w64-public] [PATCH] fileapi: GetTempPath is available in desktop and app targets

2019-12-12 Thread Martin Storsjö
On Fri, 13 Dec 2019, Steve Lhomme wrote: On 2019-12-12 22:47, Martin Storsjö wrote: On Thu, 12 Dec 2019, Steve Lhomme wrote: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppat

Re: [Mingw-w64-public] [PATCH] fileapi: GetTempPath is available in desktop and app targets

2019-12-12 Thread Steve Lhomme
On 2019-12-12 22:47, Martin Storsjö wrote: On Thu, 12 Dec 2019, Steve Lhomme wrote: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha --- mingw-w64-headers/include/fileapi.h |

Re: [Mingw-w64-public] [PATCH 1/2] headers: Fix a use of WINAPI_FAMILY_PARTITION in fileapi.h

2019-12-12 Thread Steve Lhomme
LGTM On 2019-12-12 22:47, Martin Storsjö wrote: WINAPI_FAMILY_PARTITION is only supposed to be used with WINAPI_PARTITION_* constants, not with WINAPI_FAMILY_*_APP constants. However, all the functions in this block actually are available for WINAPI_PARTITION_APP already since windows 8.0, so c

Re: [Mingw-w64-public] [PATCH] winapifamily: fix check for WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_DESKTOP_APP)

2019-12-12 Thread Steve Lhomme
Hi, On 2019-12-12 22:13, Martin Storsjö wrote: On Thu, 12 Dec 2019, Steve Lhomme wrote: WINAPI_FAMILY_DESKTOP_APP is (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP) (ie available for desktop and store apps) The current macro results in: (WINAPI_FAMILY & (WINAPI_PARTITION_DESKTOP|WINAPI_PARTI

Re: [Mingw-w64-public] [PATCH 2/2] crt/fma{, f}.c: Implement FMA for `float` and `double` properly

2019-12-12 Thread Liu Hao
在 2019/12/12 21:34, Liu Hao 写道: > 在 2019/12/12 21:22, Liu Hao 写道: >> This is wrong. Because FMA shall result the result exactly once. If we > > ^ round > It turns out that FMA for `float` cannot be implemented using doubles, either. The mul-add operation cou

[Mingw-w64-public] [PATCH 2/2] crt/fma{, f}.c: Implement FMA for `double` and `float` properly

2019-12-12 Thread Liu Hao
Two testcases have been attached, the first one is for `double` and the other is for `float`. They compile and run fine with Glibc on Linux but fails on x64. Side note: The test may fail on x86 without excess casts, due to the fact that x87 extending format is used for intermediate results, which

[Mingw-w64-public] [PATCH 1/2] crt/fmal.c: Use hardware to handle potential denormal numbers

2019-12-12 Thread Liu Hao
Instead of splitting the mantissa into two parts of the same width, we now split it into asymmetric parts, where the more significant part has fewer bits and is less likely to cause rounding errors. For `long double` with a 64-bit mantissa : 31 + 33 For `double` with a 53-bit mantissa : 26

[Mingw-w64-public] [PATCH 2/2] headers: Remove a duplicate declaration of GetFileType

2019-12-12 Thread Martin Storsjö
This function isn't available in WINAPI_PARTITION_APP like all the other ones surrounding it, but this function also already is declared further above in the same file, in an #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || _WIN32_WINNT >= _WIN32_WINNT_WIN10 block. (The function was

[Mingw-w64-public] [PATCH 1/2] headers: Fix a use of WINAPI_FAMILY_PARTITION in fileapi.h

2019-12-12 Thread Martin Storsjö
WINAPI_FAMILY_PARTITION is only supposed to be used with WINAPI_PARTITION_* constants, not with WINAPI_FAMILY_*_APP constants. However, all the functions in this block actually are available for WINAPI_PARTITION_APP already since windows 8.0, so change to use that instead of WINAPI_PARTITION_DESKT

Re: [Mingw-w64-public] [PATCH] fileapi: GetTempPath is available in desktop and app targets

2019-12-12 Thread Martin Storsjö
On Thu, 12 Dec 2019, Steve Lhomme wrote: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha --- mingw-w64-headers/include/fileapi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 del

Re: [Mingw-w64-public] [PATCH] winapifamily: fix check for WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_DESKTOP_APP)

2019-12-12 Thread Martin Storsjö
On Thu, 12 Dec 2019, Steve Lhomme wrote: WINAPI_FAMILY_DESKTOP_APP is (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP) (ie available for desktop and store apps) The current macro results in: (WINAPI_FAMILY & (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)) == (WINAPI_PARTITION_DESKTOP|WINAPI_PA

Re: [Mingw-w64-public] libxml2 2.9.7 built a year ago, not now

2019-12-12 Thread David Mathog
On 2019-12-11 21:23, Vincent Torri wrote: Hello David here is what i am doing with my package installer : https://github.com/vtorri/ewpi/blob/master/packages/libxml2/install.sh version i compile : https://github.com/vtorri/ewpi/blob/master/packages/libxml2/libxml2.ewpi Interesting. Alexey Pa

[Mingw-w64-public] [PATCH] winapifamily: fix check for WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_DESKTOP_APP)

2019-12-12 Thread Steve Lhomme
WINAPI_FAMILY_DESKTOP_APP is (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP) (ie available for desktop and store apps) The current macro results in: (WINAPI_FAMILY & (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)) == (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP) Where WINAPI_FAMILY is either

[Mingw-w64-public] [PATCH] fileapi: GetTempPath is available in desktop and app targets

2019-12-12 Thread Steve Lhomme
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha --- mingw-w64-headers/include/fileapi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mingw-w64-headers/

Re: [Mingw-w64-public] [PATCH 2/2] crt/fma{, f}.c: Implement FMA for `float` and `double` properly

2019-12-12 Thread Liu Hao
在 2019/12/12 21:22, Liu Hao 写道: > This is wrong. Because FMA shall result the result exactly once. If we ^ round Apologies for so many typos. I will fix them later. > roudn the first result to double we get a different result: ^ round > volatile

[Mingw-w64-public] [PATCH 1/2] crt/fmal.c: Use hardware to handle potential denormal numbers

2019-12-12 Thread Liu Hao
This is pure refactoring in preparation for porting this implementation to `float` and `double`, as we are having a bug there. Testcase: #include #include int main(void) { volatile double a = 0x1.3p-461; volatile double b = 0x1.7p-461; vola

[Mingw-w64-public] [PATCH 2/2] crt/fma{, f}.c: Implement FMA for `float` and `double` properly

2019-12-12 Thread Liu Hao
FMA of `float` can be implemented using double precision, as `float` has a 24-bit mantissa and `double` has a 53-bit mantissa, which is sufficient for the product. FMA of `double` shall not be implemented using `long double`, as the result has 106 bits and cannot be stored accurately in a `long do

Re: [Mingw-w64-public] [PATCH] crt: update micore.mri

2019-12-12 Thread Biswapriyo Nath
> hmm this patch contains only some FIXMEs doesn't? (shouldn't they be TODOs BTW?) I just follow the existing style and will add def files in upcoming patches. ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.source

Re: [Mingw-w64-public] [PATCH] crt: update micore.mri

2019-12-12 Thread Liu Hao
在 2019/12/12 13:43, Biswapriyo Nath 写道: > * Generated by this command from Windows 10 SDK 18362: > > ar t '/c/Program Files (x86)/Windows > Kits/10/Lib/10.0.18362.0/um/x64/mincore.lib' | sort -u | tee > mincore_18362.mri > > And some sed-ing & diff-ing. > > > Thanks. I pushed this one. hmm t