diff options
Diffstat (limited to 'zap/source/amd64/mem/cp.s')
-rw-r--r-- | zap/source/amd64/mem/cp.s | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/zap/source/amd64/mem/cp.s b/zap/source/amd64/mem/cp.s index 2860acf..3c9f2e1 100644 --- a/zap/source/amd64/mem/cp.s +++ b/zap/source/amd64/mem/cp.s @@ -19,8 +19,8 @@ zap_cp: vmovdqu ymm0,[rsi] # val02 = *(unsigned int256_t *)src; vmovdqu [rdi],ymm0 # *(unsigned int256_t *)dest = val02; - add rsi,0x20 # dest += 0x20u; - add rdi,0x20 # src += 0x20u; + add rdi,0x20 # dest += 0x20u; + add rsi,0x20 # src += 0x20u; sub rdx,0x20 # num -= 0x20u; jmp short .big02cp # goto big02cp; @@ -31,8 +31,8 @@ zap_cp: movdqu xmm0,[rsi] # val01 = *(unsigned int128_t *)src; movdqu [rdi],xmm0 # *(unsigned int128_t *)dest = val01; - add rsi,0x10 # dest += 0x10u; - add rdi,0x10 # src += 0x10u; + add rdi,0x10 # dest += 0x10u; + add rsi,0x10 # src += 0x10u; sub rdx,0x10 # num -= 0x10u; jmp short .big01cp # goto big01cp; @@ -43,8 +43,8 @@ zap_cp: mov rcx,[rsi] # val8 = *(zap_i04 *)src; mov [rdi],rcx # *(zap_i04 *)dest = val8; - add rdi,0x8 # dest += 0x8u; - add rsi,0x8 # src += 0x8u; + add rsi,0x8 # dest += 0x8u; + add rdi,0x8 # src += 0x8u; sub rdx,0x8 # num -= 0x8u; jmp short .wrdcp # goto wrdcp @@ -53,7 +53,7 @@ zap_cp: jz short .done # goto done mov cl,[rsi] # val1 = *(zap_i8 *)src; - mov [rsi],cl # *(zap_i8 *)dest = val1; + mov [rdi],cl # *(zap_i8 *)dest = val1; inc rdi # ++dest; inc rsi # ++src; @@ -61,4 +61,5 @@ zap_cp: jmp short .bytecp # goto bytecp; .done: - ret # return + mov rax,rdi + ret # return dest; |