X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fperlasm%2Fx86masm.pl;h=4eca7bc367f04ad22a286d90afc93430b7101a29;hp=98845fab6583a7dac06a550fc12a70051b1a6ab5;hb=4db4882402a79345a075c62a87f2fb7cfe89e283;hpb=e4662fdb620d8c4d321a1fd67776ce8bab12b95a diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl index 98845fab65..4eca7bc367 100644 --- a/crypto/perlasm/x86masm.pl +++ b/crypto/perlasm/x86masm.pl @@ -8,13 +8,13 @@ $::lbdecor="\$L"; # local label decoration $nmdecor="_"; # external name decoration $initseg=""; +$segment=""; sub ::generic { my ($opcode,@arg)=@_; # fix hexadecimal constants - $arg[0] =~ s/0x([0-9a-f]+)/0$1h/oi if (defined($arg[0])); - $arg[1] =~ s/0x([0-9a-f]+)/0$1h/oi if (defined($arg[1])); + for (@arg) { s/0x([0-9a-f]+)/0$1h/oi; } # fix xmm references $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i); @@ -84,6 +84,7 @@ ELSE ENDIF ___ push(@out,$tmp); + $segment = ".text\$"; } sub ::function_begin_B @@ -121,7 +122,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 +176,7 @@ DD $f ___ } +sub ::dataseg +{ push(@out,"$segment\tENDS\n_DATA\tSEGMENT\n"); $segment="_DATA"; } + 1;