Relax ISA detection.
authorAndy Polyakov <appro@openssl.org>
Thu, 19 Jul 2007 10:45:03 +0000 (10:45 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 19 Jul 2007 10:45:03 +0000 (10:45 +0000)
crypto/perlasm/x86ms.pl

index cdaa337bbf585c9b69e9f29592f3f19c62ee1fe5..4badd1fc1c22ed87079ada4c59d06d62092f907b 100644 (file)
@@ -213,7 +213,7 @@ sub out2
        $l=4-($l+9)/8;
        $line.="\t" x $l;
        $line.=&conv($p2);
-       if ($line=~/\bxmm[0-7]\b/i) { $line=~s/\b[A-Z]+WORD PTR/XMMWORD PTR/i; }
+       if ($line=~/\bxmm[0-7]\b/i) { $line=~s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i; }
        push(@out,$line."\n");
        }
 
@@ -339,12 +339,9 @@ EOF
 sub main'file_end
        {
        # try to detect if SSE2 or MMX extensions were used...
-       if (grep {/xmm[0-7]\s*,/i} @out) {
+       if (grep {/\b[x]?mm[0-7]\b,/i} @out) {
                grep {s/\.[3-7]86/\.686\n\t\.XMM/} @out;
                }
-       elsif (grep {/mm[0-7]\s*,/i} @out) {
-               grep {s/\.[3-7]86/\.686\n\t\.MMX/} @out;
-               }
        push(@out,"_TEXT\$      ENDS\n");
        push(@out,"END\n");
        }