Resolve "operation size not specified" in NASM modules.
authorAndy Polyakov <appro@openssl.org>
Sat, 26 Mar 2005 19:32:31 +0000 (19:32 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 26 Mar 2005 19:32:31 +0000 (19:32 +0000)
crypto/perlasm/x86nasm.pl

index 502f155dd1f5a0756427388cba2a2310b781135a..5009acb4b315566a7ca187be718a30959d9949b4 100644 (file)
@@ -86,7 +86,7 @@ sub get_mem
        {
        my($size,$addr,$reg1,$reg2,$idx)=@_;
        my($t,$post);
-       my($ret)="[";
+       my($ret)="$size [";
        $addr =~ s/^\s+//;
        if ($addr =~ /^(.+)\+(.+)$/)
                {
@@ -177,6 +177,11 @@ sub out2
        my($l,$t);
 
        push(@out,"\t$name\t");
+       if ($name eq "lea")
+               {
+               $p1 =~ s/^[^\[]*\[/\[/;
+               $p2 =~ s/^[^\[]*\[/\[/;
+               }
        $t=&conv($p1).",";
        $l=length($t);
        push(@out,$t);