On Thu, 2007-05-03 at 19:12 -0700, Lyndon Nerenberg wrote:
> >  As far as I can tell C (as in language) has always been a sort of
> > a cross-paltform assembler. Its just sometimes you need hooks
> > to the native one. You might disagree -- but I still do code in
> > assembly.
> 
> 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. 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. GCC style asm inlines play nice with things like register 
allocator and instruction scheduler, where .s files don't.

>    I think 3B2 code deserves its own place in hell.  Poring over the
>    ESS#5 code, someone found that there were lots of strcmp(p, "f(")
>    == 0 checks (I may have gotten the exact string wrong but it's
>    close).  It took us a while to figure out why.  Apparently, location
>    0 on the 3b had the 3 bytes 'f' '(' '\0', someone noticed that when
>    programs blew up they were pointing to "f(", and the worlds most
>    amazing kludge for detecting nil pointers was born.

  What's 3B3 and ESS#5 ? ;-)

Thanks,
Roman.

Reply via email to