From 1980bc91fe814fef1dabdbbecd805c859ecaa764 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Wed, 13 Feb 2008 20:03:01 +0000 Subject: [PATCH] Allow 32-bit perl to generate x86_64 assembler [from -stable]. --- crypto/perlasm/x86_64-xlate.pl | 8 ++++++-- 1 file 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}; -- 2.25.1