Lines Matching +full:current +full:- +full:rotate

2 # SPDX-License-Identifier: GPL-2.0
12 # Copyright (c) 2006-2017, CRYPTOGAMS by <appro@openssl.org>
58 # The module is endian-agnostic in sense that it supports both big-
59 # and little-endian cases. Data alignment in parallelizable modes is
64 # is aligned programmatically, which in turn guarantees exception-
72 # Add XTS subroutine, 9x on little- and 12x improvement on big-endian
76 # Current large-block performance in cycles per byte processed with
77 # 128-bit key (less is better).
79 # CBC en-/decrypt CTR XTS
106 ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
107 ( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
108 die "can't locate ppc-xlate.pl";
139 addi $ptr,$ptr,-0x48
151 li $ptr,-1
153 beq- Lenc_key_abort # if ($inp==0) return -1;
155 beq- Lenc_key_abort # if ($out==0) return -1;
156 li $ptr,-2
158 blt- Lenc_key_abort
160 bgt- Lenc_key_abort
162 bne- Lenc_key_abort
189 vspltisb $outmask,-1
201 vperm $key,$in0,$in0,$mask # rotate-n-splat
203 vperm $outtail,$in0,$in0,$outperm # rotate
221 vperm $key,$in0,$in0,$mask # rotate-n-splat
223 vperm $outtail,$in0,$in0,$outperm # rotate
238 vperm $key,$in0,$in0,$mask # rotate-n-splat
240 vperm $outtail,$in0,$in0,$outperm # rotate
253 vperm $outtail,$in0,$in0,$outperm # rotate
268 vperm $outtail,$in0,$in0,$outperm # rotate
279 vperm $key,$in1,$in1,$mask # roate-n-splat
299 vperm $key,$in1,$in1,$mask # rotate-n-splat
301 vperm $outtail,$stage,$stage,$outperm # rotate
311 vperm $outtail,$stage,$stage,$outperm # rotate
327 vperm $outtail,$in0,$in0,$outperm # rotate
344 vperm $outtail,$in0,$in0,$outperm # rotate
353 vperm $key,$in1,$in1,$mask # rotate-n-splat
355 vperm $outtail,$in1,$in1,$outperm # rotate
369 vperm $outtail,$in0,$in0,$outperm # rotate
405 .size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key
408 $STU $sp,-$FRAME($sp)
415 bne- Ldec_key_abort
438 stw r9, -16($inp)
439 stw r10,-12($inp)
440 stw r11,-8($inp)
441 stw r12,-4($inp)
451 .size .${prefix}_set_decrypt_key,.-.${prefix}_set_decrypt_key
455 {{{ # Single block en- and decrypt procedures #
508 vspltisb v2,-1
514 vperm v0,v0,v0,v3 # rotate [and byte swap in LE]
526 .size .${prefix}_${dir}crypt,.-.${prefix}_${dir}crypt
537 # constants table endian-specific conversion
538 if ($consts && m/\.(long|byte)\s+(.+)\s+(\?[a-z]*)$/o) {
542 # convert to endian-agnostic format
552 # little-endian conversion
566 # instructions prefixed with '?' are endian-specific and need
568 if ($flavour =~ /le$/o) { # little-endian
573 s/\?(vperm\s+v[0-9]+,\s*)(v[0-9]+,\s*)(v[0-9]+,\s*)(v[0-9]+)/$1$3$2$4/o or
574 s/\?(vsldoi\s+v[0-9]+,\s*)(v[0-9]+,)\s*(v[0-9]+,\s*)([0-9]+)/$1$3$2 16-$4/o or
575 s/\?(vspltw\s+v[0-9]+,\s*)(v[0-9]+,)\s*([0-9])/$1$2 3-$3/o;
576 } else { # big-endian
579 s/\?([a-z]+)/$1/o;