Proper solution to nasm compilation problems in Borland context.
[openssl.git] / crypto / perlasm / x86nasm.pl
index b897ed0fda79d00b71ef1738feb64b72e6717baa..331f18bb2202477fe03a76d6ce5439dfc53c0298 100644 (file)
@@ -194,6 +194,7 @@ sub main'rdtsc      { &out0("rdtsc"); }
 sub main'halt  { &out0("hlt"); }
 sub main'movz  { &out2("movzx",@_); }
 sub main'neg   { &out1("neg",@_); }
+sub main'cld   { &out0("cld"); }
 
 # SSE2
 sub main'emms  { &out0("emms"); }
@@ -261,8 +262,17 @@ sub using486
 
 sub main'file
        {
-       push(@out,".") if ($main'mwerks);
-       push(@out,"section\t.text\n");
+       if ($main'mwerks)       { push(@out,".section\t.text\n"); }
+       else    {
+               local $tmp=<<___;
+%ifdef __omf__
+section        code    use32 class=code
+%else
+section        .text
+%endif
+___
+               push(@out,$tmp);
+               }
        }
 
 sub main'function_begin