Browse Source

PPC assembly pack: add .size directives.

master
Andy Polyakov 9 years ago
parent
commit
d6019e1654
8 changed files with 29 additions and 3 deletions
  1. +2
    -0
      crypto/aes/asm/aes-ppc.pl
  2. +1
    -0
      crypto/bn/asm/ppc-mont.pl
  3. +10
    -0
      crypto/bn/asm/ppc.pl
  4. +1
    -0
      crypto/bn/asm/ppc64-mont.pl
  5. +5
    -3
      crypto/perlasm/ppc-xlate.pl
  6. +8
    -0
      crypto/ppccpuid.pl
  7. +1
    -0
      crypto/sha/asm/sha1-ppc.pl
  8. +1
    -0
      crypto/sha/asm/sha512-ppc.pl

+ 2
- 0
crypto/aes/asm/aes-ppc.pl View File

@ -471,6 +471,7 @@ Lenc_done:
.long 0
.byte 0,12,4,1,0x80,18,3,0
.long 0
.size .AES_encrypt,.-.AES_encrypt
.align 5
Lppc_AES_encrypt:
@ -904,6 +905,7 @@ Ldec_done:
.long 0
.byte 0,12,4,1,0x80,18,3,0
.long 0
.size .AES_decrypt,.-.AES_decrypt
.align 5
Lppc_AES_decrypt:


+ 1
- 0
crypto/bn/asm/ppc-mont.pl View File

@ -325,6 +325,7 @@ Lcopy: ; copy or in-place refresh
.long 0
.byte 0,12,4,0,0x80,12,6,0
.long 0
.size .bn_mul_mont_int,.-.bn_mul_mont_int
.asciz "Montgomery Multiplication for PPC, CRYPTOGAMS by <appro\@openssl.org>"
___


+ 10
- 0
crypto/bn/asm/ppc.pl View File

