Last active
May 4, 2025 19:48
-
-
Save jxu/a8eeff7a8c59a54aee5ce69223d29064 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f(std::vector<bool, std::allocator<bool>> const&, unsigned long): | |
mov rax, rdi ; rax = v | |
mov rdi, rsi ; rdi = i | |
mov ecx, esi ; rcx = i | |
mov rdx, QWORD PTR [rax] ; rdx = *v | |
shr rdi, 6 ; rdi >>= 6 | |
mov eax, 1 ; rax = 1 | |
sal rax, cl ; rax <<= (rcx & 0xFF) | |
and rax, QWORD PTR [rdx+rdi*8] ; rax &= rdx[rdi] | |
setne al ; al = (rax != 0) | |
ret | |
; rax = (1 << (i & 0xFF)) & v[i >> 6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment