Latest update
This commit is contained in:
@@ -28,6 +28,13 @@ my $fpu = sub {
|
||||
if ($flavour =~ /linux/) { ".fpu\t".join(',',@_); }
|
||||
else { ""; }
|
||||
};
|
||||
my $rodata = sub {
|
||||
SWITCH: for ($flavour) {
|
||||
/linux/ && return ".section\t.rodata";
|
||||
/ios/ && return ".section\t__TEXT,__const";
|
||||
last;
|
||||
}
|
||||
};
|
||||
my $hidden = sub {
|
||||
if ($flavour =~ /ios/) { ".private_extern\t".join(',',@_); }
|
||||
else { ".hidden\t".join(',',@_); }
|
||||
@@ -96,6 +103,12 @@ my $asciz = sub {
|
||||
{ ""; }
|
||||
};
|
||||
|
||||
my $adrp = sub {
|
||||
my ($args,$comment) = split(m|\s*//|,shift);
|
||||
"\tadrp\t$args\@PAGE";
|
||||
} if ($flavour =~ /ios64/);
|
||||
|
||||
|
||||
sub range {
|
||||
my ($r,$sfx,$start,$end) = @_;
|
||||
|
||||
@@ -125,6 +138,10 @@ sub expand_line {
|
||||
|
||||
$line =~ s/\b(\w+)/$GLOBALS{$1} or $1/ge;
|
||||
|
||||
if ($flavour =~ /ios64/) {
|
||||
$line =~ s/#:lo12:(\w+)/$1\@PAGEOFF/;
|
||||
}
|
||||
|
||||
return $line;
|
||||
}
|
||||
|
||||
|
||||
@@ -541,6 +541,7 @@ my %globals;
|
||||
);
|
||||
|
||||
my ($cfa_reg, $cfa_rsp);
|
||||
my @cfa_stack;
|
||||
|
||||
# [us]leb128 format is variable-length integer representation base
|
||||
# 2^128, with most significant bit of each byte being 0 denoting
|
||||
@@ -648,7 +649,13 @@ my %globals;
|
||||
# why it starts with -8. Recall that CFA is top of caller's
|
||||
# stack...
|
||||
/startproc/ && do { ($cfa_reg, $cfa_rsp) = ("%rsp", -8); last; };
|
||||
/endproc/ && do { ($cfa_reg, $cfa_rsp) = ("%rsp", 0); last; };
|
||||
/endproc/ && do { ($cfa_reg, $cfa_rsp) = ("%rsp", 0);
|
||||
# .cfi_remember_state directives that are not
|
||||
# matched with .cfi_restore_state are
|
||||
# unnecessary.
|
||||
die "unpaired .cfi_remember_state" if (@cfa_stack);
|
||||
last;
|
||||
};
|
||||
/def_cfa_register/
|
||||
&& do { $cfa_reg = $$line; last; };
|
||||
/def_cfa_offset/
|
||||
@@ -688,6 +695,14 @@ my %globals;
|
||||
cfa_expression($$line)));
|
||||
last;
|
||||
};
|
||||
/remember_state/
|
||||
&& do { push @cfa_stack, [$cfa_reg, $cfa_rsp];
|
||||
last;
|
||||
};
|
||||
/restore_state/
|
||||
&& do { ($cfa_reg, $cfa_rsp) = @{pop @cfa_stack};
|
||||
last;
|
||||
};
|
||||
}
|
||||
|
||||
$self->{value} = ".cfi_$dir\t$$line" if ($dir);
|
||||
|
||||
Reference in New Issue
Block a user