Messages in this thread |  | | Date | Tue, 10 Oct 2000 10:17:44 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: {PATCH] Re: wasting time on page fault |
| |
On Tue, 10 Oct 2000, Jamie Lokier wrote: > > The assembler doesn't use nops for alignment -- it inserts longer > instructions that are effectively nops, either 1 or two. For larger > stretches, the assembler inserts a jmp itself for alignment.
Note that some of them are not very good no-ops. At least at some point the "long" no-op was
lea 0x00000000(%esi),%esi
and you could cause AGI stalls and non-pairing with two of them in a row - making the long no-op sequence potentially quite slow. The one-byte no-op is recognized by the CPU as being a no-op (even though technically it originally was a "xchg ax,ax" instruction decoding-wise - it doesn't actually get executed as that in any modern CPU and thus avoids all the dependencies implied in the traditional decode).
It may be that the special "lea" no-op is also recognized as such in newer CPU's, but it wasn't in the early ones.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |