X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fc64xpluscpuid.pl;h=9efe1205fff4b5146fe0769fb19cd70903f6a704;hp=0ee0a4e86fe4a63f77f38e4a6a88378d9208bec1;hb=624265c60e07f8e5f251d0f5b79e34cf0221af73;hpb=904732f68bcc6ebd3f8961a9272bc811dc26bcbd diff --git a/crypto/c64xpluscpuid.pl b/crypto/c64xpluscpuid.pl index 0ee0a4e86f..9efe1205ff 100644 --- a/crypto/c64xpluscpuid.pl +++ b/crypto/c64xpluscpuid.pl @@ -1,14 +1,24 @@ -#!/usr/bin/env perl +#! /usr/bin/env perl +# Copyright 2012-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 while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} open STDOUT,">$output"; $code.=<<___; .text + + .if .ASSEMBLER_VERSION<7000000 + .asg 0,__TI_EABI__ + .endif .if __TI_EABI__ .asg OPENSSL_rdtsc,_OPENSSL_rdtsc .asg OPENSSL_cleanse,_OPENSSL_cleanse + .asg CRYPTO_memcmp,_CRYPTO_memcmp .asg OPENSSL_atomic_add,_OPENSSL_atomic_add .asg OPENSSL_wipe_cpu,_OPENSSL_wipe_cpu .asg OPENSSL_instrument_bus,_OPENSSL_instrument_bus @@ -78,6 +88,29 @@ _OPENSSL_cleanse: [A1] STB A2,*A4++[2] .endasmfunc + .global _CRYPTO_memcmp +_CRYPTO_memcmp: + .asmfunc + MV A6,B0 + [!B0] BNOP RA +||[!B0] ZERO A4 + [B0] MVC B0,ILC +|| [B0] ZERO A0 + NOP 4 + + SPLOOP 1 + LDBU *A4++,A1 +|| LDBU *B4++,B1 + NOP 4 + XOR.L B1,A1,A2 + SPKERNEL 1,0 +|| OR.S A2,A0,A0 + + BNOP RA,3 + ZERO.L A4 + [A0] MVK 1,A4 + .endasmfunc + .global _OPENSSL_atomic_add _OPENSSL_atomic_add: .asmfunc