Atomic swap

Daniel Eischen eischen at vigrid.com
Thu Aug 7 19:05:56 PDT 2003


On Thu, 7 Aug 2003, David O'Brien wrote:

> On Thu, Aug 07, 2003 at 01:44:18PM -0400, Daniel Eischen wrote:
> > 		"beq %1, 2f\n\t"	/* if the store failed, spin */
> 
> It is worth explaining why this is "beq" since it wasn't obvious to all
> readers. :-)

Well, when you catch up on you're reading, you'll see the
forward branch is no longer there.  But FYI, it was
supposedly there because it was thought that Alpha's
always predicted a backwards branch, so the common
case of the store succeeding wasn't optimized.

-- 
Dan Eischen



More information about the freebsd-alpha mailing list