X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fs390xcpuid.S;h=8859e9e64a917f5c40efda91e9f0e9fe0d1a3ef3;hb=7c12c7b61c5b37c9dff930ccc68421fb7de00271;hp=3efad5506bed687c0b9b9447e8a3b4d9bd544488;hpb=670ad0fbf6ebcf113e278d8174081a7e2d2fa44c;p=openssl.git diff --git a/crypto/s390xcpuid.S b/crypto/s390xcpuid.S index 3efad5506b..8859e9e64a 100644 --- a/crypto/s390xcpuid.S +++ b/crypto/s390xcpuid.S @@ -1,4 +1,10 @@ .text +// Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved. +// +// Licensed under the OpenSSL license (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 .globl OPENSSL_s390x_facilities .type OPENSSL_s390x_facilities,@function @@ -125,6 +131,33 @@ OPENSSL_cleanse: br %r14 .size OPENSSL_cleanse,.-OPENSSL_cleanse +.globl CRYPTO_memcmp +.type CRYPTO_memcmp,@function +.align 16 +CRYPTO_memcmp: +#if !defined(__s390x__) && !defined(__s390x) + llgfr %r4,%r4 +#endif + lghi %r5,0 + clgr %r4,%r5 + je .Lno_data + +.Loop_cmp: + llgc %r0,0(%r2) + la %r2,1(%r2) + llgc %r1,0(%r3) + la %r3,1(%r3) + xr %r1,%r0 + or %r5,%r1 + brctg %r4,.Loop_cmp + + lnr %r5,%r5 + srl %r5,31 +.Lno_data: + lgr %r2,%r5 + br %r14 +.size CRYPTO_memcmp,.-CRYPTO_memcmp + .globl OPENSSL_instrument_bus .type OPENSSL_instrument_bus,@function .align 16