id = 1370 title = "x86 BLSI and BLSR semantic bug" state = "closed" created_at = "2022-12-16T06:35:03.247Z" closed_at = "2023-02-16T13:09:22.665Z" labels = ["Closed::Fixed", "accel: TCG", "target: i386"] url = "https://gitlab.com/qemu-project/qemu/-/issues/1370" host-os = "Windows 10 20H2" host-arch = "x86" qemu-version = "7.1.90 (v7.2.0-rc0)" guest-os = "None" guest-arch = "x86" description = """The result of instruction BLSI and BLSR is different from the CPU. The value of CF is different.""" reproduce = """1. Compile this code ``` void main() { asm("blsi rax, rbx"); } ``` 2. Execute and compare the result with the CPU. The value of `CF` is exactly the opposite. This problem happens with BLSR, too.""" additional = """This bug is discovered by research conducted by KAIST SoftSec."""