This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An unusual Performance approach using Synthetic registers
- From: Andy Walker <ja_walker at earthlink dot net>
- To: dewar at gnat dot com (Robert Dewar),lord at emf dot net,mszick at goquest dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 7 Jan 2003 23:03:31 -0600
- Subject: Re: An unusual Performance approach using Synthetic registers
- References: <20030107120842.86DA1F28F7@nile.gnat.com>
On Tuesday 07 January 2003 06:08 am, Robert Dewar wrote:
> > First, XCHG is what I think of as an Operating System instruction.
<snip>
> > It is one of the very reliable ways to implement
> > semaphores.
>
> Please look through the instruction set more carefully, this is NOT the way
> you would implement any sychronization instructions on the x86.
The Intel Developer's manual describes XCHG as an instruction to be used to
implement semaphors. The locking process is integral to the register-memory
form of the instruction and cannot be disabled. The phrasing implied that it
locked the whole processor unit.
Andy