;;
%include "os.asm"
+%include "const.inc"
%include "job_aes_hmac.asm"
%include "mb_mgr_datastruct.asm"
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)
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: