Closed akopytov closed 7 years ago
Hi !
That does look good to me, thanks a lot ! Just one minor thing : any reason you manually assign registers for the cas_2 variant ? Is it because the compiler isn't smart enough (yet) to deal correctly with the cas/casp instructions ?
Hi Olivier!
Yes, the manual assignment is needed, because the specification has rather unusual requirements for the registers in the CASP instruction:
<Xs> is the 64-bit general register to be compared and loaded, encoded in the “Rs” field. Xs must be an even numbered register.
<X(s+1)> is the second 64-bit general register to be compared and loaded
<Xt> is the 64-bit general register to be conditionally stored, encoded in the “Rt” field. Xt must be an even numbered register.
<X(t+1)> is the second 64-bit general register to be conditionally stored
Add a new configure option, --enable-lse, which is only effective for the AArch64 architecture. When used, most ckpr* atomics will use Large System Extensions instructions as per the ARMv8.1 specification, rather then LL/SC instruction pairs.