Re: Why Plan 9 C compilers don't have asm("")

David S. Miller (davem@redhat.com)
Fri, 6 Jul 2001 04:43:02 -0700 (PDT)


Cort Dougan writes:
> I'm talking about _modern_ processors, not processors that dominate the
> modern age. This isn't x86.

Linus mentioned Alpha specifically. I don't see how any of the things
he said were x86-centric in any way shape or form.

All of his examples are entirely accurate on sparc64 for example, and
to even moreso his Alpha commentary can nearly directly be applied to
the MIPS.

Calls suck ass, even on modern cpus. I've seen several hundreds of
cycles go out of the fault path by eliminating them. If you can kill
a leaf level call, you can avoid saving the whole frame, and on Sparc
(for example) this means saving a potential window spill trap which
can be quite costly.

Calls are less simple than branches to do (via prediction etc.) at
"zero cost" because usually there is a write port necessary (to write
the call instruction's address into the "return" register).

Let's not even start talking about calls in PIC code :-)

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/