x86 perlasm update to accomodate aes-586.pl.
authorAndy Polyakov <appro@openssl.org>
Thu, 23 Dec 2004 21:43:25 +0000 (21:43 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 23 Dec 2004 21:43:25 +0000 (21:43 +0000)
crypto/perlasm/x86ms.pl
crypto/perlasm/x86nasm.pl
crypto/perlasm/x86unix.pl

index 4f4a6fea9d5dc526a63d58df19cb76a0571e2ff4..8f77fed81efeee1bee9f2e5fe03babadce7bad68 100644 (file)
@@ -92,7 +92,7 @@ sub get_mem
                $reg2=&conv($1);
                $addr="_$2";
                }
-       elsif ($addr =~ /^[_a-zA-Z]/)
+       elsif ($addr =~ /^[_a-zA-Z]$/)
                {
                $addr="_$addr";
                }
@@ -368,6 +368,12 @@ sub main'comment
                }
        }
 
+sub main'public_label
+       {
+       $label{$_[0]}="_$_[0]"  if (!defined($label{$_[0]}));
+       push(@out,"PUBLIC\t$label{$_[0]}\n");
+       }
+
 sub main'label
        {
        if (!defined($label{$_[0]}))
@@ -385,10 +391,18 @@ sub main'set_label
                $label{$_[0]}="\$${label}${_[0]}";
                $label++;
                }
+       if ($_[1]!=0 && $_[1]>1)
+               {
+               main'align($_[1]);
+               }
        if((defined $_[2]) && ($_[2] == 1))
                {
                push(@out,"$label{$_[0]}::\n");
                }
+       elsif ($label{$_[0]} !~ /^\$/)
+               {
+               push(@out,"$label{$_[0]}\tLABEL PTR\n");
+               }
        else
                {
                push(@out,"$label{$_[0]}:\n");
index 965bff1bd3b38c17a8631e877b16376d091186e6..1b6e94c17ec321332c5c1708bb0900c014899021 100644 (file)
@@ -106,7 +106,7 @@ sub get_mem
                $reg2=&conv($1);
                $addr="$under$2";
                }
-       elsif ($addr =~ /^[_a-zA-Z]/)
+       elsif ($addr =~ /^[_a-zA-Z]$/)
                {
                $addr="$under$addr";
                }
@@ -360,6 +360,12 @@ sub main'comment
                }
        }
 
+sub main'public_label
+       {
+       $label{$_[0]}="${under}${_[0]}" if (!defined($label{$_[0]}));
+       push(@out,"global\t$label{$_[0]}\n");
+       }
+
 sub main'label
        {
        if (!defined($label{$_[0]}))
@@ -377,6 +383,10 @@ sub main'set_label
                $label{$_[0]}="\@${label}${_[0]}";
                $label++;
                }
+       if ($_[1]!=0 && $_[1]>1)
+               {
+               main'align($_[1]);
+               }
        push(@out,"$label{$_[0]}:\n");
        }
 
index cdfd740154d079f2a32f83e4eb0f94867d4f3f39..59c4fbc0837ce3c698f8b099d8604c7e2f6ead87 100644 (file)
@@ -498,6 +498,12 @@ sub main'comment
                }
        }
 
+sub main'public_label
+       {
+       $label{$_[0]}="${under}${_[0]}" if (!defined($label{$_[0]}));
+       push(@out,".globl\t$label{$_[0]}\n");
+       }
+
 sub main'label
        {
        if (!defined($label{$_[0]}))