lkml.org 
[lkml]   [2004]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Semaphore assembly-code bug
On Fri, 29 Oct 2004, Andreas Steinmetz wrote:

> Linus Torvalds wrote:
>>
>> On Fri, 29 Oct 2004, linux-os wrote:
>>
>>> Linus, please check this out.
>>
>>
>> Yes, I concur. However, I'd suggest changing the "addl $4,%esp" into a
>> "popl %ecx", which is smaller and apparently faster on some CPU's (ecx
>> obviously gets immediately overwritten by the next popl).
>
> Hmm, I didn't check the instruction length but modern CPUs usually work best
> with the following:
>
> leal 4(%esp),%esp
>
> --
> Andreas Steinmetz SPAMmers use robotrap@domdv.de
>

Probably so because I'm pretty certain that the 'pop' (a memory
access) is not going to be faster than a simple register operation.

I'll make another patch and post it (if the machine will boot!)

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by John Ashcroft.
98.36% of all statistics are fiction.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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