Atomic swap

Terry Lambert tlambert2 at mindspring.com
Fri Aug 8 00:47:02 PDT 2003


"Portante, Peter" wrote:
> Additionally, the stq_c destroys the contents of %2, so you need to
> move the value in %2 into another register for use in the stq_c.  I
> don't know how to do that in the ASM, so I just used raw register
> names below, highlighted in red.

You have to be sneaky.

OR the value in the regiter with 0 and store the result in
the register you want to move it to.

-- Terry


More information about the freebsd-alpha mailing list