lkml.org 
[lkml]   [2000]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: {PATCH] Re: wasting time on page fault
Linus Torvalds 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.

When it must emit two no-ops in a row, it uses %esi and then %edi so
there's no AGI from that. However, the assembler doesn't check
preceding instructions to pick a decent register for the no-op
instruction. Solution: avoid writing to %esi before an alignment op.

> 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.

Does Crusoe recognise that? :-)

-- Jamie
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.051 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site