Re: [RFC] LKMM: Add volatile_if()

From
Segher Boessenkool <hidden>
Date
2021-06-04 17:28:29
Also in
linux-toolchains, lkml
Reply to
Linus Torvalds, 2021-06-04
On Fri, Jun 04, 2021 at 10:10:29AM -0700, Linus Torvalds wrote:
The compiler *cannot* just say "oh, I'll do that 'volatile asm
barrier' whether the condition is true or not". That would be a
fundamental compiler bug.
Yes.
Of course, we might want to make sure that the compiler doesn't go
"oh, empty asm, I can ignore it",
It isn't allowed to do that.  GCC has this arguable misfeature where it
doesn't show empty asm in the assembler output, but that has no bearing
on anything but how human-readable the output is.


Segher
Thread (121 messages) 121 messages, 13 authors, last reply 2021-09-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help