Re: Semaphore assembly-code bug

From: Richard Henderson
Date: Fri Oct 29 2004 - 13:16:25 EST


On Fri, Oct 29, 2004 at 01:22:52PM -0400, linux-os wrote:
> Here's a version that uses `leal 4(esp), esp` to add
> 4 to the stack-pointer. Since this 'address-calculation`
> is done in an different portion of Intel CPUs....

Incorrect, at least i686 and beyond. These interpret to the
same micro-ops.

> The 'pop ecx' would access memory and, therefore be slower than
> simple register operations.

Also not necessarily correct. Intel cpus special-case pop
instructions; two pops can be dual issued, whereas a different
kind of stack pointer manipulation will not.


r~
-
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/