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

From: H. Peter Anvin (
Date: Wed Jul 04 2001 - 03:03:13 EST

Followup to: <>
By author: Cort Dougan <>
In newsgroup:
> There isn't such a crippling difference between straight-line and code with
> unconditional branches in it with modern processors. In fact, there's very
> little measurable difference.
> If you're looking for something to blame hurd performance on I'd suggest
> the entire design of Mach, not inline asm vs procedure calls. Tossing a
> few context switches into calls is a lot more expensive.

That's not where the bulk of the penalty of a function call comes in
(and it's a call/return, not an unconditional branch.) The penalty
comes in because of the additional need to obey the calling
convention, and from the icache discontinuity.

Not to mention that certain things simply cannot be done that way.


<> at work, <> in private!
"Unix gives you enough rope to shoot yourself in the foot."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:13 EST