[Mingw-w64-public] [PATCH] crt: Add "volatile" to all inline assembly snippets under math

2018-03-11 Thread Martin Storsjö
On 32 bit x86, clang seems to miss loading input parameters based on asm constraints for inline assembly that uses the x87 floating registers, unless the snippet has got the volatile keyword. Signed-off-by: Martin Storsjö --- mingw-w64-crt/math/fabs.c| 2 +-

Re: [Mingw-w64-public] [PATCH] crt: Add "volatile" to all inline assembly snippets under math

2018-03-11 Thread Martin Storsjö
On Sun, 11 Mar 2018, Kai Tietz via Mingw-w64-public wrote: Patch is ok. Thanks, pushed. // Martin -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org!

Re: [Mingw-w64-public] [PATCH] crt: Add "volatile" to all inline assembly snippets under math

2018-03-11 Thread David Grayson
Martell, did you send a bug report to clang too? That seems like a serious bug for them to have. Also, "asm volatile" statements cannot be removed, reordered or cached, right? It seems like a bad idea to hamper GCC's optimizations and performance as a workaround for a clang bug. --David On

Re: [Mingw-w64-public] [PATCH] crt: Use __attribute__((force_align_arg_pointer)) for aligning the stack on entry

2018-03-11 Thread Kai Tietz via Mingw-w64-public
Ok. Thanks Kai 2018-03-11 23:29 GMT+01:00 Martin Storsjö : > This attribute is available since GCC 4.2. > > The previous trick of using inline assembly for overriding the stack > pointer behind the compiler's back isn't guaranteed to work. > > This fixes stack alignment on

Re: [Mingw-w64-public] [PATCH] crt: Add "volatile" to all inline assembly snippets under math

2018-03-11 Thread Kai Tietz via Mingw-w64-public
Patch is ok. Thanks, Kai 2018-03-11 21:57 GMT+01:00 Martin Storsjö : > On 32 bit x86, clang seems to miss loading input parameters based > on asm constraints for inline assembly that uses the x87 floating > registers, unless the snippet has got the volatile keyword. > >

[Mingw-w64-public] [PATCH] crt: Use __attribute__((force_align_arg_pointer)) for aligning the stack on entry

2018-03-11 Thread Martin Storsjö
This attribute is available since GCC 4.2. The previous trick of using inline assembly for overriding the stack pointer behind the compiler's back isn't guaranteed to work. This fixes stack alignment on llvm/clang. Signed-off-by: Martin Storsjö --- mingw-w64-crt/crt/crtexe.c

Re: [Mingw-w64-public] [PATCH] crt: Use __attribute__((force_align_arg_pointer)) for aligning the stack on entry

2018-03-11 Thread JonY via Mingw-w64-public
On 03/11/2018 10:29 PM, Martin Storsjö wrote: > This attribute is available since GCC 4.2. > > The previous trick of using inline assembly for overriding the stack > pointer behind the compiler's back isn't guaranteed to work. > > This fixes stack alignment on llvm/clang. > > Signed-off-by:

[Mingw-w64-public] genlib 0 can not compile

2018-03-11 Thread jpmugaas
For some strange reason, I'm getting these errors when compiling the tools for MINGW-W64: $ makepkg-mingw -f ==> Making package: mingw-w64-tools-git 6.0.0.5114.b633824e-1 (Sun, Mar 11, 2018 7:41:04 AM) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==>

Re: [Mingw-w64-public] genlib 0 can not compile

2018-03-11 Thread David Grayson
Since the first error is saying uint16_t is undefined, did you try adding "#include " at the top of genlib.c? --David Grayson On Mar 11, 2018 5:06 AM, wrote: > For some strange reason, I'm getting these errors when compiling the tools > for MINGW-W64: > > > > > > $