public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paulmck at linux dot vnet.ibm.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56028] Splitting a 64-bit volatile store Date: Fri, 18 Jan 2013 11:26:00 -0000 [thread overview] Message-ID: <bug-56028-4-Ps0ghoCYPe@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-56028-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56028 --- Comment #2 from Paul E. McKenney <paulmck at linux dot vnet.ibm.com> 2013-01-18 11:25:52 UTC --- (In reply to comment #1) > - Does language standard guarantee atomic store in this case [wikipedia says > "No." [1]]? The above example of device drivers storing constants to a device register declared as "volatile unsigned long y" does not require all of the attributes of an atomic store, for example, it does not require memory-fence instructions. > - Can a store to a volatile DImode location be implemented as two consecutive > SImode stores to adjacent location (this breaks stores of 64bit immediates to > MMIO 64bit registers)? See 1.9p8 of the C++11 standard, first bullet: "Access to volatile objects are evaluated strictly according to the rules of the abstract machine." >From what I can see, implementing a store to a volatile DImode location as two consecutive SImode stores to adjacent locations violates this aspect of the standard. Furthermore, to expand on your parenthesized statement above, gcc might not operate reliably if the device drivers in the kernel it is running on have their 64-bit immediate stores broken into pairs of 32-bit immediate stores. ;-) > [1] http://en.wikipedia.org/wiki/Volatile_variable#In_C_and_C.2B.2B
next prev parent reply other threads:[~2013-01-18 11:26 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-18 11:07 [Bug target/56028] New: " amonakov at gcc dot gnu.org 2013-01-18 11:10 ` [Bug target/56028] " ubizjak at gmail dot com 2013-01-18 11:26 ` paulmck at linux dot vnet.ibm.com [this message] 2013-01-18 11:57 ` eugeni.stepanov at gmail dot com 2013-01-18 16:23 ` paulmck at linux dot vnet.ibm.com 2013-01-18 16:38 ` eugeni.stepanov at gmail dot com 2013-01-18 17:40 ` paulmck at linux dot vnet.ibm.com 2013-01-18 18:23 ` pluto at agmk dot net 2013-01-19 12:35 ` paulmck at linux dot vnet.ibm.com 2013-01-22 7:33 ` ubizjak at gmail dot com 2013-01-22 8:18 ` jakub at gcc dot gnu.org 2013-01-22 8:47 ` ubizjak at gmail dot com 2013-01-22 20:58 ` ubizjak at gmail dot com 2013-01-22 20:59 ` uros at gcc dot gnu.org 2013-01-27 14:28 ` uros at gcc dot gnu.org 2013-01-27 14:30 ` ubizjak at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-56028-4-Ps0ghoCYPe@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).