AIX build updates.
[openssl.git] / crypto / ppccpuid.pl
index 50d989e193d887c6a72a3c09e2a5b94ca4b2abaf..fe44ff07bc6040c9841c7837e9a2f3312082508e 100755 (executable)
@@ -1,16 +1,15 @@
 #!/usr/bin/env perl
 
 #!/usr/bin/env perl
 
-$output = shift;
+$flavour = 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";
 
 
 $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: $!";
+open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
 
 
-if ($output=~/64/) {
+if ($flavour=~/64/) {
     $CMPLI="cmpldi";
     $SHRLI="srdi";
     $SIGNX="extsw";
     $CMPLI="cmpldi";
     $SHRLI="srdi";
     $SIGNX="extsw";
@@ -21,6 +20,7 @@ if ($output=~/64/) {
 }
 
 $code=<<___;
 }
 
 $code=<<___;
+.machine       "any"
 .text
 
 .globl .OPENSSL_cpuid_setup
 .text
 
 .globl .OPENSSL_cpuid_setup
@@ -70,7 +70,7 @@ Loop: lwarx   r5,0,r3
 Little:        mtctr   r4
        stb     r0,0(r3)
        addi    r3,r3,1
 Little:        mtctr   r4
        stb     r0,0(r3)
        addi    r3,r3,1
-       bdnz-   .-8
+       bdnz-   \$-8
        blr
 Lot:   andi.   r5,r3,3
        beq     Laligned
        blr
 Lot:   andi.   r5,r3,3
        beq     Laligned
@@ -83,7 +83,7 @@ Laligned:
        mtctr   r5
        stw     r0,0(r3)
        addi    r3,r3,4
        mtctr   r5
        stw     r0,0(r3)
        addi    r3,r3,4
-       bdnz-   .-8
+       bdnz-   \$-8
        andi.   r4,r4,3
        bne     Little
        blr
        andi.   r4,r4,3
        bne     Little
        blr