From 67d990904ea0ddc54ac5794f658effd98e8f0b15 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Thu, 4 May 2006 21:30:41 +0000 Subject: [PATCH] Futher minor PPC assembler update. --- crypto/bn/asm/ppc-mont.pl | 2 +- crypto/perlasm/ppc-xlate.pl | 16 ++++++++-------- crypto/sha/asm/sha1-ppc.pl | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crypto/bn/asm/ppc-mont.pl b/crypto/bn/asm/ppc-mont.pl index e9149c98cf..c345c1b30e 100644 --- a/crypto/bn/asm/ppc-mont.pl +++ b/crypto/bn/asm/ppc-mont.pl @@ -98,7 +98,7 @@ $nlo="r25"; $nhi="r0"; $code=<<___; -.machine any +.machine "any" .text .globl .bn_mul_mont diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl index 7e0f9e96c0..a3b5b0e37b 100755 --- a/crypto/perlasm/ppc-xlate.pl +++ b/crypto/perlasm/ppc-xlate.pl @@ -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; diff --git a/crypto/sha/asm/sha1-ppc.pl b/crypto/sha/asm/sha1-ppc.pl index c1bf1f4872..3aa9655a82 100755 --- a/crypto/sha/asm/sha1-ppc.pl +++ b/crypto/sha/asm/sha1-ppc.pl @@ -149,7 +149,7 @@ ___ } $code=<<___; -.machine any +.machine "any" .text .globl .sha1_block_asm_data_order -- 2.25.1