This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: volatile access optimization (C++ / x86_64)
- From: <Paul_Koning at Dell dot com>
- To: <matt at godbolt dot org>
- Cc: <triegel at redhat dot com>, <aph at redhat dot com>, <gcc at gcc dot gnu dot org>
- Date: Tue, 30 Dec 2014 18:43:04 +0000
- Subject: Re: volatile access optimization (C++ / x86_64)
- Authentication-results: sourceware.org; auth=none
- References: <CAFWXXN3quEdSnaoWuPcQn2k-F99Yaw+6=NqgFgcu9ABpv5ZD3Q at mail dot gmail dot com> <549DE09B dot 8060502 at redhat dot com> <1419937501 dot 21112 dot 168 dot camel at triegel dot csb> <CAFWXXN2LBopHLuDiopN=Q3qYeu9PFyw3qSJ9Uj3wGgcWGKmtOQ at mail dot gmail dot com>
> On Dec 30, 2014, at 1:32 PM, Matt Godbolt <matt@godbolt.org> wrote:
>
> On Tue, Dec 30, 2014 at 5:05 AM, Torvald Riegel <triegel@redhat.com> wrote:
>> I agree with Andrew. My understanding of volatile is that the generated
>> code must do exactly what the abstract machine would do.
>
> That makes sense. I suppose I don't understand what the difference is
> in terms of an abstract machine of "load; add; store" versus the
> "load-add-store". At least from on x86, from the perspective of the
> memory bus, there's no difference I'm aware of.
That was my point. The model needs to treat those two as equivalent, otherwise the model is constructed by theories that I donât understand.
paul