lkml.org 
[lkml]   [1996]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: patch 1.3.86
Ulrich Windl <ulrich.windl@rrzc1.rz.uni-regensburg.de> writes:

>In the following patch I think that the move operations were faster
>than the push/pop combination. I only have timings for the 386...
>
>+++ linux/include/asm-i386/segment.h Tue Apr 9 10:35:29 1996
>@@ -85,9 +85,9 @@
> __asm__ volatile
> (" cld
> push %%es
>- movw %%fs,%%cx
>- movw %%cx,%%es
>+ push %%fs
> cmpl $3,%0
>+ pop %%es
> jbe 1f
> movl %%edi,%%ecx
> negl %%ecx

*I* only have timings for the 486. On 486, all the instructions in
question are 3 clocks. I just thought there might be a minute chance
of one less memory access by moving through the available cx register
(depending on cache, etc.). So on 486 (at least), push/pop is fine.

If there is a significant reason why the "cmpl" is between the push
and pop, then it should be commented so future optimizers don't break
something.

Tom.


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