Fixed
This commit is contained in:
@@ -13,9 +13,8 @@ def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CBool:
|
||||
result: t.CUInt8T = 1
|
||||
c.Asm(f"""mov al, 1
|
||||
xchg byte ptr [{c.AsmInp(ptr, t.ASM_DESCR.REG_ANY)}], al
|
||||
mov {c.AsmOut(result, t.ASM_DESCR.OUTPUT_REG)}, al""",
|
||||
mov $0, al""",
|
||||
out = [c.AsmOut(result, t.ASM_DESCR.OUTPUT_REG)],
|
||||
inp = [c.AsmInp(ptr, t.ASM_DESCR.REG_ANY)],
|
||||
op = [t.ASM_DESCR.CLOBBER_MEMORY, t.ASM_DESCR.CLOBBER_RAX])
|
||||
return t.CBool(result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user