Following the license change, modify the boilerplates in crypto/perlasm/
[openssl.git] / crypto / perlasm / x86asm.pl
index dcbc73851603fe53f57516cfec2a87de52b07f30..be462cec6eefa1b6df1a8b8007803318ef27aad3 100644 (file)
@@ -1,7 +1,14 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 1995-2018 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
+
 
 # require 'x86asm.pl';
-# &asm_init(<flavor>,"des-586.pl"[,$i386only]);
+# &asm_init(<flavor>[,$i386only]);
 # &function_begin("foo");
 # ...
 # &function_end("foo");
@@ -165,6 +172,11 @@ sub ::vprotd
     {  &::generic("vprotd",@_);        }
 }
 
+sub ::endbranch
+{
+    &::data_byte(0xf3,0x0f,0x1e,0xfb);
+}
+
 # label management
 $lbdecor="L";          # local label decoration, set by package
 $label="000";
@@ -247,24 +259,21 @@ sub ::asm_finish
 }
 
 sub ::asm_init
-{ my ($type,$fn,$cpu)=@_;
+{ my ($type,$cpu)=@_;
 
-    $filename=$fn;
     $i386=$cpu;
 
-    $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$android=0;
+    $elf=$cpp=$coff=$aout=$macosx=$win32=$mwerks=$android=0;
     if    (($type eq "elf"))
     {  $elf=1;                 require "x86gas.pl";    }
+    elsif (($type eq "elf-1"))
+    {  $elf=-1;                require "x86gas.pl";    }
     elsif (($type eq "a\.out"))
     {  $aout=1;                require "x86gas.pl";    }
     elsif (($type eq "coff" or $type eq "gaswin"))
     {  $coff=1;                require "x86gas.pl";    }
     elsif (($type eq "win32n"))
     {  $win32=1;               require "x86nasm.pl";   }
-    elsif (($type eq "nw-nasm"))
-    {  $netware=1;             require "x86nasm.pl";   }
-    #elsif (($type eq "nw-mwasm"))
-    #{ $netware=1; $mwerks=1;  require "x86nasm.pl";   }
     elsif (($type eq "win32"))
     {  $win32=1;               require "x86masm.pl";   }
     elsif (($type eq "macosx"))
@@ -278,7 +287,6 @@ Pick one target type from
        a.out   - DJGPP, elder OpenBSD, etc.
        coff    - GAS/COFF such as Win32 targets
        win32n  - Windows 95/Windows NT NASM format
-       nw-nasm - NetWare NASM format
        macosx  - Mac OS X
 EOF
        exit(1);
@@ -287,8 +295,7 @@ EOF
     $pic=0;
     for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); }
 
-    $filename =~ s/\.pl$//;
-    &file($filename);
+    &file();
 }
 
 sub ::hidden {}