Update copyright year
[oweals/openssl.git] / crypto / perlasm / arm-xlate.pl
index d78a8baac1282710e65d0c8dfd15726c1a5577c9..f0e495d4269b985c8a715f0ae864accbb47123d6 100755 (executable)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
-# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
 #
 # Licensed under the Apache License 2.0 (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
@@ -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;
 }
 
@@ -174,4 +191,4 @@ while(my $line=<>) {
     print "\n";
 }
 
-close STDOUT;
+close STDOUT or die "error closing STDOUT: $!";