.asciz "AES for PowerISA 2.07, CRYPTOGAMS by <appro\@openssl.org>"
.globl .${prefix}_set_encrypt_key
-.align 5
-.${prefix}_set_encrypt_key:
Lset_encrypt_key:
mflr r11
$PUSH r11,$LRSAVE($sp)
.size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key
.globl .${prefix}_set_decrypt_key
-.align 5
-.${prefix}_set_decrypt_key:
$STU $sp,-$FRAME($sp)
mflr r10
$PUSH r10,$FRAME+$LRSAVE($sp)
$code.=<<___;
.globl .${prefix}_${dir}crypt
-.align 5
-.${prefix}_${dir}crypt:
lwz $rounds,240($key)
lis r0,0xfc00
mfspr $vrsave,256
map("v$_",(4..10));
$code.=<<___;
.globl .${prefix}_cbc_encrypt
-.align 5
-.${prefix}_cbc_encrypt:
${UCMP}i $len,16
bltlr-
$code.=<<___;
.globl .${prefix}_ctr32_encrypt_blocks
-.align 5
-.${prefix}_ctr32_encrypt_blocks:
${UCMP}i $len,1
bltlr-
/osx/ && do { $name = "_$name";
last;
};
- /linux.*(32|64le)/
- && do { $ret .= ".globl $name\n";
- $ret .= ".type $name,\@function";
- last;
- };
- /linux.*64/ && do { $ret .= ".globl $name\n";
- $ret .= ".type $name,\@function\n";
- $ret .= ".section \".opd\",\"aw\"\n";
- $ret .= ".align 3\n";
- $ret .= "$name:\n";
- $ret .= ".quad .$name,.TOC.\@tocbase,0\n";
- $ret .= ".previous\n";
-
- $name = ".$name";
+ /linux/
+ && do { $ret = "_GLOBAL($name)";
last;
};
}
- $ret = ".globl $name" if (!$ret);
+ $ret = ".globl $name\nalign 5\n$name:" if (!$ret);
$$global = $name;
$ret;
};
" .long ".sprintf "0x%X",(31<<26)|($arg<<21)|(147*2);
};
+print "#include <asm/ppc_asm.h>\n" if $flavour =~ /linux/;
+
while($line=<>) {
$line =~ s|[#!;].*$||; # get rid of asm-style comments...
$line =~ s|\bL(\w+)|\.L$1|g if ($dotinlocallabels);
}
- {
- $line =~ s|(^[\.\w]+)\:\s*||;
- my $label = $1;
- if ($label) {
- printf "%s:",($GLOBALS{$label} or $label);
- printf "\n.localentry\t$GLOBALS{$label},0" if ($GLOBALS{$label} && $flavour =~ /linux.*64le/);
- }
- }
-
{
$line =~ s|^\s*(\.?)(\w+)([\.\+\-]?)\s*||;
my $c = $1; $c = "\t" if ($c eq "");