Commit 0e923133 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

x86_64-xlate.pl: refine sign extension logic when handling lea [from HEAD].

PR: 2094,2095
parent 3e719c99
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -241,10 +241,11 @@ my %globals;

	if ($gas) {
	    # Solaris /usr/ccs/bin/as can't handle multiplications
	    # in $self->{label}, new gas requires sign extentions...
	    # in $self->{label}, new gas requires sign extension...
	    use integer;
	    $self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)<<32>>32/egi;
	    $self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/egi;
	    $self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg;
	    $self->{label} =~ s/([0-9]+)/$1<<32>>32/eg;
	    $self->{label} =~ s/^___imp_/__imp__/   if ($flavour eq "mingw64");

	    if (defined($self->{index})) {