X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Farm64cpuid.pl;h=f25c6373a4623ceff10069b601de86dc464e0ff0;hb=ac1055ef13ccb5789e2bed7b9688c8eb16dd05ce;hp=caa33875c93739e9f9645f1350078bb231bfeb69;hpb=e33826f01bd78af76e0135c8dfab3387927a82bb;p=oweals%2Fopenssl.git diff --git a/crypto/arm64cpuid.pl b/crypto/arm64cpuid.pl index caa33875c9..f25c6373a4 100755 --- a/crypto/arm64cpuid.pl +++ b/crypto/arm64cpuid.pl @@ -1,7 +1,7 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -63,6 +63,7 @@ _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: @@ -70,6 +71,13 @@ _armv8_pmull_probe: ret .size _armv8_pmull_probe,.-_armv8_pmull_probe +.globl _armv8_sha512_probe +.type _armv8_sha512_probe,%function +_armv8_sha512_probe: + .long 0xcec08000 // sha512su0 v0.2d,v0.2d + ret +.size _armv8_sha512_probe,.-_armv8_sha512_probe + .globl OPENSSL_cleanse .type OPENSSL_cleanse,%function .align 5 @@ -107,6 +115,19 @@ OPENSSL_cleanse: CRYPTO_memcmp: eor w3,w3,w3 cbz x2,.Lno_data // len==0? + cmp x2,#16 + b.ne .Loop_cmp + ldp x8,x9,[x0] + ldp x10,x11,[x1] + eor x8,x8,x10 + eor x9,x9,x11 + orr x8,x8,x9 + mov x0,#1 + cmp x8,#0 + csel x0,xzr,x0,eq + ret + +.align 4 .Loop_cmp: ldrb w4,[x0],#1 ldrb w5,[x1],#1