aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/perlasm/x86masm.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-01-03 16:21:06 +0000
committerAndy Polyakov <appro@openssl.org>2008-01-03 16:21:06 +0000
commit3a87756fed55879c5aaab0546654d30e434ff7dc (patch)
tree79464765e4df456631e5e6f63c5c023194069418 /crypto/perlasm/x86masm.pl
parentc8ec4a1b0b4ceae16c17168519bbf11ae8fe0b6f (diff)
downloadopenssl-3a87756fed55879c5aaab0546654d30e434ff7dc.tar.gz
perlasm/x86*.pl updates.
Diffstat (limited to 'crypto/perlasm/x86masm.pl')
-rw-r--r--crypto/perlasm/x86masm.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
index 7a0f4aa5bb..33ceeb5ab4 100644
--- a/crypto/perlasm/x86masm.pl
+++ b/crypto/perlasm/x86masm.pl
@@ -16,6 +16,10 @@ sub ::generic
$arg[0] =~ s/0x([0-9a-f]+)/0$1h/oi if (defined($arg[0]));
$arg[1] =~ s/0x([0-9a-f]+)/0$1h/oi if (defined($arg[1]));
+ # fix xmm references
+ $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i);
+ $arg[1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
+
&::emit($opcode,@arg);
1;
}
@@ -132,7 +136,9 @@ sub ::comment { foreach (@_) { push(@out,"\t; $_\n"); } }
{ my $l=shift; push(@out,$l.($l=~/^\Q${::lbdecor}\E[0-9]{3}/?":\n":"::\n")); };
sub ::external_label
-{ push(@out, "EXTERN\t".&::LABEL($_[0],$nmdecor.$_[0]).":NEAR\n"); }
+{ foreach(@_)
+ { push(@out, "EXTERN\t".&::LABEL($_,$nmdecor.$_).":NEAR\n"); }
+}
sub ::public_label
{ push(@out,"PUBLIC\t".&::LABEL($_[0],$nmdecor.$_[0])."\n"); }
@@ -155,7 +161,7 @@ sub ::initseg
{ my $f=$nmdecor.shift;
$initseg.=<<___;
-.CRT\$XCU SEGMENT DWORD PUBLIC DATA
+.CRT\$XCU SEGMENT DWORD PUBLIC 'DATA'
EXTERN $f:NEAR
DD $f
.CRT\$XCU ENDS