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

Add assembly support to ios64-cross.


Fix typos in ios64-cross config line.

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent 27c7609c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ my %table=(
# CROSS_SDK=iPhoneOS7.0.sdk
#
"iphoneos-cross","cc:-O3 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"ios64-cross","cc:-O3 -arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR -RC4_CHUNK DES_INT DES_UNROLL -BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"ios64-cross","cc:-O3 -arch arm64 -mios-version-min=7.0.0 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:ios64:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",

##### A/UX
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
+6 −6
Original line number Diff line number Diff line
@@ -3509,24 +3509,24 @@ $unistd =
$thread_cflag = -D_REENTRANT
$sys_id       = iOS
$lflags       = -Wl,-search_paths_first%
$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHAR -RC4_CHUNK DES_INT DES_UNROLL -BF_PTR
$cpuid_obj    = 
$bn_ops       = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR
$cpuid_obj    = armcap.o arm64cpuid.o mem_clr.o
$bn_obj       = 
$ec_obj       = 
$des_obj      = 
$aes_obj      = 
$aes_obj      = aes_core.o aes_cbc.o aesv8-armx.o
$bf_obj       = 
$md5_obj      = 
$sha1_obj     = 
$sha1_obj     = sha1-armv8.o sha256-armv8.o sha512-armv8.o
$cast_obj     = 
$rc4_obj      = 
$rmd160_obj   = 
$rc5_obj      = 
$wp_obj       = 
$cmll_obj     = 
$modes_obj    = 
$modes_obj    = ghashv8-armx.o
$engines_obj  = 
$perlasm_scheme = void
$perlasm_scheme = ios64
$dso_scheme   = dlfcn
$shared_target= darwin-shared
$shared_cflag = -fPIC -fno-common
+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ alphacpuid.s: alphacpuid.pl
	(preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
	$(PERL) alphacpuid.pl > $$preproc && \
	$(CC) -E -P $$preproc > $@ && rm $$preproc)
arm64cpuid.S:	arm64cpuid.pl;	$(PERL) arm64cpuid.pl $(PERLASM_SCHEME) > $@

subdirs:
	@target=all; $(RECURSIVE_MAKE)
+11 −3
Original line number Diff line number Diff line
@@ -28,7 +28,15 @@
# Cortex-A57	3.64		1.34		1.32

$flavour = shift;
open STDOUT,">".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;

$prefix="aes_v8";

@@ -56,7 +64,7 @@ my ($zero,$rcon,$mask,$in0,$in1,$tmp,$key)=

$code.=<<___;
.align	5
rcon:
.Lrcon:
.long	0x01,0x01,0x01,0x01
.long	0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d	// rotate-n-splat
.long	0x1b,0x1b,0x1b,0x1b
@@ -85,7 +93,7 @@ $code.=<<___;
	tst	$bits,#0x3f
	b.ne	.Lenc_key_abort

	adr	$ptr,rcon
	adr	$ptr,.Lrcon
	cmp	$bits,#192

	veor	$zero,$zero,$zero
+28 −6
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
.global	_armv7_neon_probe
.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

.global	_armv7_tick
.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

.global	_armv8_aes_probe
.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

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

.global	_armv8_sha256_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
.global	_armv8_pmull_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;
Loading