summaryrefslogtreecommitdiff
path: root/source/files/assembly/x86/perf/array_faster.asm
blob: 969bc5493f52877fb0bddcdc0c57ee684729771d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
section .text
global _start:
  call do_work
  mov rax, 60
  mov rdi, r13
  syscall

do_work:
  mov r14, arrrrrr
  xor r15, r15
  xor r13, r13
  movsxd rax, dword [r14]
  jmp tst
  nop
lp:
  mov cl, byte [r14 + r15 + 0x8]
  and cl, 0xf
  add r13, rcx
  inc r15
tst:
  cmp r15, rax
  jl lp
  ret

arrrrrr:
  dd 134217728
  times 134217728 db 57h