x86_64-xlate.pl: new gas requires sign extention in lea instruction
authorAndy Polyakov <appro@openssl.org>
Thu, 7 Jan 2010 11:22:25 +0000 (11:22 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 7 Jan 2010 11:22:25 +0000 (11:22 +0000)
[from HEAD].
PR: 2094,2095

crypto/perlasm/x86_64-xlate.pl

index a4af769b4a64d9cd9eb708c7a478239afba8db86..e702674143ace5a1af8792e67c0c05e803daa2fb 100755 (executable)
@@ -189,7 +189,8 @@ my $current_function;
        if (!$masm) {
            # Solaris /usr/ccs/bin/as can't handle multiplications
            # in $self->{label}
-           $self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/egi;
+           use integer;
+           $self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)<<32>>32/egi;
            $self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg;
 
            if (defined($self->{index})) {