Split bignum code out of the sparcv9cap.c
[openssl.git] / crypto / modes / asm / ghash-sparcv9.pl
index 281b5f9a61fef56748f244661cf67b0ef77fc25b..d3fa2a68fe143de1e1bac40e0d266adfd1d0b3bf 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
-# Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2010-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
@@ -53,8 +53,7 @@
 # saturates at ~15.5x single-process result on 8-core processor,
 # or ~20.5GBps per 2.85GHz socket.
 
-$output=pop;
-open STDOUT,">$output";
+$output=pop and open STDOUT,">$output";
 
 $frame="STACK_FRAME";
 $bias="STACK_BIAS";
@@ -81,7 +80,10 @@ $inp="%i2";
 $len="%i3";
 
 $code.=<<___;
-#include "sparc_arch.h"
+#ifndef __ASSEMBLER__
+# define __ASSEMBLER__ 1
+#endif
+#include "crypto/sparc_arch.h"
 
 #ifdef  __arch64__
 .register      %g2,#scratch
@@ -578,4 +580,4 @@ foreach (split("\n",$code)) {
        print $_,"\n";
 }
 
-close STDOUT;
+close STDOUT or die "error closing STDOUT: $!";