Commit f42613c6 authored by Herbert Xu's avatar Herbert Xu

linux-next: Tree for Mar 11 (powerpc build failure due to vmx crypto code)

crypto: vmx - Fix assembler perl to use _GLOBAL

Rather than doing things by hand for global symbols to deal with
different calling conventions we already have a macro _GLOBAL in
Linux to handle this.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent a308d66f
...@@ -85,8 +85,6 @@ Lconsts: ...@@ -85,8 +85,6 @@ Lconsts:
.asciz "AES for PowerISA 2.07, CRYPTOGAMS by <appro\@openssl.org>" .asciz "AES for PowerISA 2.07, CRYPTOGAMS by <appro\@openssl.org>"
.globl .${prefix}_set_encrypt_key .globl .${prefix}_set_encrypt_key
.align 5
.${prefix}_set_encrypt_key:
Lset_encrypt_key: Lset_encrypt_key:
mflr r11 mflr r11
$PUSH r11,$LRSAVE($sp) $PUSH r11,$LRSAVE($sp)
...@@ -348,8 +346,6 @@ Lenc_key_abort: ...@@ -348,8 +346,6 @@ Lenc_key_abort:
.size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key .size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key
.globl .${prefix}_set_decrypt_key .globl .${prefix}_set_decrypt_key
.align 5
.${prefix}_set_decrypt_key:
$STU $sp,-$FRAME($sp) $STU $sp,-$FRAME($sp)
mflr r10 mflr r10
$PUSH r10,$FRAME+$LRSAVE($sp) $PUSH r10,$FRAME+$LRSAVE($sp)
...@@ -405,8 +401,6 @@ my ($inp,$out,$key,$rounds,$idx)=map("r$_",(3..7)); ...@@ -405,8 +401,6 @@ my ($inp,$out,$key,$rounds,$idx)=map("r$_",(3..7));
$code.=<<___; $code.=<<___;
.globl .${prefix}_${dir}crypt .globl .${prefix}_${dir}crypt
.align 5
.${prefix}_${dir}crypt:
lwz $rounds,240($key) lwz $rounds,240($key)
lis r0,0xfc00 lis r0,0xfc00
mfspr $vrsave,256 mfspr $vrsave,256
...@@ -484,8 +478,6 @@ my ($ivec,$inptail,$inpperm,$outhead,$outperm,$outmask,$keyperm)= ...@@ -484,8 +478,6 @@ my ($ivec,$inptail,$inpperm,$outhead,$outperm,$outmask,$keyperm)=
map("v$_",(4..10)); map("v$_",(4..10));
$code.=<<___; $code.=<<___;
.globl .${prefix}_cbc_encrypt .globl .${prefix}_cbc_encrypt
.align 5
.${prefix}_cbc_encrypt:
${UCMP}i $len,16 ${UCMP}i $len,16
bltlr- bltlr-
...@@ -1243,8 +1235,6 @@ my $dat=$tmp; ...@@ -1243,8 +1235,6 @@ my $dat=$tmp;
$code.=<<___; $code.=<<___;
.globl .${prefix}_ctr32_encrypt_blocks .globl .${prefix}_ctr32_encrypt_blocks
.align 5
.${prefix}_ctr32_encrypt_blocks:
${UCMP}i $len,1 ${UCMP}i $len,1
bltlr- bltlr-
......
...@@ -54,8 +54,6 @@ $code=<<___; ...@@ -54,8 +54,6 @@ $code=<<___;
.text .text
.globl .gcm_init_p8 .globl .gcm_init_p8
.align 5
.gcm_init_p8:
lis r0,0xfff0 lis r0,0xfff0
li r8,0x10 li r8,0x10
mfspr $vrsave,256 mfspr $vrsave,256
...@@ -98,8 +96,6 @@ $code=<<___; ...@@ -98,8 +96,6 @@ $code=<<___;
.size .gcm_init_p8,.-.gcm_init_p8 .size .gcm_init_p8,.-.gcm_init_p8
.globl .gcm_gmult_p8 .globl .gcm_gmult_p8
.align 5
.gcm_gmult_p8:
lis r0,0xfff8 lis r0,0xfff8
li r8,0x10 li r8,0x10
mfspr $vrsave,256 mfspr $vrsave,256
...@@ -148,8 +144,6 @@ $code=<<___; ...@@ -148,8 +144,6 @@ $code=<<___;
.size .gcm_gmult_p8,.-.gcm_gmult_p8 .size .gcm_gmult_p8,.-.gcm_gmult_p8
.globl .gcm_ghash_p8 .globl .gcm_ghash_p8
.align 5
.gcm_ghash_p8:
lis r0,0xfff8 lis r0,0xfff8
li r8,0x10 li r8,0x10
mfspr $vrsave,256 mfspr $vrsave,256
......
...@@ -27,25 +27,13 @@ my $globl = sub { ...@@ -27,25 +27,13 @@ my $globl = sub {
/osx/ && do { $name = "_$name"; /osx/ && do { $name = "_$name";
last; last;
}; };
/linux.*(32|64le)/ /linux/
&& do { $ret .= ".globl $name\n"; && do { $ret = "_GLOBAL($name)";
$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";
last; last;
}; };
} }
$ret = ".globl $name" if (!$ret); $ret = ".globl $name\nalign 5\n$name:" if (!$ret);
$$global = $name; $$global = $name;
$ret; $ret;
}; };
...@@ -187,6 +175,8 @@ my $mtsle = sub { ...@@ -187,6 +175,8 @@ my $mtsle = sub {
" .long ".sprintf "0x%X",(31<<26)|($arg<<21)|(147*2); " .long ".sprintf "0x%X",(31<<26)|($arg<<21)|(147*2);
}; };
print "#include <asm/ppc_asm.h>\n" if $flavour =~ /linux/;
while($line=<>) { while($line=<>) {
$line =~ s|[#!;].*$||; # get rid of asm-style comments... $line =~ s|[#!;].*$||; # get rid of asm-style comments...
...@@ -199,15 +189,6 @@ while($line=<>) { ...@@ -199,15 +189,6 @@ while($line=<>) {
$line =~ s|\bL(\w+)|\.L$1|g if ($dotinlocallabels); $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*||; $line =~ s|^\s*(\.?)(\w+)([\.\+\-]?)\s*||;
my $c = $1; $c = "\t" if ($c eq ""); my $c = $1; $c = "\t" if ($c eq "");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment