X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fppccpuid.pl;h=9d1cada4dc4c9177552f1abdd2bd4151c1e73296;hb=fd2941c8bded64d80e4953c718e675052dac32cb;hp=4c2530d147ae9aa61c15a6a94e77b02909de482c;hpb=81eae077ce679c1d7d29e19991bf055e4888a2fc;p=openssl.git diff --git a/crypto/ppccpuid.pl b/crypto/ppccpuid.pl index 4c2530d147..9d1cada4dc 100755 --- a/crypto/ppccpuid.pl +++ b/crypto/ppccpuid.pl @@ -1,4 +1,11 @@ -#!/usr/bin/env perl +#! /usr/bin/env perl +# Copyright 2007-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 + $flavour = shift; @@ -60,6 +67,16 @@ $code=<<___; .byte 0,12,0x14,0,0,0,0,0 .size .OPENSSL_crypto207_probe,.-.OPENSSL_crypto207_probe +.globl .OPENSSL_madd300_probe +.align 4 +.OPENSSL_madd300_probe: + xor r0,r0,r0 + maddld r3,r0,r0,r0 + maddhdu r3,r0,r0,r0 + blr + .long 0 + .byte 0,12,0x14,0,0,0,0,0 + .globl .OPENSSL_wipe_cpu .align 4 .OPENSSL_wipe_cpu: @@ -160,6 +177,32 @@ Laligned: .byte 0,12,0x14,0,0,0,2,0 .long 0 .size .OPENSSL_cleanse,.-.OPENSSL_cleanse + +globl .CRYPTO_memcmp +.align 4 +.CRYPTO_memcmp: + $CMPLI r5,0 + li r0,0 + beq Lno_data + mtctr r5 +Loop_cmp: + lbz r6,0(r3) + addi r3,r3,1 + lbz r7,0(r4) + addi r4,r4,1 + xor r6,r6,r7 + or r0,r0,r6 + bdnz Loop_cmp + +Lno_data: + li r3,0 + sub r3,r3,r0 + extrwi r3,r3,1,0 + blr + .long 0 + .byte 0,12,0x14,0,0,0,3,0 + .long 0 +.size .CRYPTO_memcmp,.-.CRYPTO_memcmp ___ { my ($out,$cnt,$max)=("r3","r4","r5");