Make it possible for older masm to compile sse2 modules.
authorAndy Polyakov <appro@openssl.org>
Sun, 21 Oct 2007 14:15:40 +0000 (14:15 +0000)
committerAndy Polyakov <appro@openssl.org>
Sun, 21 Oct 2007 14:15:40 +0000 (14:15 +0000)
PR: 1592

crypto/perlasm/x86ms.pl

index 4badd1fc1c22ed87079ada4c59d06d62092f907b..ebf38adb1a565197fe63d0898cc733b16c2be5f0 100644 (file)
@@ -339,8 +339,17 @@ EOF
 sub main'file_end
        {
        # try to detect if SSE2 or MMX extensions were used...
-       if (grep {/\b[x]?mm[0-7]\b,/i} @out) {
-               grep {s/\.[3-7]86/\.686\n\t\.XMM/} @out;
+       my $xmmheader=<<___;
+.686
+.XMM
+IF \@Version LT 800
+XMMWORD STRUCT 16
+       DQ  2 dup (?)
+XMMWORD ENDS
+ENDIF
+___
+       if (grep {/\b[x]?mm[0-7]\b/i} @out) {
+               grep {s/\.[3-7]86/$xmmheader/} @out;
                }
        push(@out,"_TEXT\$      ENDS\n");
        push(@out,"END\n");