diff options
author | Andy Polyakov <appro@openssl.org> | 2008-02-13 20:03:01 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-02-13 20:03:01 +0000 |
commit | 1980bc91fe814fef1dabdbbecd805c859ecaa764 (patch) | |
tree | 5879a8e1ca3500bf6e240a7d8de2111c61eb55f4 | |
parent | 8b7745571fe856ab3a3f4dda82b32eb27f788b28 (diff) | |
download | openssl-new-1980bc91fe814fef1dabdbbecd805c859ecaa764.tar.gz |
Allow 32-bit perl to generate x86_64 assembler [from -stable].
-rwxr-xr-x | crypto/perlasm/x86_64-xlate.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index fd0295185a..a4af769b4a 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -390,11 +390,15 @@ my $current_function; && do { my @arr = split(',',$line); my $sz = substr($1,0,1); my $last = pop(@arr); + my $conv = sub { my $var=shift; + if ($var=~s/0x([0-9a-f]+)/0$1h/i) { $var; } + else { sprintf"0%Xh",$var; } + }; $sz =~ tr/bvlq/BWDQ/; $self->{value} = "\tD$sz\t"; - for (@arr) { $self->{value} .= sprintf"0%Xh,",oct; } - $self->{value} .= sprintf"0%Xh",oct($last); + for (@arr) { $self->{value} .= &$conv($_).","; } + $self->{value} .= &$conv($last); last; }; /\.picmeup/ && do { $self->{value} = sprintf"\tDD\t 0%Xh,090000000h",$opcode{$line}; |