This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An unusual Performance approach using Synthetic registers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]