perlasm/x86_64-xlate.pl: recognize even offset(%reg) in cfa_expression.

This is handy when "offset(%reg)" is a perl variable.

(Imported from upstream's 1cb35b47db8462f5653803501ed68d33b10c249f.)

Change-Id: I2f03907a7741371a71045f98318e0ab9396a8fc7
Reviewed-on: https://boringssl-review.googlesource.com/13906
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
David Benjamin 2017-02-16 17:12:46 -05:00 committed by Steven Valdez
parent f3cc7a3366
commit 98f5dc30ba

View File

@ -605,6 +605,8 @@ my %globals;
foreach my $token (split(/,\s*/,$line)) {
if ($token =~ /^%r/) {
push @ret,reg($token);
} elsif ($token =~ /((?:0x)?[0-9a-f]+)\((%r\w+)\)/) {
push @ret,reg("$2+$1");
} elsif ($token =~ /(\w+):(\-?(?:0x)?[0-9a-f]+)(U?)/i) {
my $i = 1*eval($2);
push @ret,$DW_OP_complex{$1}, ($3 ? uleb128($i) : sleb128($i));