Latest update
This commit is contained in:
@@ -274,6 +274,7 @@ $code.=<<___;
|
||||
.type ${PREFIX}_encrypt,\@abi-omnipotent
|
||||
.align 16
|
||||
${PREFIX}_encrypt:
|
||||
.cfi_startproc
|
||||
movups ($inp),$inout0 # load input
|
||||
mov 240($key),$rounds # key->rounds
|
||||
___
|
||||
@@ -284,12 +285,14 @@ $code.=<<___;
|
||||
movups $inout0,($out) # output
|
||||
pxor $inout0,$inout0
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size ${PREFIX}_encrypt,.-${PREFIX}_encrypt
|
||||
|
||||
.globl ${PREFIX}_decrypt
|
||||
.type ${PREFIX}_decrypt,\@abi-omnipotent
|
||||
.align 16
|
||||
${PREFIX}_decrypt:
|
||||
.cfi_startproc
|
||||
movups ($inp),$inout0 # load input
|
||||
mov 240($key),$rounds # key->rounds
|
||||
___
|
||||
@@ -300,6 +303,7 @@ $code.=<<___;
|
||||
movups $inout0,($out) # output
|
||||
pxor $inout0,$inout0
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size ${PREFIX}_decrypt, .-${PREFIX}_decrypt
|
||||
___
|
||||
}
|
||||
@@ -325,6 +329,7 @@ $code.=<<___;
|
||||
.type _aesni_${dir}rypt2,\@abi-omnipotent
|
||||
.align 16
|
||||
_aesni_${dir}rypt2:
|
||||
.cfi_startproc
|
||||
$movkey ($key),$rndkey0
|
||||
shl \$4,$rounds
|
||||
$movkey 16($key),$rndkey1
|
||||
@@ -350,6 +355,7 @@ _aesni_${dir}rypt2:
|
||||
aes${dir}last $rndkey0,$inout0
|
||||
aes${dir}last $rndkey0,$inout1
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size _aesni_${dir}rypt2,.-_aesni_${dir}rypt2
|
||||
___
|
||||
}
|
||||
@@ -361,6 +367,7 @@ $code.=<<___;
|
||||
.type _aesni_${dir}rypt3,\@abi-omnipotent
|
||||
.align 16
|
||||
_aesni_${dir}rypt3:
|
||||
.cfi_startproc
|
||||
$movkey ($key),$rndkey0
|
||||
shl \$4,$rounds
|
||||
$movkey 16($key),$rndkey1
|
||||
@@ -391,6 +398,7 @@ _aesni_${dir}rypt3:
|
||||
aes${dir}last $rndkey0,$inout1
|
||||
aes${dir}last $rndkey0,$inout2
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size _aesni_${dir}rypt3,.-_aesni_${dir}rypt3
|
||||
___
|
||||
}
|
||||
@@ -406,6 +414,7 @@ $code.=<<___;
|
||||
.type _aesni_${dir}rypt4,\@abi-omnipotent
|
||||
.align 16
|
||||
_aesni_${dir}rypt4:
|
||||
.cfi_startproc
|
||||
$movkey ($key),$rndkey0
|
||||
shl \$4,$rounds
|
||||
$movkey 16($key),$rndkey1
|
||||
@@ -442,6 +451,7 @@ _aesni_${dir}rypt4:
|
||||
aes${dir}last $rndkey0,$inout2
|
||||
aes${dir}last $rndkey0,$inout3
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size _aesni_${dir}rypt4,.-_aesni_${dir}rypt4
|
||||
___
|
||||
}
|
||||
@@ -453,6 +463,7 @@ $code.=<<___;
|
||||
.type _aesni_${dir}rypt6,\@abi-omnipotent
|
||||
.align 16
|
||||
_aesni_${dir}rypt6:
|
||||
.cfi_startproc
|
||||
$movkey ($key),$rndkey0
|
||||
shl \$4,$rounds
|
||||
$movkey 16($key),$rndkey1
|
||||
@@ -503,6 +514,7 @@ _aesni_${dir}rypt6:
|
||||
aes${dir}last $rndkey0,$inout4
|
||||
aes${dir}last $rndkey0,$inout5
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size _aesni_${dir}rypt6,.-_aesni_${dir}rypt6
|
||||
___
|
||||
}
|
||||
@@ -514,6 +526,7 @@ $code.=<<___;
|
||||
.type _aesni_${dir}rypt8,\@abi-omnipotent
|
||||
.align 16
|
||||
_aesni_${dir}rypt8:
|
||||
.cfi_startproc
|
||||
$movkey ($key),$rndkey0
|
||||
shl \$4,$rounds
|
||||
$movkey 16($key),$rndkey1
|
||||
@@ -574,6 +587,7 @@ _aesni_${dir}rypt8:
|
||||
aes${dir}last $rndkey0,$inout6
|
||||
aes${dir}last $rndkey0,$inout7
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size _aesni_${dir}rypt8,.-_aesni_${dir}rypt8
|
||||
___
|
||||
}
|
||||
@@ -598,6 +612,7 @@ $code.=<<___;
|
||||
.type aesni_ecb_encrypt,\@function,5
|
||||
.align 16
|
||||
aesni_ecb_encrypt:
|
||||
.cfi_startproc
|
||||
___
|
||||
$code.=<<___ if ($win64);
|
||||
lea -0x58(%rsp),%rsp
|
||||
@@ -943,6 +958,7 @@ $code.=<<___ if ($win64);
|
||||
___
|
||||
$code.=<<___;
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size aesni_ecb_encrypt,.-aesni_ecb_encrypt
|
||||
___
|
||||
|
||||
|
||||
Reference in New Issue
Block a user