summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-02-11 13:04:39 +0000
committerAndy Polyakov <appro@openssl.org>2008-02-11 13:04:39 +0000
commit8ab9025e316706c0c253dd61fc0f56857f4d24d0 (patch)
tree541b6067e2a5bb3d7e8925ffe4cc05d4956248e8 /crypto/perlasm
parent9e5df8e44849d0113e3b5530478dcaeac401fc64 (diff)
Ad-hockery for Platform SDK ml64.
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-xcrypto/perlasm/x86_64-xlate.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
index 14b6e35b85..fd0295185a 100755
--- a/crypto/perlasm/x86_64-xlate.pl
+++ b/crypto/perlasm/x86_64-xlate.pl
@@ -65,7 +65,10 @@ my $output = shift;
if ($stddev!=$outdev || $stdino!=$outino);
}
-my $masm=1 if ($output =~ /\.asm/);
+my $masmref=8 + 50727*2**-32; # 8.00.50727 shipped with VS2005
+my $masm=$masmref if ($output =~ /\.asm/);
+if ($masm && `ml64 2>&1` =~ m/Version ([0-9]+)\.([0-9]+)(\.([0-9]+))?/)
+{ $masm=$1 + $2*2**-16 + $4*2**-32; }
my $current_segment;
my $current_function;
@@ -356,7 +359,9 @@ my $current_function;
$v="$current_segment\tENDS\n" if ($current_segment);
$current_segment = "_$1\$";
$current_segment =~ tr/[a-z]/[A-Z]/;
- $v.="$current_segment\tSEGMENT ALIGN(64) 'CODE'";
+ $v.="$current_segment\tSEGMENT ";
+ $v.=$masm>=$masmref ? "ALIGN(64)" : "PAGE";
+ $v.=" 'CODE'";
$self->{value} = $v;
last;
};