]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/perlasm/ppc-xlate.pl
Futher minor PPC assembler update.
[thirdparty/openssl.git] / crypto / perlasm / ppc-xlate.pl
index 7e0f9e96c094e1e52ed7c2b14a0b7e3782da965e..a3b5b0e37bcc9c9fdf43e92e4cf84aa8824f488a 100755 (executable)
@@ -58,8 +58,10 @@ my $text = sub {
 my $machine = sub {
     my $junk = shift;
     my $arch = shift;
-    if ($arch eq "any" and $flavour =~ /osx/)
-    {   $arch = ($flavour =~ /64/) ? "ppc970-64" : "ppc970";   }
+    if ($flavour =~ /osx/)
+    {  $arch =~ s/\"//g;
+       $arch = ($flavour=~/64/) ? "ppc970-64" : "ppc970" if ($arch eq "any");
+    }
     ".machine  $arch";
 };
 
@@ -69,12 +71,10 @@ my $machine = sub {
 my $cmplw = sub {
     my $f = shift;
     my $cr = 0; $cr = shift if ($#_>1);
-    "  cmpl$f  ".join(',',$cr,0,@_);
-};
-my $cmpld = sub {
-    my $f = shift;
-    my $cr = 0; $cr = shift if ($#_>1);
-    "  cmpl$f  ".join(',',$cr,1,@_);
+    # Some out-of-date 32-bit GNU assembler just can't handle cmplw...
+    ($flavour =~ /linux.*32/) ?
+       "       .long   ".sprintf "0x%x",31<<26|$cr<<23|$_[0]<<16|$_[1]<<11|64 :
+       "       cmplw   ".join(',',$cr,@_);
 };
 my $bdnz = sub {
     my $f = shift;