[Info-vax] LLVM, volatile and async VMS I/O and system calls
John Reagan
xyzzy1959 at gmail.com
Wed Sep 22 09:12:12 EDT 2021
On Wednesday, September 22, 2021 at 9:06:29 AM UTC-4, Arne Vajhøj wrote:
> On 9/22/2021 8:28 AM, Simon Clubley wrote:
> > Jan-Erik's questions about ASTs in COBOL have reminded me about something
> > I asked a while back.
> >
> > VMS I/O and system calls are much more asynchronous than on other operating
> > systems and data can appear in buffers and variables in general can be
> > changed outside of the normal sequence points (such as at a function call
> > boundary).
> >
> > With the move to LLVM, and its different optimiser, have any examples
> > appeared in VMS code for x86-64 where volatile attributes are now required
> > on variable definitions where you would have got away with not using them
> > before (even if technically, they should have been marked as volatile anyway) ?
> >
> > Just curious if there's any places in code running on VMS x86-64 that will
> > need to cleaned up to do things in the correct way that you would have
> > got away with doing less correctly previously.
> To state the obvious.
>
> Correct C aka C code with defined behavior by C standard will work
> on any standard compliant C compiler.
>
> C code with implementation specific or undefined behavior is
> throwing a dice.
>
> Maybe John Reagan has some ideas about what may break, but I cannot see
> VSI systematic document how Itanium to x86-64 migration will impact
> C code with implementation specific or undefined behavior.
>
> Arne
Simon, you asked this exact same question before. You can search back for the guesses.
Moving architectures can always expose bugs regardless of platform, OS, or compiler.
GEM has different optimizations on Alpha vs Itanium. Did you have to add any volatiles in that transition?
Linux people, how many people have code that works with -O0 and -O1 but not with -O3 or-Ofast?
The current cross-compilers are no-optimize so there is no real world experience for missing volatiles.
More information about the Info-vax
mailing list