Re: Semaphore assembly-code bug

From: Andreas Steinmetz
Date: Fri Oct 29 2004 - 11:21:57 EST


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@xxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/