- (inst mov target 1)
- (zeroize rax-tn)
- (inst lock)
- (inst cmpxchg (make-ea-for-symbol-value *tls-index-lock*) target)
- (inst jmp :ne get-tls-index-lock)
+ (let ((not-rax ,(if (eql 'rax reg) 'other 'target)))
+ (inst mov not-rax 1)
+ (zeroize rax-tn)
+ (inst cmpxchg (make-ea-for-symbol-value *tls-index-lock*)
+ not-rax :lock)
+ (inst jmp :ne get-tls-index-lock))