Skip to content

Instantly share code, notes, and snippets.

@ayende
Created September 8, 2023 08:05
Show Gist options
  • Save ayende/ef55effdec3a68e9e0c4ca5b1884bc9a to your computer and use it in GitHub Desktop.
Save ayende/ef55effdec3a68e9e0c4ca5b1884bc9a to your computer and use it in GitHub Desktop.
; Filter.FilterCmp_NoRangeCheck(System.Span`1<Int64>)
mov rdx,[rcx]
mov ecx,[rcx+8]
test ecx,ecx
jg short M02_L00
xor eax,eax
ret
M02_L00:
xor eax,eax
xor r8d,r8d
mov r9,rdx
M02_L01:
mov r10d,r8d
mov r10,[r9+r10*8]
test r10,r10
jl short M02_L02
lea r11d,[rax+1]
cdqe
mov [rdx+rax*8],r10
mov eax,r11d
M02_L02:
inc r8d
cmp r8d,ecx
jl short M02_L01
ret
; Total bytes of code 55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment