diff options
Diffstat (limited to 'src/lib/libcrypto/perlasm/x86_64-xlate.pl')
-rwxr-xr-x | src/lib/libcrypto/perlasm/x86_64-xlate.pl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl index e47116b74b..d66ad24095 100755 --- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl +++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl | |||
@@ -66,7 +66,7 @@ if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } | |||
66 | my ($outdev,$outino,@junk)=stat($output); | 66 | my ($outdev,$outino,@junk)=stat($output); |
67 | 67 | ||
68 | open STDOUT,">$output" || die "can't open $output: $!" | 68 | open STDOUT,">$output" || die "can't open $output: $!" |
69 | if ($stddev!=$outdev || $stdino!=$outino); | 69 | if (1 || $stddev!=$outdev || $stdino!=$outino); |
70 | } | 70 | } |
71 | 71 | ||
72 | my $gas=1; $gas=0 if ($output =~ /\.asm$/); | 72 | my $gas=1; $gas=0 if ($output =~ /\.asm$/); |
@@ -167,7 +167,7 @@ my %globals; | |||
167 | } elsif ($self->{op} =~ /^(pop|push)f/) { | 167 | } elsif ($self->{op} =~ /^(pop|push)f/) { |
168 | $self->{op} .= $self->{sz}; | 168 | $self->{op} .= $self->{sz}; |
169 | } elsif ($self->{op} eq "call" && $current_segment eq ".CRT\$XCU") { | 169 | } elsif ($self->{op} eq "call" && $current_segment eq ".CRT\$XCU") { |
170 | $self->{op} = "\tDQ"; | 170 | $self->{op} = "ALIGN\t8\n\tDQ"; |
171 | } | 171 | } |
172 | $self->{op}; | 172 | $self->{op}; |
173 | } | 173 | } |
@@ -215,7 +215,8 @@ my %globals; | |||
215 | undef $ret; | 215 | undef $ret; |
216 | 216 | ||
217 | # optional * ---vvv--- appears in indirect jmp/call | 217 | # optional * ---vvv--- appears in indirect jmp/call |
218 | if ($line =~ /^(\*?)([^\(,]*)\(([%\w,]+)\)/) { | 218 | if ($line =~ /^(\*?)([^\(,]*)\(([%\w,]+)\)/ && |
219 | !($line =~ /^PIC_(GOT|PLT)/)) { | ||
219 | $self->{asterisk} = $1; | 220 | $self->{asterisk} = $1; |
220 | $self->{label} = $2; | 221 | $self->{label} = $2; |
221 | ($self->{base},$self->{index},$self->{scale})=split(/,/,$3); | 222 | ($self->{base},$self->{index},$self->{scale})=split(/,/,$3); |
@@ -545,8 +546,6 @@ my %globals; | |||
545 | if ($line=~/\.([px])data/) { | 546 | if ($line=~/\.([px])data/) { |
546 | $v.=" rdata align="; | 547 | $v.=" rdata align="; |
547 | $v.=$1 eq "p"? 4 : 8; | 548 | $v.=$1 eq "p"? 4 : 8; |
548 | } elsif ($line=~/\.CRT\$/i) { | ||
549 | $v.=" rdata align=8"; | ||
550 | } | 549 | } |
551 | } else { | 550 | } else { |
552 | $v="$current_segment\tENDS\n" if ($current_segment); | 551 | $v="$current_segment\tENDS\n" if ($current_segment); |
@@ -554,8 +553,6 @@ my %globals; | |||
554 | if ($line=~/\.([px])data/) { | 553 | if ($line=~/\.([px])data/) { |
555 | $v.=" READONLY"; | 554 | $v.=" READONLY"; |
556 | $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); | 555 | $v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref); |
557 | } elsif ($line=~/\.CRT\$/i) { | ||
558 | $v.=" READONLY DWORD"; | ||
559 | } | 556 | } |
560 | } | 557 | } |
561 | $current_segment = $line; | 558 | $current_segment = $line; |
@@ -625,6 +622,8 @@ my %globals; | |||
625 | } | 622 | } |
626 | } | 623 | } |
627 | 624 | ||
625 | print "#include <machine/asm.h>\n"; | ||
626 | |||
628 | if ($nasm) { | 627 | if ($nasm) { |
629 | print <<___; | 628 | print <<___; |
630 | default rel | 629 | default rel |