diff options
author | Andy Polyakov <appro@openssl.org> | 2007-08-23 12:01:58 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2007-08-23 12:01:58 +0000 |
commit | 55eab3b74b61eef2fe320710ee3675583035d5c5 (patch) | |
tree | 3f768f906f552e74bb56a9d827f11eacee50b1b8 /crypto/perlasm | |
parent | dc0fcb98dffb20f6ee4cd6a8ee588c9f64373a99 (diff) |
Make x86_64 modules work under Win64/x64.
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-x | crypto/perlasm/x86_64-xlate.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 1e1e4b8bf6..19d372556f 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -85,6 +85,8 @@ my $current_function; if ($self->{op} =~ /(movz)b.*/) { # movz is pain... $self->{op} = $1; $self->{sz} = "b"; + } elsif ($self->{op} =~ /call/) { + $self->{sz} = "" } elsif ($self->{op} =~ /([a-z]{3,})([qlwb])/) { $self->{op} = $1; $self->{sz} = $2; @@ -358,7 +360,7 @@ my $current_function; $self->{value} = $v; last; }; - /\.extern/ && do { $self->{value} = "EXTRN\t".$line; last; }; + /\.extern/ && do { $self->{value} = "EXTRN\t".$line.":BYTE"; last; }; /\.globl/ && do { $self->{value} = "PUBLIC\t".$line; last; }; /\.type/ && do { ($sym,$type,$narg) = split(',',$line); if ($type eq "\@function") { @@ -394,8 +396,15 @@ my $current_function; last; }; /\.asciz/ && do { if ($line =~ /^"(.*)"$/) { - $self->{value} = "DB\t" - .join(",",unpack("C*",$1),0); + my @str=unpack("C*",$1); + push @str,0; + while ($#str>15) { + $self->{value}.="DB\t" + .join(",",@str[0..15])."\n"; + foreach (0..15) { shift @str; } + } + $self->{value}.="DB\t" + .join(",",@str) if (@str); } last; }; |