Following the license change, modify the boilerplates in crypto/perlasm/
[openssl.git] / crypto / perlasm / arm-xlate.pl
index 81ceb3142ce377eb7ea77376a170ca899de6415d..d78a8baac1282710e65d0c8dfd15726c1a5577c9 100755 (executable)
@@ -1,6 +1,12 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2015-2016 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
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
 
-# ARM assembler distiller by <appro>.
+use strict;
 
 my $flavour = shift;
 my $output = shift;
@@ -66,6 +72,12 @@ my $extern = sub {
 };
 my $type = sub {
     if ($flavour =~ /linux/)   { ".type\t".join(',',@_); }
+    elsif ($flavour =~ /ios32/)        { if (join(',',@_) =~ /(\w+),%function/) {
+                                       "#ifdef __thumb2__\n".
+                                       ".thumb_func    $1\n".
+                                       "#endif";
+                                 }
+                               }
     else                       { ""; }
 };
 my $size = sub {
@@ -116,7 +128,7 @@ sub expand_line {
     return $line;
 }
 
-while($line=<>) {
+while(my $line=<>) {
 
     if ($line =~ m/^\s*(#|@|\/\/)/)    { print $line; next; }