From: Andy Polyakov Date: Wed, 13 Feb 2008 20:01:48 +0000 (+0000) Subject: Allow 32-bit perl to generate x86_64 assembler. X-Git-Tag: OpenSSL_0_9_8h~81 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2923e91a98e9437aa62ad5cd68093f274a80863e;p=oweals%2Fopenssl.git Allow 32-bit perl to generate x86_64 assembler. --- 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};