diff options
author | turret <turret@duck.com> | 2023-12-18 18:43:52 -0600 |
---|---|---|
committer | turret <turret@duck.com> | 2023-12-18 18:43:52 -0600 |
commit | d04fc8f40347b8e2d1897d9ce3b261a6fe1f6f61 (patch) | |
tree | 7c6dff9dc64cd22136e5cc881d74d1bfd69be291 | |
parent | 7648b5a7b22ae3b3e3a3fa39fd83bce06554385d (diff) | |
download | discord-bot-skeleton-d04fc8f40347b8e2d1897d9ce3b261a6fe1f6f61.tar.gz discord-bot-skeleton-d04fc8f40347b8e2d1897d9ce3b261a6fe1f6f61.tar.bz2 discord-bot-skeleton-d04fc8f40347b8e2d1897d9ce3b261a6fe1f6f61.zip |
log: edit inline assembly
just read the note on osdev wiki that stated that input operands
shouldn't be changed, so we move both rax and the console lock to the
output operands so the compiler knows we are modifying them for our
lovely optimisation
-rw-r--r-- | init/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -42,7 +42,7 @@ retry: ; asm("mov %0, 1\n\t" - "xchg %0, %1" : "=r" (rax) : "m" (console_lock)); + "xchg %0, %1" : "=r" (rax), "=m" (console_lock)); if(rax) goto retry; |