perlasm update: implement dataseg directive.
This commit is contained in:
parent
9b634c9b37
commit
b94551e823
crypto/perlasm
@ -124,7 +124,7 @@ sub ::function_begin_B
|
|||||||
|
|
||||||
push(@out,".globl\t$func\n") if ($global);
|
push(@out,".globl\t$func\n") if ($global);
|
||||||
if ($::coff)
|
if ($::coff)
|
||||||
{ push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
|
{ push(@out,".def\t$func;\t.scl\t".(3-$global).";\t.type\t32;\t.endef\n"); }
|
||||||
elsif (($::aout and !$::pic) or $::macosx)
|
elsif (($::aout and !$::pic) or $::macosx)
|
||||||
{ }
|
{ }
|
||||||
else
|
else
|
||||||
@ -258,4 +258,7 @@ ___
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub ::dataseg
|
||||||
|
{ push(@out,".data\n"); }
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -8,6 +8,7 @@ $::lbdecor="\$L"; # local label decoration
|
|||||||
$nmdecor="_"; # external name decoration
|
$nmdecor="_"; # external name decoration
|
||||||
|
|
||||||
$initseg="";
|
$initseg="";
|
||||||
|
$segment="";
|
||||||
|
|
||||||
sub ::generic
|
sub ::generic
|
||||||
{ my ($opcode,@arg)=@_;
|
{ my ($opcode,@arg)=@_;
|
||||||
@ -84,6 +85,7 @@ ELSE
|
|||||||
ENDIF
|
ENDIF
|
||||||
___
|
___
|
||||||
push(@out,$tmp);
|
push(@out,$tmp);
|
||||||
|
$segment = ".text\$";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub ::function_begin_B
|
sub ::function_begin_B
|
||||||
@ -121,7 +123,7 @@ ___
|
|||||||
grep {s/\.[3-7]86/$xmmheader/} @out;
|
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)
|
if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out)
|
||||||
{ my $comm=<<___;
|
{ my $comm=<<___;
|
||||||
@ -175,4 +177,7 @@ DD $f
|
|||||||
___
|
___
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub ::dataseg
|
||||||
|
{ push(@out,"$segment\tENDS\n_DATA\tSEGMENT\n"); $segment="_DATA"; }
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -158,4 +158,9 @@ ___
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub ::dataseg
|
||||||
|
{ if ($mwerks) { push(@out,".section\t.data,4\n"); }
|
||||||
|
else { push(@out,"section\t.data align=4\n"); }
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user