Commit 9b5db104 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Add ARMv8 assembly pack.

Reviewed-by: default avatarDr. Stephen Henson <steve@openssl.org>
(cherry picked from commit b84813ec)
parent 788715ce
Loading
Loading
Loading
Loading
+1 −0
Changes for crypto/Makefile: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
pariscid.s:	pariscid.pl;	$(PERL) pariscid.pl $(PERLASM_SCHEME) $@
alphacpuid.s:	alphacpuid.pl
	$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
arm64cpuid.S:	arm64cpuid.pl;	$(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@

subdirs:
	@target=all; $(RECURSIVE_MAKE)
+4 −0
Changes for crypto/aes/Makefile: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -78,6 +78,10 @@ aes-parisc.s: asm/aes-parisc.pl
aes-mips.S:	asm/aes-mips.pl
	$(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@

aesv8-armx.S:	asm/aesv8-armx.pl
	$(PERL) asm/aesv8-armx.pl $(PERLASM_SCHEME) $@
aesv8-armx.o:	aesv8-armx.S

# GNU make "catch all"
aes-%.S:	asm/aes-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
aes-armv4.o:	aes-armv4.S
+968 −0

File added.

Preview size limit exceeded, changes collapsed.

crypto/arm64cpuid.pl

0 → 100644
+68 −0
Changes for crypto/arm64cpuid.pl: 68 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/usr/bin/env perl

$flavour = shift;
$output  = shift;

$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
( $xlate="${dir}perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";

open OUT,"| \"$^X\" $xlate $flavour $output";
*STDOUT=*OUT;

$code.=<<___;
#include "arm_arch.h"

.text
.arch	armv8-a+crypto

.align	5
.globl	_armv7_neon_probe
.type	_armv7_neon_probe,%function
_armv7_neon_probe:
	orr	v15.16b, v15.16b, v15.16b
	ret
.size	_armv7_neon_probe,.-_armv7_neon_probe

.globl	_armv7_tick
.type	_armv7_tick,%function
_armv7_tick:
#ifdef	__APPLE__
	mrs	x0, CNTPCT_EL0
#else
	mrs	x0, CNTVCT_EL0
#endif
	ret
.size	_armv7_tick,.-_armv7_tick

.globl	_armv8_aes_probe
.type	_armv8_aes_probe,%function
_armv8_aes_probe:
	aese	v0.16b, v0.16b
	ret
.size	_armv8_aes_probe,.-_armv8_aes_probe

.globl	_armv8_sha1_probe
.type	_armv8_sha1_probe,%function
_armv8_sha1_probe:
	sha1h	s0, s0
	ret
.size	_armv8_sha1_probe,.-_armv8_sha1_probe

.globl	_armv8_sha256_probe
.type	_armv8_sha256_probe,%function
_armv8_sha256_probe:
	sha256su0	v0.4s, v0.4s
	ret
.size	_armv8_sha256_probe,.-_armv8_sha256_probe
.globl	_armv8_pmull_probe
.type	_armv8_pmull_probe,%function
_armv8_pmull_probe:
	pmull	v0.1q, v0.1d, v0.1d
	ret
.size	_armv8_pmull_probe,.-_armv8_pmull_probe
___

print $code;
close STDOUT;
+3 −0
Changes for crypto/modes/Makefile: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -56,11 +56,14 @@ ghash-alpha.s: asm/ghash-alpha.pl
	$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
ghash-parisc.s:	asm/ghash-parisc.pl
	$(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
ghashv8-armx.S:	asm/ghashv8-armx.pl
	$(PERL) asm/ghashv8-armx.pl $(PERLASM_SCHEME) $@

# GNU make "catch all"
ghash-%.S:	asm/ghash-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@

ghash-armv4.o:	ghash-armv4.S
ghashv8-armx.o:	ghashv8-armx.S

files:
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
Loading