Commit fc925f3b authored by Andy Polyakov's avatar Andy Polyakov
Browse files

perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.



Perl, multiple versions, for some reason occasionally takes issue with
letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3385)

(cherry picked from commit c47aea8a)
parent 46824b30
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -217,8 +217,9 @@ my %globals;
	    }
	    sprintf "\$%s",$self->{value};
	} else {
	    $self->{value} =~ s/0x([0-9a-f]+)/0$1h/ig if ($masm);
	    sprintf "%s",$self->{value};
	    my $value = $self->{value};
	    $value =~ s/0x([0-9a-f]+)/0$1h/ig if ($masm);
	    sprintf "%s",$value;
	}
    }
}