Check for the presence of _WIN32 rather than its value.
[oweals/openssl.git] / crypto / bn / asm / armv4-mont.pl
index 48e523013fe4523d9a9feac649dc6b491f5cdc4f..0dc4fe95e439a3a42450afd99a2b2e1265595c95 100644 (file)
@@ -1,4 +1,11 @@
-#!/usr/bin/env perl
+#! /usr/bin/env perl
+# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (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
+
 
 # ====================================================================
 # Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
@@ -48,8 +55,8 @@
 # Snapdragon S4.
 
 $flavour = shift;
-if ($flavour=~/^\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
-else { while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} }
+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
 
 if ($flavour && $flavour ne "void") {
     $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -91,7 +98,7 @@ $code=<<___;
 #include "arm_arch.h"
 
 .text
-#if defined(__thumb2__) && !defined(__APPLE__)
+#if defined(__thumb2__)
 .syntax        unified
 .thumb
 #else
@@ -121,7 +128,7 @@ bn_mul_mont:
 #ifdef __APPLE__
        ldr     r0,[r0]
 #endif
-       tst     r0,#1                   @ NEON available?
+       tst     r0,#ARMV7_NEON          @ NEON available?
        ldmia   sp, {r0,r2}
        beq     .Lialu
        add     sp,sp,#8