Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-02-23 22:33:10 +0300
committerAdam Langley <agl@google.com>2015-02-23 22:45:30 +0300
commit6204eba91ed9d1d5b99879592bfdbef0f3d0660b (patch)
tree38909128090e36ba012e7dba4fc2c12b659e4f09 /crypto
parent2b48d6b7dd4318ace7f2b3fa9b34e5c1f27f8869 (diff)
perlasm/x86masm.pl: make it work.
Though this doesn't mean that masm becomes supported, the script is still provided on don't-ask-in-case-of-doubt-use-nasm basis. See RT#3650 for background. (Imported from upstream's 2f8d82d6418c4de8330e2870c1ca6386dc9e1b34) The data_word changes were already fixed with our 3e700bb3e812730f60bec529a14c0d35ea9665aa, but best to avoid diverging there. Change-Id: Iab5455534e8bd632fb2b247ff792d411b105f17a Reviewed-on: https://boringssl-review.googlesource.com/3581 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/perlasm/x86masm.pl15
1 files changed, 6 insertions, 9 deletions
diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
index a491529e..b7f49d1c 100644
--- a/crypto/perlasm/x86masm.pl
+++ b/crypto/perlasm/x86masm.pl
@@ -18,10 +18,10 @@ sub ::generic
if ($opcode =~ /lea/ && @arg[1] =~ s/.*PTR\s+(\(.*\))$/OFFSET $1/) # no []
{ $opcode="mov"; }
- elsif ($opcode !~ /movq/)
+ elsif ($opcode !~ /mov[dq]$/)
{ # 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);
+ $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);
@@ -160,16 +160,13 @@ sub ::public_label
{ push(@out,"PUBLIC\t".&::LABEL($_[0],$nmdecor.$_[0])."\n"); }
sub ::data_byte
-{ push(@out,("DB\t").join(',',@_)."\n"); }
+{ push(@out,("DB\t").join(',',splice(@_,0,16))."\n") while(@_); }
sub ::data_short
-{ push(@out,("DW\t").join(',',@_)."\n"); }
+{ push(@out,("DW\t").join(',',splice(@_,0,8))."\n") while(@_); }
sub ::data_word
-{ # MASM can't handle long lines, so emit one word at a time.
- foreach(@_)
- { push(@out,"DD\t$_\n"); }
-}
+{ push(@out,("DD\t").join(',',splice(@_,0,4))."\n") while(@_); }
sub ::align
{ push(@out,"ALIGN\t$_[0]\n"); }