perlasm update: implement dataseg directive.
[openssl.git] / crypto / perlasm / x86masm.pl
index 98845fab6583a7dac06a550fc12a70051b1a6ab5..cde38a11a40063303d2bec8761cb6044d5f0af09 100644 (file)
@@ -8,6 +8,7 @@ $::lbdecor="\$L";       # local label decoration
 $nmdecor="_";          # external name decoration
 
 $initseg="";
+$segment="";
 
 sub ::generic
 { my ($opcode,@arg)=@_;
@@ -84,6 +85,7 @@ ELSE
 ENDIF
 ___
     push(@out,$tmp);
+    $segment = ".text\$";
 }
 
 sub ::function_begin_B
@@ -121,7 +123,7 @@ ___
        grep {s/\.[3-7]86/$xmmheader/} @out;
     }
 
-    push(@out,".text\$ ENDS\n");
+    push(@out,"$segment        ENDS\n");
 
     if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out)
     {  my $comm=<<___;
@@ -175,4 +177,7 @@ DD  $f
 ___
 }
 
+sub ::dataseg
+{   push(@out,"$segment\tENDS\n_DATA\tSEGMENT\n"); $segment="_DATA";   }
+
 1;