On Thu, 2 Dec 2010, Ethan Dicks wrote:
Ooh... never been bitten by that one, but it sounds
nasty. I haven't
done any assembly on Intel processors past the 286 (and it wasn't
mixed-mode), and the only other architectures I've worked with at that
level that care about even-address-alignment (PDP-11 and MC68K)
shouldn't hurl if some entity pulls out a 16-bit NOP, but, boy, I'd be
steamed if I had to manually align some code only to find the compiler
tried to "help me out".
Well, under MS-DOS on 286 and above, there was a noticable difference in
performance with alignment. 'Course the 8088, with an 8 bit ata path
didn't care.
Sounds like a need for a #DWIM pragma. ;-)
In addition to the "VOLATILE" keyword, the next version of the Microsoft C
compiler did have a directive to specify specific areas where optimization
was forbidden. Sorry, I can't remember what the keyword was.
--
Grumpy Ol' Fred cisin at
xenosoft.com