[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-19 Thread david at westcontrol dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #16 from David Brown --- (In reply to Xi Ruoyao from comment #8) > (In reply to David Brown from comment #7) > > > There is no intention to make "asm volatile" a barrier, as you get with a > > memory clobber. The intention is to

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 Segher Boessenkool changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #14 from Segher Boessenkool --- Author: segher Date: Wed Oct 18 21:15:24 2017 New Revision: 253871 URL: https://gcc.gnu.org/viewcvs?rev=253871=gcc=rev Log: ira: volatile asm's are not moveable (PR82602) A volatile asm statement can

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #13 from Segher Boessenkool --- Author: segher Date: Wed Oct 18 21:13:16 2017 New Revision: 253870 URL: https://gcc.gnu.org/viewcvs?rev=253870=gcc=rev Log: ira: volatile asm's are not moveable (PR82602) A volatile asm statement can

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #12 from Segher Boessenkool --- Author: segher Date: Wed Oct 18 21:08:18 2017 New Revision: 253869 URL: https://gcc.gnu.org/viewcvs?rev=253869=gcc=rev Log: ira: volatile asm's are not moveable (PR82602) A volatile asm statement can

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #11 from Segher Boessenkool --- (In reply to Bernd Edlinger from comment #10) > Yes, and moreover foo() could access non-volatile memory. > And only a memory clobber can prevent the compiler from > using cached values. But you

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #10 from Bernd Edlinger --- Yes, and moreover foo() could access non-volatile memory. And only a memory clobber can prevent the compiler from using cached values.

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #9 from Segher Boessenkool --- You cannot do that if you do not know what foo() does (it could for example contain another volatile asm). But yes, the code as written is not so great.

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #8 from Xi Ruoyao --- (In reply to David Brown from comment #7) > There is no intention to make "asm volatile" a barrier, as you get with a > memory clobber. The intention is to stop it moving past other volatile code > (such as

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread david at westcontrol dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #7 from David Brown --- (In reply to Xi Ruoyao from comment #3) There is no intention to make "asm volatile" a barrier, as you get with a memory clobber. The intention is to stop it moving past other volatile code (such as other asm

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #6 from Segher Boessenkool --- (In reply to Xi Ruoyao from comment #3) > I'm still not convinced this is a bug. For example, all kernel code > uses `asm volatile ("" ::: "memory")` as barrier to stop GCC to reorder code > through

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 Bernd Edlinger changed: What|Removed |Added CC||bernd.edlinger at hotmail dot de ---

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 --- Comment #4 from Xi Ruoyao --- By the way, in kernel code (compiler-gcc.h) there is a comment: /* The "volatile" is due to gcc bugs */ #define barrier() __asm__ __volatile__("": : :"memory") So the developer(s) actually think "volatile" is

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 Xi Ruoyao changed: What|Removed |Added CC||ryxi at stu dot xidian.edu.cn --- Comment

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread david at westcontrol dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 David Brown changed: What|Removed |Added CC||david at westcontrol dot com --- Comment

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 Segher Boessenkool changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug rtl-optimization/82602] IRA considers volatile asm to be moveable

2017-10-18 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 Segher Boessenkool changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|