@ -392,6 +392,7 @@ $data=<<EOF;
.long 0
.byte 0,12,0x14,0,0,0,2,0
.long 0
.size .bn_sqr_comba4,.-.bn_sqr_comba4
#
# NOTE: The following label name should be changed to
@ -819,6 +820,7 @@ $data=<<EOF;
.long 0
.byte 0,12,0x14,0,0,0,2,0
.long 0
.size .bn_sqr_comba8,.-.bn_sqr_comba8
#
# NOTE: The following label name should be changed to
@ -972,6 +974,7 @@ $data=<<EOF;
.long 0
.byte 0,12,0x14,0,0,0,3,0
.long 0
.size .bn_mul_comba4,.-.bn_mul_comba4
#
# NOTE: The following label name should be changed to
@ -1510,6 +1513,7 @@ $data=<<EOF;
.long 0
.byte 0,12,0x14,0,0,0,3,0
.long 0
.size .bn_mul_comba8,.-.bn_mul_comba8
#
# NOTE: The following label name should be changed to
@ -1560,6 +1564,7 @@ Lppcasm_sub_adios:
.long 0
.byte 0,12,0x14,0,0,0,4,0
.long 0
.size .bn_sub_words,.-.bn_sub_words
#
# NOTE: The following label name should be changed to
@ -1605,6 +1610,7 @@ Lppcasm_add_adios:
.long 0
.byte 0,12,0x14,0,0,0,4,0
.long 0
.size .bn_add_words,.-.bn_add_words
#
# NOTE: The following label name should be changed to
@ -1720,6 +1726,7 @@ Lppcasm_div9:
.long 0
.byte 0,12,0x14,0,0,0,3,0
.long 0
.size .bn_div_words,.-.bn_div_words
#
# NOTE: The following label name should be changed to
@ -1761,6 +1768,7 @@ Lppcasm_sqr_adios:
.long 0
.byte 0,12,0x14,0,0,0,3,0
.long 0
.size .bn_sqr_words,.-.bn_sqr_words
#
# NOTE: The following label name should be changed to
@ -1866,6 +1874,7 @@ Lppcasm_mw_OVER:
.long 0
.byte 0,12,0x14,0,0,0,4,0
.long 0
.size bn_mul_words,.-bn_mul_words
#
# NOTE: The following label name should be changed to
@ -1991,6 +2000,7 @@ Lppcasm_maw_adios:
.long 0
.byte 0,12,0x14,0,0,0,4,0
.long 0
.size .bn_mul_add_words,.-.bn_mul_add_words
.align 4
EOF
$data =~ s/\`([^\`]*)\`/eval $1/gem;


+ 1
- 0
crypto/bn/asm/ppc64-mont.pl View File

@ -1079,6 +1079,7 @@ $code.=<<___;
.long 0
.byte 0,12,4,0,0x8c,10,6,0
.long 0
.size .$fname,.-.$fname
.asciz "Montgomery Multiplication for PPC64, CRYPTOGAMS by <appro\@openssl.org>"
___


+ 5
- 3
crypto/perlasm/ppc-xlate.pl View File

@ -37,7 +37,6 @@ my $globl = sub {
$ret .= ".align 3\n";
$ret .= "$name:\n";
$ret .= ".quad .$name,.TOC.\@tocbase,0\n";
$ret .= ".size $name,24\n";
$ret .= ".previous\n";
$name = ".$name";
@ -62,9 +61,12 @@ my $machine = sub {
".machine $arch";
};
my $size = sub {
if ($flavour =~ /linux.*32/)
if ($flavour =~ /linux/)
{ shift;
".size " . join(",",@_);
my $name = shift; $name =~ s|^[\.\_]||;
my $ret = ".size $name,.-".($flavour=~/64/?".":"").$name;
$ret .= "\n.size .$name,.-.$name" if ($flavour=~/64/);
$ret;
}
else
{ ""; }


+ 8
- 0
crypto/ppccpuid.pl View File

@ -31,6 +31,7 @@ $code=<<___;
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
.size .OPENSSL_ppc64_probe,.-.OPENSSL_ppc64_probe
.globl .OPENSSL_altivec_probe
.align 4
@ -39,6 +40,7 @@ $code=<<___;
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
.size .OPENSSL_altivec_probe,.-..OPENSSL_altivec_probe
.globl .OPENSSL_wipe_cpu
.align 4
@ -71,6 +73,7 @@ $code=<<___;
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
.size .OPENSSL_wipe_cpu,.-.OPENSSL_wipe_cpu
.globl .OPENSSL_atomic_add
.align 4
@ -84,6 +87,7 @@ Ladd: lwarx r5,0,r3
.long 0
.byte 0,12,0x14,0,0,0,2,0
.long 0
.size .OPENSSL_atomic_add,.-.OPENSSL_atomic_add
.globl .OPENSSL_rdtsc
.align 4
@ -93,6 +97,7 @@ Ladd: lwarx r5,0,r3
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
.size .OPENSSL_rdtsc,.-.OPENSSL_rdtsc
.globl .OPENSSL_cleanse
.align 4
@ -125,6 +130,7 @@ Laligned:
.long 0
.byte 0,12,0x14,0,0,0,2,0
.long 0
.size .OPENSSL_cleanse,.-.OPENSSL_cleanse
___
{
my ($out,$cnt,$max)=("r3","r4","r5");
@ -162,6 +168,7 @@ Loop: mftb $tick
.long 0
.byte 0,12,0x14,0,0,0,2,0
.long 0
.size .OPENSSL_instrument_bus,.-.OPENSSL_instrument_bus
.globl .OPENSSL_instrument_bus2
.align 4
@ -213,6 +220,7 @@ Ldone2:
.long 0
.byte 0,12,0x14,0,0,0,3,0
.long 0
.size .OPENSSL_instrument_bus2,.-.OPENSSL_instrument_bus2
___
}


+ 1
- 0
crypto/sha/asm/sha1-ppc.pl View File

@ -265,6 +265,7 @@ Ldone:
.long 0
.byte 0,12,4,1,0x80,18,3,0
.long 0
.size .sha1_block_data_order,.-.sha1_block_data_order
___
# This is private block function, which uses tailored calling


+ 1
- 0
crypto/sha/asm/sha512-ppc.pl View File

@ -344,6 +344,7 @@ Ldone:
.long 0
.byte 0,12,4,1,0x80,18,3,0
.long 0
.size $func,.-$func
___
if ($SZ==4 || $SIZE_T==8) {


Loading…
Cancel
Save