; Copyright(c) 2011-2016 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; Copyright(c) 2011-2016 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
%ifidn __OUTPUT_FORMAT__, elf64
; Linux register definitions
%ifidn __OUTPUT_FORMAT__, elf64
; Linux register definitions
; Find min length
vmovdqa xmm0, [state + _lens + 0*16]
vmovdqa xmm1, [state + _lens + 1*16]
; Find min length
vmovdqa xmm0, [state + _lens + 0*16]
vmovdqa xmm1, [state + _lens + 1*16]
vpminud xmm2, xmm0, xmm1 ; xmm2 has {D,C,B,A}
vpalignr xmm3, xmm3, xmm2, 8 ; xmm3 has {x,x,D,C}
vpminud xmm2, xmm2, xmm3 ; xmm2 has {x,x,E,F}
vpalignr xmm3, xmm3, xmm2, 4 ; xmm3 has {x,x,x,E}
vpminud xmm2, xmm2, xmm3 ; xmm2 has min value in low dword
vpminud xmm2, xmm0, xmm1 ; xmm2 has {D,C,B,A}
vpalignr xmm3, xmm3, xmm2, 8 ; xmm3 has {x,x,D,C}
vpminud xmm2, xmm2, xmm3 ; xmm2 has {x,x,E,F}
vpalignr xmm3, xmm3, xmm2, 4 ; xmm3 has {x,x,x,E}
vpminud xmm2, xmm2, xmm3 ; xmm2 has min value in low dword
vmovd xmm0, [state + _args_digest + 4*idx + 0*4*8]
vpinsrd xmm0, [state + _args_digest + 4*idx + 1*4*8], 1
vpinsrd xmm0, [state + _args_digest + 4*idx + 2*4*8], 2
vmovd xmm0, [state + _args_digest + 4*idx + 0*4*8]
vpinsrd xmm0, [state + _args_digest + 4*idx + 1*4*8], 1
vpinsrd xmm0, [state + _args_digest + 4*idx + 2*4*8], 2
vmovdqa xmm13, [rsp + 8*8 + 16*7]
vmovdqa xmm14, [rsp + 8*8 + 16*8]
vmovdqa xmm15, [rsp + 8*8 + 16*9]
vmovdqa xmm13, [rsp + 8*8 + 16*7]
vmovdqa xmm14, [rsp + 8*8 + 16*8]
vmovdqa xmm15, [rsp + 8*8 + 16*9]