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

2018-03-13 Thread Martin Storsjö
On Tue, 13 Mar 2018, NightStrike wrote: Well, if it'd be inline functions in a header, I'd be inclined to agree. All of these are in non-inline functions (e.g. like the sqrt function, where you expect it to always produce one "fsqrt" instruction), so I don't expect any losses there. Is that

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

2018-03-13 Thread NightStrike
> > Well, if it'd be inline functions in a header, I'd be inclined to agree. > All of these are in non-inline functions (e.g. like the sqrt function, > where you expect it to always produce one "fsqrt" instruction), so I > don't expect any losses there. > Is that always the case? I'm pretty sure

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

2018-03-12 Thread Martin Storsjö
On Mon, 12 Mar 2018, Martin Storsjö wrote: On Sun, 11 Mar 2018, David Grayson wrote: Martell, did you send a bug report to clang too? That seems like a serious bug for them to have. I didn't send one yet, but I will. It's curious as it seems to work fine for x86_64 though. I reported

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

2018-03-12 Thread Martell Malone
No worries :) Just wanted to make sure you knew who you were talking to. On Mon 12 Mar 2018 at 13:55, David Grayson wrote: > Sorry to both of you. My brain just messed up there and I only > realized when it was too late. > > --David > > On Mon, Mar 12, 2018 at 1:37 PM,

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

2018-03-12 Thread David Grayson
Sorry to both of you. My brain just messed up there and I only realized when it was too late. --David On Mon, Mar 12, 2018 at 1:37 PM, Martell Malone wrote: > Just so you are aware that is Martin not Martell. > Not sure if that was just an autocorrect or a typo but

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

2018-03-12 Thread Martell Malone
Just so you are aware that is Martin not Martell. Not sure if that was just an autocorrect or a typo but Martin is the one doing this work here. On Mon 12 Mar 2018 at 12:20, Martin Storsjö wrote: > On Mon, 12 Mar 2018, Martin Storsjö wrote: > > > On Sun, 11 Mar 2018, David

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

2018-03-12 Thread Martin Storsjö
On Mon, 12 Mar 2018, Martin Storsjö wrote: On Sun, 11 Mar 2018, David Grayson wrote: Martell, did you send a bug report to clang too? That seems like a serious bug for them to have. I didn't send one yet, but I will. It's curious as it seems to work fine for x86_64 though. Also, "asm

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

2018-03-12 Thread Martin Storsjö
On Sun, 11 Mar 2018, David Grayson wrote: Martell, did you send a bug report to clang too? That seems like a serious bug for them to have. I didn't send one yet, but I will. It's curious as it seems to work fine for x86_64 though. Also, "asm volatile" statements cannot be removed,

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: 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 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: 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 +-