2016-04-20 10:10:43 +08:00
|
|
|
#! /usr/bin/env perl
|
2022-05-03 18:52:38 +08:00
|
|
|
# Copyright 2007-2022 The OpenSSL Project Authors. All Rights Reserved.
|
2016-04-20 10:10:43 +08:00
|
|
|
#
|
2018-12-06 21:03:01 +08:00
|
|
|
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-04-20 10:10:43 +08:00
|
|
|
# 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
|
|
|
|
|
2007-05-16 04:51:48 +08:00
|
|
|
|
Unify all assembler file generators
They now generally conform to the following argument sequence:
script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \
$(PROCESSOR) <output file>
However, in the spirit of being able to use these scripts manually,
they also allow for no argument, or for only the flavour, or for only
the output file. This is done by only using the last argument as
output file if it's a file (it has an extension), and only using the
first argument as flavour if it isn't a file (it doesn't have an
extension).
While we're at it, we make all $xlate calls the same, i.e. the $output
argument is always quoted, and we always die on error when trying to
start $xlate.
There's a perl lesson in this, regarding operator priority...
This will always succeed, even when it fails:
open FOO, "something" || die "ERR: $!";
The reason is that '||' has higher priority than list operators (a
function is essentially a list operator and gobbles up everything
following it that isn't lower priority), and since a non-empty string
is always true, so that ends up being exactly the same as:
open FOO, "something";
This, however, will fail if "something" can't be opened:
open FOO, "something" or die "ERR: $!";
The reason is that 'or' has lower priority that list operators,
i.e. it's performed after the 'open' call.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9884)
2019-09-13 06:06:46 +08:00
|
|
|
# $output is the last argument if it looks like a file (it has an extension)
|
|
|
|
# $flavour is the first argument if it doesn't look like a file
|
|
|
|
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
|
|
|
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
2007-05-16 04:51:48 +08:00
|
|
|
|
|
|
|
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
|
|
|
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
|
|
|
|
( $xlate="${dir}perlasm/ppc-xlate.pl" and -f $xlate) or
|
|
|
|
die "can't locate ppc-xlate.pl";
|
|
|
|
|
Unify all assembler file generators
They now generally conform to the following argument sequence:
script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \
$(PROCESSOR) <output file>
However, in the spirit of being able to use these scripts manually,
they also allow for no argument, or for only the flavour, or for only
the output file. This is done by only using the last argument as
output file if it's a file (it has an extension), and only using the
first argument as flavour if it isn't a file (it doesn't have an
extension).
While we're at it, we make all $xlate calls the same, i.e. the $output
argument is always quoted, and we always die on error when trying to
start $xlate.
There's a perl lesson in this, regarding operator priority...
This will always succeed, even when it fails:
open FOO, "something" || die "ERR: $!";
The reason is that '||' has higher priority than list operators (a
function is essentially a list operator and gobbles up everything
following it that isn't lower priority), and since a non-empty string
is always true, so that ends up being exactly the same as:
open FOO, "something";
This, however, will fail if "something" can't be opened:
open FOO, "something" or die "ERR: $!";
The reason is that 'or' has lower priority that list operators,
i.e. it's performed after the 'open' call.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9884)
2019-09-13 06:06:46 +08:00
|
|
|
open STDOUT,"| $^X $xlate $flavour \"$output\""
|
|
|
|
or die "can't call $xlate: $!";
|
2007-05-16 04:51:48 +08:00
|
|
|
|
2008-01-14 06:01:30 +08:00
|
|
|
if ($flavour=~/64/) {
|
2007-05-16 04:51:48 +08:00
|
|
|
$CMPLI="cmpldi";
|
|
|
|
$SHRLI="srdi";
|
|
|
|
$SIGNX="extsw";
|
|
|
|
} else {
|
|
|
|
$CMPLI="cmplwi";
|
|
|
|
$SHRLI="srwi";
|
|
|
|
$SIGNX="mr";
|
|
|
|
}
|
|
|
|
|
|
|
|
$code=<<___;
|
2008-09-12 22:45:54 +08:00
|
|
|
.machine "any"
|
2007-05-16 04:51:48 +08:00
|
|
|
.text
|
|
|
|
|
2015-11-14 07:16:37 +08:00
|
|
|
.globl .OPENSSL_fpu_probe
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_fpu_probe:
|
|
|
|
fmr f0,f0
|
|
|
|
blr
|
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
|
|
|
.size .OPENSSL_fpu_probe,.-.OPENSSL_fpu_probe
|
2009-12-27 05:30:13 +08:00
|
|
|
.globl .OPENSSL_ppc64_probe
|
2007-05-16 04:51:48 +08:00
|
|
|
.align 4
|
2009-12-27 05:30:13 +08:00
|
|
|
.OPENSSL_ppc64_probe:
|
|
|
|
fcfid f1,f1
|
|
|
|
extrdi r0,r0,32,0
|
2007-05-16 04:51:48 +08:00
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
2013-10-15 06:14:39 +08:00
|
|
|
.size .OPENSSL_ppc64_probe,.-.OPENSSL_ppc64_probe
|
2007-05-16 04:51:48 +08:00
|
|
|
|
2010-09-10 23:00:51 +08:00
|
|
|
.globl .OPENSSL_altivec_probe
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_altivec_probe:
|
|
|
|
.long 0x10000484 # vor v0,v0,v0
|
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
2013-10-15 06:14:39 +08:00
|
|
|
.size .OPENSSL_altivec_probe,.-..OPENSSL_altivec_probe
|
2010-09-10 23:00:51 +08:00
|
|
|
|
2014-06-02 05:38:11 +08:00
|
|
|
.globl .OPENSSL_crypto207_probe
|
|
|
|
.align 4
|
2014-06-04 14:34:18 +08:00
|
|
|
.OPENSSL_crypto207_probe:
|
2014-06-02 05:38:11 +08:00
|
|
|
lvx_u v0,0,r1
|
|
|
|
vcipher v0,v0,v0
|
|
|
|
blr
|
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
|
|
|
.size .OPENSSL_crypto207_probe,.-.OPENSSL_crypto207_probe
|
|
|
|
|
2016-04-12 06:09:47 +08:00
|
|
|
.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
|
|
|
|
|
2021-09-20 22:45:15 +08:00
|
|
|
.globl .OPENSSL_brd31_probe
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_brd31_probe:
|
|
|
|
xor r0,r0,r0
|
|
|
|
brd r3,r0
|
|
|
|
blr
|
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
|
|
|
.size .OPENSSL_brd31_probe,.-.OPENSSL_brd31_probe
|
|
|
|
|
|
|
|
|
2007-05-16 04:51:48 +08:00
|
|
|
.globl .OPENSSL_wipe_cpu
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_wipe_cpu:
|
|
|
|
xor r0,r0,r0
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f0,f31
|
|
|
|
fmr f1,f31
|
|
|
|
fmr f2,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
mr r3,r1
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f3,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r4,r4,r4
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f4,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r5,r5,r5
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f5,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r6,r6,r6
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f6,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r7,r7,r7
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f7,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r8,r8,r8
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f8,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r9,r9,r9
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f9,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r10,r10,r10
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f10,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r11,r11,r11
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f11,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
xor r12,r12,r12
|
2010-01-17 21:44:14 +08:00
|
|
|
fmr f12,f31
|
|
|
|
fmr f13,f31
|
2007-05-16 04:51:48 +08:00
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
2013-10-15 06:14:39 +08:00
|
|
|
.size .OPENSSL_wipe_cpu,.-.OPENSSL_wipe_cpu
|
2007-05-16 04:51:48 +08:00
|
|
|
|
|
|
|
.globl .OPENSSL_atomic_add
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_atomic_add:
|
2011-04-17 20:46:00 +08:00
|
|
|
Ladd: lwarx r5,0,r3
|
2007-05-16 04:51:48 +08:00
|
|
|
add r0,r4,r5
|
|
|
|
stwcx. r0,0,r3
|
2011-04-17 20:46:00 +08:00
|
|
|
bne- Ladd
|
2007-05-16 04:51:48 +08:00
|
|
|
$SIGNX r3,r0
|
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,2,0
|
|
|
|
.long 0
|
2013-10-15 06:14:39 +08:00
|
|
|
.size .OPENSSL_atomic_add,.-.OPENSSL_atomic_add
|
2007-05-16 04:51:48 +08:00
|
|
|
|
2019-01-17 22:15:57 +08:00
|
|
|
.globl .OPENSSL_rdtsc_mftb
|
2007-05-16 04:51:48 +08:00
|
|
|
.align 4
|
2019-01-17 22:15:57 +08:00
|
|
|
.OPENSSL_rdtsc_mftb:
|
2007-05-16 04:51:48 +08:00
|
|
|
mftb r3
|
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
2019-01-17 22:15:57 +08:00
|
|
|
.size .OPENSSL_rdtsc_mftb,.-.OPENSSL_rdtsc_mftb
|
|
|
|
|
|
|
|
.globl .OPENSSL_rdtsc_mfspr268
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_rdtsc_mfspr268:
|
|
|
|
mfspr r3,268
|
|
|
|
blr
|
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,0,0
|
|
|
|
.size .OPENSSL_rdtsc_mfspr268,.-.OPENSSL_rdtsc_mfspr268
|
2007-05-16 04:51:48 +08:00
|
|
|
|
|
|
|
.globl .OPENSSL_cleanse
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_cleanse:
|
|
|
|
$CMPLI r4,7
|
|
|
|
li r0,0
|
|
|
|
bge Lot
|
2010-01-24 22:54:24 +08:00
|
|
|
$CMPLI r4,0
|
|
|
|
beqlr-
|
2007-05-16 04:51:48 +08:00
|
|
|
Little: mtctr r4
|
|
|
|
stb r0,0(r3)
|
|
|
|
addi r3,r3,1
|
2012-04-28 04:17:45 +08:00
|
|
|
bdnz \$-8
|
2007-05-16 04:51:48 +08:00
|
|
|
blr
|
|
|
|
Lot: andi. r5,r3,3
|
|
|
|
beq Laligned
|
|
|
|
stb r0,0(r3)
|
|
|
|
subi r4,r4,1
|
|
|
|
addi r3,r3,1
|
|
|
|
b Lot
|
|
|
|
Laligned:
|
|
|
|
$SHRLI r5,r4,2
|
|
|
|
mtctr r5
|
|
|
|
stw r0,0(r3)
|
|
|
|
addi r3,r3,4
|
2012-04-28 04:17:45 +08:00
|
|
|
bdnz \$-8
|
2007-05-16 04:51:48 +08:00
|
|
|
andi. r4,r4,3
|
|
|
|
bne Little
|
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,2,0
|
|
|
|
.long 0
|
2013-10-15 06:14:39 +08:00
|
|
|
.size .OPENSSL_cleanse,.-.OPENSSL_cleanse
|
2016-05-15 23:01:15 +08:00
|
|
|
|
|
|
|
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
|
2007-05-16 04:51:48 +08:00
|
|
|
___
|
2011-04-17 20:46:00 +08:00
|
|
|
{
|
|
|
|
my ($out,$cnt,$max)=("r3","r4","r5");
|
|
|
|
my ($tick,$lasttick)=("r6","r7");
|
|
|
|
my ($diff,$lastdiff)=("r8","r9");
|
|
|
|
|
|
|
|
$code.=<<___;
|
2019-01-17 22:15:57 +08:00
|
|
|
.globl .OPENSSL_instrument_bus_mftb
|
2011-04-17 20:46:00 +08:00
|
|
|
.align 4
|
2019-01-17 22:15:57 +08:00
|
|
|
.OPENSSL_instrument_bus_mftb:
|
2011-04-17 20:46:00 +08:00
|
|
|
mtctr $cnt
|
|
|
|
|
|
|
|
mftb $lasttick # collect 1st tick
|
|
|
|
li $diff,0
|
|
|
|
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
|
|
|
|
Loop: mftb $tick
|
|
|
|
sub $diff,$tick,$lasttick
|
|
|
|
mr $lasttick,$tick
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
addi $out,$out,4 # ++$out
|
|
|
|
bdnz Loop
|
|
|
|
|
|
|
|
mr r3,$cnt
|
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,2,0
|
|
|
|
.long 0
|
2019-01-17 22:15:57 +08:00
|
|
|
.size .OPENSSL_instrument_bus_mftb,.-.OPENSSL_instrument_bus_mftb
|
2011-04-17 20:46:00 +08:00
|
|
|
|
2019-01-17 22:15:57 +08:00
|
|
|
.globl .OPENSSL_instrument_bus2_mftb
|
2011-04-17 20:46:00 +08:00
|
|
|
.align 4
|
2019-01-17 22:15:57 +08:00
|
|
|
.OPENSSL_instrument_bus2_mftb:
|
2011-04-17 20:46:00 +08:00
|
|
|
mr r0,$cnt
|
|
|
|
slwi $cnt,$cnt,2
|
|
|
|
|
|
|
|
mftb $lasttick # collect 1st tick
|
|
|
|
li $diff,0
|
|
|
|
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
|
|
|
|
mftb $tick # collect 1st diff
|
|
|
|
sub $diff,$tick,$lasttick
|
|
|
|
mr $lasttick,$tick
|
|
|
|
mr $lastdiff,$diff
|
|
|
|
Loop2:
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
|
|
|
|
addic. $max,$max,-1
|
|
|
|
beq Ldone2
|
|
|
|
|
|
|
|
mftb $tick
|
|
|
|
sub $diff,$tick,$lasttick
|
|
|
|
mr $lasttick,$tick
|
|
|
|
cmplw 7,$diff,$lastdiff
|
|
|
|
mr $lastdiff,$diff
|
|
|
|
|
|
|
|
mfcr $tick # pull cr
|
|
|
|
not $tick,$tick # flip bits
|
|
|
|
rlwinm $tick,$tick,1,29,29 # isolate flipped eq bit and scale
|
|
|
|
|
|
|
|
sub. $cnt,$cnt,$tick # conditional --$cnt
|
|
|
|
add $out,$out,$tick # conditional ++$out
|
|
|
|
bne Loop2
|
|
|
|
|
|
|
|
Ldone2:
|
|
|
|
srwi $cnt,$cnt,2
|
|
|
|
sub r3,r0,$cnt
|
|
|
|
blr
|
2011-05-27 21:32:34 +08:00
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,3,0
|
|
|
|
.long 0
|
2019-01-17 22:15:57 +08:00
|
|
|
.size .OPENSSL_instrument_bus2_mftb,.-.OPENSSL_instrument_bus2_mftb
|
|
|
|
|
|
|
|
.globl .OPENSSL_instrument_bus_mfspr268
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_instrument_bus_mfspr268:
|
|
|
|
mtctr $cnt
|
|
|
|
|
|
|
|
mfspr $lasttick,268 # collect 1st tick
|
|
|
|
li $diff,0
|
|
|
|
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
|
|
|
|
Loop3: mfspr $tick,268
|
|
|
|
sub $diff,$tick,$lasttick
|
|
|
|
mr $lasttick,$tick
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
addi $out,$out,4 # ++$out
|
|
|
|
bdnz Loop3
|
|
|
|
|
|
|
|
mr r3,$cnt
|
|
|
|
blr
|
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,2,0
|
|
|
|
.long 0
|
|
|
|
.size .OPENSSL_instrument_bus_mfspr268,.-.OPENSSL_instrument_bus_mfspr268
|
|
|
|
|
|
|
|
.globl .OPENSSL_instrument_bus2_mfspr268
|
|
|
|
.align 4
|
|
|
|
.OPENSSL_instrument_bus2_mfspr268:
|
|
|
|
mr r0,$cnt
|
|
|
|
slwi $cnt,$cnt,2
|
|
|
|
|
|
|
|
mfspr $lasttick,268 # collect 1st tick
|
|
|
|
li $diff,0
|
|
|
|
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
|
|
|
|
mfspr $tick,268 # collect 1st diff
|
|
|
|
sub $diff,$tick,$lasttick
|
|
|
|
mr $lasttick,$tick
|
|
|
|
mr $lastdiff,$diff
|
|
|
|
Loop4:
|
|
|
|
dcbf 0,$out # flush cache line
|
|
|
|
lwarx $tick,0,$out # load and lock
|
|
|
|
add $tick,$tick,$diff
|
|
|
|
stwcx. $tick,0,$out
|
|
|
|
stwx $tick,0,$out
|
|
|
|
|
|
|
|
addic. $max,$max,-1
|
|
|
|
beq Ldone4
|
|
|
|
|
|
|
|
mfspr $tick,268
|
|
|
|
sub $diff,$tick,$lasttick
|
|
|
|
mr $lasttick,$tick
|
|
|
|
cmplw 7,$diff,$lastdiff
|
|
|
|
mr $lastdiff,$diff
|
|
|
|
|
|
|
|
mfcr $tick # pull cr
|
|
|
|
not $tick,$tick # flip bits
|
|
|
|
rlwinm $tick,$tick,1,29,29 # isolate flipped eq bit and scale
|
|
|
|
|
|
|
|
sub. $cnt,$cnt,$tick # conditional --$cnt
|
|
|
|
add $out,$out,$tick # conditional ++$out
|
|
|
|
bne Loop4
|
|
|
|
|
|
|
|
Ldone4:
|
|
|
|
srwi $cnt,$cnt,2
|
|
|
|
sub r3,r0,$cnt
|
|
|
|
blr
|
|
|
|
.long 0
|
|
|
|
.byte 0,12,0x14,0,0,0,3,0
|
|
|
|
.long 0
|
|
|
|
.size .OPENSSL_instrument_bus2_mfspr268,.-.OPENSSL_instrument_bus2_mfspr268
|
2011-04-17 20:46:00 +08:00
|
|
|
___
|
|
|
|
}
|
2007-05-16 04:51:48 +08:00
|
|
|
|
|
|
|
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
|
|
|
print $code;
|
2020-02-17 10:17:53 +08:00
|
|
|
close STDOUT or die "error closing STDOUT: $!";
|