From 9c5d722f721ee3b6800a62f76cc85dc624a87ff0 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 5 Jul 2024 05:51:11 -0400 Subject: [PATCH] atomic: replace `movq $0` with `xorq` --- lib/atomic.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/atomic.S b/lib/atomic.S index fc3dcb2..66900b2 100644 --- a/lib/atomic.S +++ b/lib/atomic.S @@ -10,7 +10,7 @@ atomic_cmpxchg: /* if ZF is set, the exchange was successful */ jnz nz - movq $0, %rax + xorq %rax, %rax ret nz: movq $1, %rax