MS/CW-style inline assembly for GCC
Stan Shebs
shebs@apple.com
Tue May 11 02:07:00 GMT 2004
tm_gccmail@kloo.net wrote:
On Fri, 7 May 2004, Daniel Jacobowitz wrote:
[By the way, I'm surprised to hear that CodeWarrior will schedule
outside code interleaved with an asm block. That seems like a really
bad idea!]
It is a really bad idea.
If you're doing driver-level work, then you need barriers to ensure writes
occur in the correct order and are flushed out properly. If you schedule
other code in between, this may not work properly.
Toshi
Just to keep things in perspective, it doesn't seem that CW does
much rearrangement, in fact I don't remember ever seeing it do that.
One could imagine Metrowerks taking a conservative approach and
treating all but the most innocuous instructions as barriers.
Stan
More information about the Gcc
mailing list