vpaes-x86.pl: revert previous commit and solve the problem through x86masm.pl.
[openssl.git] / crypto / perlasm / x86masm.pl
index ee446de5c1d036544a5a543a66367a03a2717413..328ca2e23fd6012a549618260d8c2d606c066036 100644 (file)
@@ -16,7 +16,9 @@ sub ::generic
     # fix hexadecimal constants
     for (@arg) { s/(?<![\w\$\.])0x([0-9a-f]+)/0$1h/oi; }
 
-    if ($opcode !~ /movq/)
+    if ($opcode =~ /lea/ && @arg[1] =~ s/.*PTR\s+([^\[]+)$/$1/)        # no []
+    {  $opcode="mov";  }
+    elsif ($opcode !~ /movq/)
     {  # 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);