A local copy of OpenSSL from GitHub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
1.3 KiB

#!/usr/bin/env perl
$output = shift;
$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";
( defined shift || open STDOUT,"| $^X $xlate $output" ) ||
die "can't call $xlate: $!";
if ($output=~/64/) {
} else {
.globl .OPENSSL_cpuid_setup
.align 4
.globl .OPENSSL_wipe_cpu
.align 4
xor r0,r0,r0
mr r3,r1
xor r4,r4,r4
xor r5,r5,r5
xor r6,r6,r6
xor r7,r7,r7
xor r8,r8,r8
xor r9,r9,r9
xor r10,r10,r10
xor r11,r11,r11
xor r12,r12,r12
.globl .OPENSSL_atomic_add
.align 4
Loop: lwarx r5,0,r3
add r0,r4,r5
stwcx. r0,0,r3
bne- Loop
$SIGNX r3,r0
.globl .OPENSSL_rdtsc
.align 4
mftb r3
mftbu r4
.globl .OPENSSL_cleanse
.align 4
$CMPLI r4,7
li r0,0
bge Lot
Little: mtctr r4
stb r0,0(r3)
addi r3,r3,1
bdnz- \$-8
Lot: andi. r5,r3,3
beq Laligned
stb r0,0(r3)
subi r4,r4,1
addi r3,r3,1
b Lot
$SHRLI r5,r4,2
mtctr r5
stw r0,0(r3)
addi r3,r3,4
bdnz- \$-8
andi. r4,r4,3
bne Little
$code =~ s/\`([^\`]*)\`/eval $1/gem;
print $code;
close STDOUT;