diff options
author | Andy Polyakov <appro@openssl.org> | 2014-05-04 16:38:32 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-05-04 16:38:32 +0200 |
commit | bd227733b9f5acaba81e064f508b5821317dc59b (patch) | |
tree | 43cae0f01943990e24e07a4b749bec5b6e90c45e /crypto/sha | |
parent | 9250a30692e182957d3fe48e3e07b1824ca1453a (diff) | |
download | openssl-bd227733b9f5acaba81e064f508b5821317dc59b.tar.gz |
C64x+ assembly pack: make it work with older toolchain.
Diffstat (limited to 'crypto/sha')
-rw-r--r-- | crypto/sha/asm/sha1-c64xplus.pl | 4 | ||||
-rw-r--r-- | crypto/sha/asm/sha256-c64xplus.pl | 15 | ||||
-rw-r--r-- | crypto/sha/asm/sha512-c64xplus.pl | 17 |
3 files changed, 25 insertions, 11 deletions
diff --git a/crypto/sha/asm/sha1-c64xplus.pl b/crypto/sha/asm/sha1-c64xplus.pl index 456f80a86e..ad8b17211f 100644 --- a/crypto/sha/asm/sha1-c64xplus.pl +++ b/crypto/sha/asm/sha1-c64xplus.pl @@ -38,6 +38,10 @@ open STDOUT,">$output"; $code=<<___; .text + + .if .ASSEMBLER_VERSION<7000000 + .asg 0,__TI_EABI__ + .endif .if __TI_EABI__ .asg sha1_block_data_order,_sha1_block_data_order .endif diff --git a/crypto/sha/asm/sha256-c64xplus.pl b/crypto/sha/asm/sha256-c64xplus.pl index 798f78309b..2f775ac005 100644 --- a/crypto/sha/asm/sha256-c64xplus.pl +++ b/crypto/sha/asm/sha256-c64xplus.pl @@ -38,6 +38,10 @@ open STDOUT,">$output"; $code.=<<___; .text + + .if .ASSEMBLER_VERSION<7000000 + .asg 0,__TI_EABI__ + .endif .if __TI_EABI__ .nocmp .asg sha256_block_data_order,_sha256_block_data_order @@ -54,24 +58,25 @@ $code.=<<___; .global _sha256_block_data_order _sha256_block_data_order: +__sha256_block: .asmfunc stack_usage(64) MV $NUM,A0 ; reassign $NUM || MVK -64,B0 [!A0] BNOP RA ; if ($NUM==0) return; || [A0] STW FP,*SP--[16] ; save frame pointer and alloca(64) || [A0] MV SP,FP - [A0] ADDKPC _sha256_block_data_order,B2 + [A0] ADDKPC __sha256_block,B2 || [A0] AND B0,SP,SP ; align stack at 64 bytes .if __TI_EABI__ [A0] MVK 0x00404,B1 -|| [A0] MVKL \$PCR_OFFSET(K256,_sha256_block_data_order),$K256 +|| [A0] MVKL \$PCR_OFFSET(K256,__sha256_block),$K256 [A0] MVKH 0x50000,B1 -|| [A0] MVKH \$PCR_OFFSET(K256,_sha256_block_data_order),$K256 +|| [A0] MVKH \$PCR_OFFSET(K256,__sha256_block),$K256 .else [A0] MVK 0x00404,B1 -|| [A0] MVKL (K256-_sha256_block_data_order),$K256 +|| [A0] MVKL (K256-__sha256_block),$K256 [A0] MVKH 0x50000,B1 -|| [A0] MVKH (K256-_sha256_block_data_order),$K256 +|| [A0] MVKH (K256-__sha256_block),$K256 .endif [A0] MVC B1,AMR ; setup circular addressing || [A0] MV SP,$Xia diff --git a/crypto/sha/asm/sha512-c64xplus.pl b/crypto/sha/asm/sha512-c64xplus.pl index 77a62523e5..71a1e80bbb 100644 --- a/crypto/sha/asm/sha512-c64xplus.pl +++ b/crypto/sha/asm/sha512-c64xplus.pl @@ -46,6 +46,10 @@ open STDOUT,">$output"; $code.=<<___; .text + + .if .ASSEMBLER_VERSION<7000000 + .asg 0,__TI_EABI__ + .endif .if __TI_EABI__ .nocmp .asg sha512_block_data_order,_sha512_block_data_order @@ -65,6 +69,7 @@ $code.=<<___; .global _sha512_block_data_order _sha512_block_data_order: +__sha512_block: .asmfunc stack_usage(40+128) MV $NUM,A0 ; reassign $NUM || MVK -128,B0 @@ -81,15 +86,15 @@ _sha512_block_data_order: || [A0] ADD B0,SP,SP ; alloca(128) .if __TI_EABI__ [A0] AND B0,SP,SP ; align stack at 128 bytes -|| [A0] ADDKPC _sha512_block_data_order,B1 -|| [A0] MVKL \$PCR_OFFSET(K512,_sha512_block_data_order),$K512 - [A0] MVKH \$PCR_OFFSET(K512,_sha512_block_data_order),$K512 +|| [A0] ADDKPC __sha512_block,B1 +|| [A0] MVKL \$PCR_OFFSET(K512,__sha512_block),$K512 + [A0] MVKH \$PCR_OFFSET(K512,__sha512_block),$K512 || [A0] SUBAW SP,2,SP ; reserve two words above buffer .else [A0] AND B0,SP,SP ; align stack at 128 bytes -|| [A0] ADDKPC _sha512_block_data_order,B1 -|| [A0] MVKL (K512-_sha512_block_data_order),$K512 - [A0] MVKH (K512-_sha512_block_data_order),$K512 +|| [A0] ADDKPC __sha512_block,B1 +|| [A0] MVKL (K512-__sha512_block),$K512 + [A0] MVKH (K512-__sha512_block),$K512 || [A0] SUBAW SP,2,SP ; reserve two words above buffer .endif ADDAW SP,3,$Xilo |