The branch master has been updated
       via  38c5674dda8333288aa5d57ccd046203803aa81f (commit)
       via  d405aa2ff265965c71ce7331cf0e49d634a06924 (commit)
       via  6ca3e6e779635ac54d51efb3483b7616abfdf477 (commit)
      from  f0d484fcd4d2119a31a2272c4a9b1752e0011cd7 (commit)


- Log -----------------------------------------------------------------
commit 38c5674dda8333288aa5d57ccd046203803aa81f
Author: Andy Polyakov <[email protected]>
Date:   Tue Apr 19 20:41:18 2016 +0200

    Configuration: add unsupported masm target.
    
    Reviewed-by: Richard Levitte <[email protected]>

commit d405aa2ff265965c71ce7331cf0e49d634a06924
Author: Andy Polyakov <[email protected]>
Date:   Mon Apr 18 13:27:01 2016 +0200

    perlasm/x86_64-xlate.pl: make latest ml64 work.
    
    Reviewed-by: Richard Levitte <[email protected]>

commit 6ca3e6e779635ac54d51efb3483b7616abfdf477
Author: Andy Polyakov <[email protected]>
Date:   Mon Apr 18 10:45:25 2016 +0200

    poly1305/asm/poly1305-x86_64.pl: not all assemblers manage << in constants.
    
    Reviewed-by: Richard Levitte <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 Configurations/50-masm.conf            | 17 +++++++++++++++++
 crypto/perlasm/x86_64-xlate.pl         |  7 +++++--
 crypto/poly1305/asm/poly1305-x86_64.pl | 10 +++++-----
 3 files changed, 27 insertions(+), 7 deletions(-)
 create mode 100644 Configurations/50-masm.conf

diff --git a/Configurations/50-masm.conf b/Configurations/50-masm.conf
new file mode 100644
index 0000000..8dbaa76
--- /dev/null
+++ b/Configurations/50-masm.conf
@@ -0,0 +1,17 @@
+# We can't make commitment to supporting Microsoft assembler,
+# because it would mean supporting all masm versions. This in
+# in turn is because masm is not really an interchangeable option,
+# while users tend to have reasons to stick with specific Visual
+# Studio versions. It's usually lesser hassle to make it work
+# with latest assembler, but tweaking for older versions had
+# proven to be daunting task. This is experimental target, for
+# production builds stick with [up-to-date version of] nasm.
+
+%targets = (
+    "VC-WIN64A-masm" => {
+        inherit_from    => [ "VC-WIN64A" ],
+        as              => "ml64",
+        asflags         => "/c /Cp /Cx /Zi",
+        asoutflags      => "/Fo",
+    },
+);
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
index 80ab17f..6682132 100755
--- a/crypto/perlasm/x86_64-xlate.pl
+++ b/crypto/perlasm/x86_64-xlate.pl
@@ -286,7 +286,7 @@ my %globals;
            (opcode->mnemonic() =~ /^v?mov([qd])$/)             && ($sz=$1)  ||
            (opcode->mnemonic() =~ /^v?pinsr([qdwb])$/)         && ($sz=$1)  ||
            (opcode->mnemonic() =~ /^vpbroadcast([qdwb])$/)     && ($sz=$1)  ||
-           (opcode->mnemonic() =~ /^vinsert[fi]128$/)          && ($sz="x");
+           (opcode->mnemonic() =~ /^v(?!perm)[a-z]+[fi]128$/)  && ($sz="x");
 
            if (defined($self->{index})) {
                sprintf "%s[%s%s*%d%s]",$szmap{$sz},
@@ -607,7 +607,10 @@ my %globals;
                                    }
                                    last;
                                  };
-               /\.align/   && do { $self->{value} = "ALIGN\t".$line; last; };
+               /\.align/   && do { my $max = ($masm && $masm>=$masmref) ? 256 
: 4096;
+                                   $self->{value} = 
"ALIGN\t".($line>$max?$max:$line);
+                                   last;
+                                 };
                /\.(value|long|rva|quad)/
                            && do { my $sz  = substr($1,0,1);
                                    my @arr = split(/,\s*/,$line);
diff --git a/crypto/poly1305/asm/poly1305-x86_64.pl 
b/crypto/poly1305/asm/poly1305-x86_64.pl
index 7d67611..e2a38ec 100755
--- a/crypto/poly1305/asm/poly1305-x86_64.pl
+++ b/crypto/poly1305/asm/poly1305-x86_64.pl
@@ -495,10 +495,10 @@ poly1305_blocks_avx:
 
        ################################# base 2^26 -> base 2^64
        mov     $d1#d,$h0#d
-       and     \$-1<<31,$d1
+       and     \$`-1<<31`,$d1
        mov     $d2,$r1                 # borrow $r1
        mov     $d2#d,$h1#d
-       and     \$-1<<31,$d2
+       and     \$`-1<<31`,$d2
 
        shr     \$6,$d1
        shl     \$52,$r1
@@ -1383,10 +1383,10 @@ poly1305_blocks_avx2:
 
        ################################# base 2^26 -> base 2^64
        mov     $d1#d,$h0#d
-       and     \$-1<<31,$d1
+       and     \$`-1<<31`,$d1
        mov     $d2,$r1                 # borrow $r1
        mov     $d2#d,$h1#d
-       and     \$-1<<31,$d2
+       and     \$`-1<<31`,$d2
 
        shr     \$6,$d1
        shl     \$52,$r1
@@ -1991,7 +1991,7 @@ $code.=<<___;
 .Lmask24:
 .long  0x0ffffff,0,0x0ffffff,0,0x0ffffff,0,0x0ffffff,0
 .L129:
-.long  1<<24,0,1<<24,0,1<<24,0,1<<24,0
+.long  `1<<24`,0,`1<<24`,0,`1<<24`,0,`1<<24`,0
 .Lmask26:
 .long  0x3ffffff,0,0x3ffffff,0,0x3ffffff,0,0x3ffffff,0
 .Lfive:
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to