Re: [RFC PATCH 0/6] jump label v3

From: H. Peter Anvin
Date: Wed Nov 18 2009 - 17:52:55 EST


On 11/18/2009 02:43 PM, Jason Baron wrote:
>
> I'm using an atomic 5 byte no-op for x86_64 and a long jump for 32-bit x86.
> My understanding is that not all 32-bit processors have an atomic 5 byte no-op,
> and thus using a long jump or jump 0, for the off case is the safest.
>

67 66 8D 74 00 (lea si,[si+0]) should work as a 32-bit atomic NOP. It's
not necessarily the fastest, though (I have no data on that.)
Similarly, 66 66 66 66 90 should also work.

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