From b6772ac2ea6b635129803566e576c050c38ea576 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Wed, 17 Feb 2021 00:22:22 -0800 Subject: [PATCH] [kernel] Fix #DF when building with -O3 I had failed to specify in inline asm that an input variable was the same as the output variable. --- src/kernel/frame_allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/frame_allocator.cpp b/src/kernel/frame_allocator.cpp index 169859f..327a47b 100644 --- a/src/kernel/frame_allocator.cpp +++ b/src/kernel/frame_allocator.cpp @@ -25,7 +25,7 @@ frame_allocator::frame_allocator(kernel::args::frame_block *frames, size_t count inline unsigned bsf(uint64_t v) { - asm ("tzcntq %q0, %q1" : "=r"(v) : "r"(v) : "cc"); + asm ("tzcntq %q0, %q1" : "=r"(v) : "0"(v) : "cc"); return v; }