From 9c7462d90cf6c48b0cd82cbf3ae4e8a458ed77f7 Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 30 May 2017 01:47:15 -0700 Subject: add a bunch of things --- source/files/assembly/x86/perf/array_fastest.asm | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 source/files/assembly/x86/perf/array_fastest.asm (limited to 'source/files/assembly/x86/perf/array_fastest.asm') diff --git a/source/files/assembly/x86/perf/array_fastest.asm b/source/files/assembly/x86/perf/array_fastest.asm new file mode 100644 index 0000000..2e91562 --- /dev/null +++ b/source/files/assembly/x86/perf/array_fastest.asm @@ -0,0 +1,38 @@ +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 + mov rcx, 0x0f0f0f0f + rcl rcx, 32 + or rcx, 0x0f0f0f0f + mov rax, 0 + movq mm1, rax + + mov ebx, dword [r14] + lea rsi, [r14 + 0x8] + test rbx, rbx + jmp tst + nop +lp: + lodsq + and rax, rcx + movq mm0, rax + psadbw mm0, mm1 + movq rax, mm0 + add r13, rax + + sub rbx, 8 +tst: + jnz lp + ret + +arrrrrr: + dd 134217728 + times 134217728 db 57h -- cgit v1.1