]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/intel-ipsec-mb/sse/mb_mgr_aes_xcbc_submit_sse.asm
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / intel-ipsec-mb / sse / mb_mgr_aes_xcbc_submit_sse.asm
index fbf3d5de285f53f7c5f411688333fc218713d2b2..ef5873fc17e30e9ba473c072d2e72be0c7fa743e 100644 (file)
@@ -26,6 +26,7 @@
 ;;
 
 %include "os.asm"
+%include "const.inc"
 %include "job_aes_hmac.asm"
 %include "mb_mgr_datastruct.asm"
 
@@ -143,19 +144,20 @@ fast_copy:
        movdqa  [lane_data + _xcbc_final_block], xmm0
        sub     len, 16         ; take last block off length
 end_fast_copy:
-
-       mov     [state + _aes_xcbc_lens + 2*lane], WORD(len)
-
        pxor    xmm0, xmm0
        shl     lane, 4 ; multiply by 16
        movdqa  [state + _aes_xcbc_args_ICV + lane], xmm0
 
+        ;; insert len into proper lane
+        movdqa  xmm0, [state + _aes_xcbc_lens]
+        XPINSRW xmm0, xmm1, tmp, lane, len, no_scale
+        movdqa  [state + _aes_xcbc_lens], xmm0
+
        cmp     unused_lanes, 0xff
        jne     return_null
 
 start_loop:
        ; Find min length
-       movdqa  xmm0, [state + _aes_xcbc_lens]
        phminposuw      xmm1, xmm0
        pextrw  len2, xmm1, 0   ; min value
        pextrw  idx, xmm1, 1    ; min index (0...3)
@@ -182,6 +184,7 @@ len_is_0:
        mov     word [state + _aes_xcbc_lens + 2*idx], 16
        lea     tmp, [lane_data + _xcbc_final_block]
        mov     [state + _aes_xcbc_args_in + 8*idx], tmp
+        movdqa xmm0, [state + _aes_xcbc_lens]
        jmp     start_loop
 
 end_loop: