i meant it. asm is gone, or should have been many years ago.
explain a simple case when you need it. brucee On 5/5/07, Roman Shaposhnick <[EMAIL PROTECTED]> wrote:
On Thu, 2007-05-03 at 19:35 -0700, Lyndon Nerenberg wrote: > >> That's called as(1). > > > > On any architecture with a non-trivial register allocation, the above > > statement does not apply. > > As far as performance goes you might be better off not using assembler > > to begin with. > > Exactly. If you want asm, you know where to find it. These days, the > cases where raw assembler really matters are significant enough that a few > in-lines generally don't accomplish anything. I partially agree with you, but anything in hardware that isn't directly represented by C semantics is a fair game for using __asm's. In fact, it is the only way to make your software look good on a particular platform. I don't know how to fix that with C and it seems that the rest of the posters on this thread don't really know either. But this is a problem. > > Compilers (at least the ones I work on) are quite smart > > in how they use precious resource such as registers, and unless you > > can hide everything away on the other side of the 'call' op you'd > > be in trouble mixing your code with what compiler had generated for > > you. > > Sure, the compiler can assist with register allocation, but so can reading > the ABI documentation. The problem is not register allocation per se, but how it ties into instructions scheduling, piplining and all that jazz. And no, you can't beat a smart compiler on architectures as complex as AMD64 and EM64T. Thanks, Roman.