On January 18, 2016 7:27:59 PM GMT+01:00, Robert Haas <robertmh...@gmail.com> 
>On Sun, Jan 17, 2016 at 6:38 AM, Andreas Seltenreich
><seltenre...@gmx.de> wrote:
>> I'm currently experimenting with just-in-time compilation using
>> While discussing issues with its developers, it was pointed out to me
>> that our spinlock inline assembly is less than optimal.  Attached is
>> patch that addresses this.
>> ,----
>> | Remove the LOCK prefix from the XCHG instruction.  Locking is
>> | with XCHG and the prefix wastes a byte.  Also remove the "cc"
>> | from the clobber list as the XCHG instruction does not modify any
>> |
>> | Reported by Christoph Mallon.
>> `----
>I did a Google search and everybody seems to agree that the LOCK
>prefix is redundant.  I found a source agreeing with the idea that it
>doesn't clobber registers, too:
>So I guess it would be safe to change this.  Scares me slightly,

Clobbers IIRC are implicit on x86 anyway. Rather doubt that the space for the 
prefix makes any sorry of practical difference, but there indeed seems no 
reason to have it.


Please excuse brevity and formatting - I am writing this on my mobile phone.

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to