Re: [PATCH] Runtime memory barrier patching

Linus Torvalds
2003-04-21T21:54:16Z

On Mon, 21 Apr 2003, Ulrich Drepper wrote:

> Linus Torvalds wrote:
>
> > They may _work_ for intel, but quite frankly they suck for most Intel (and
> > probably non-intel too) CPU's. Using prefixes tends to almost always mess
> > up the instruction decoders on most CPU's out there.
>
> Indeed, using prefixes is terrible.

I would not be surprised if both AMD and Intel are playing some
"benchmarking games" by trying to select nop's that work badly for the
other side, and then showing how _their_ new CPU's are so much better by
having the compilers emit the "preferred" no-ops.

But maybe I'm just too cynical. And I do suspect the Hammer optimization
guide was meant for the 64-bit mode only, because I'm pretty certain even
AMD does badly on prefixes at least in older CPU generations.

Linus