Bug 993569 - Update Mozilla 31 to use NSS 3.16.1 Beta 3. The main change
authorWan-Teh Chang <wtc@google.com>
Sun, 27 Apr 2014 20:39:24 -0700
changeset 199003 d9a6a378349a840f72466549292c7dbf43b228bf
parent 199002 08c2d710f13d693b0fad5afab3070ffdca78f02e
child 199004 7eba5b89f831b0205ad16c018ecc383c50b6a41d
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs993569
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 993569 - Update Mozilla 31 to use NSS 3.16.1 Beta 3. The main change is https://hg.mozilla.org/projects/nss/rev/7e8485a5ed49.
security/nss/TAG-INFO
security/nss/coreconf/coreconf.dep
security/nss/lib/freebl/Makefile
security/nss/lib/freebl/blapi.h
security/nss/lib/freebl/blapii.h
security/nss/lib/freebl/blapit.h
security/nss/lib/freebl/rijndael.c
security/nss/lib/util/secdig.h
security/nss/lib/util/secdigt.h
--- a/security/nss/TAG-INFO
+++ b/security/nss/TAG-INFO
@@ -1,1 +1,1 @@
-NSS_3_16_1_BETA2
+NSS_3_16_1_BETA3
--- a/security/nss/coreconf/coreconf.dep
+++ b/security/nss/coreconf/coreconf.dep
@@ -5,8 +5,9 @@
 
 /*
  * A dummy header file that is a dependency for all the object files.
  * Used to force a full recompilation of NSS in Mozilla's Tinderbox
  * depend builds.  See comments in rules.mk.
  */
 
 #error "Do not include this header file."
+
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -130,19 +130,19 @@ ifdef NS_USE_GCC
 else
 # MSVC
     MPI_SRCS += mpi_x86_asm.c
     DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE 
     DEFINES += -DMP_ASSEMBLY_DIV_2DX1D -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
     ifdef BUILD_OPT
 	OPTIMIZER += -Ox  # maximum optimization for freebl
     endif
-    # The Intel AES assembly code requires Visual C++ 2010 (10.0). The _xgetbv
-    # compiler intrinsic function requires Visual C++ 2010 (10.0) SP1.
-    ifeq ($(_MSC_VER_GE_10SP1),1)
+    # The Intel AES assembly code requires Visual C++ 2010.
+    # if $(_MSC_VER) >= 1600 (Visual C++ 2010)
+    ifeq ($(firstword $(sort $(_MSC_VER) 1600)),1600)
 	DEFINES += -DUSE_HW_AES -DINTEL_GCM
 	ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
 	EXTRA_SRCS += intel-gcm-wrap.c
     endif
 endif
 else
     # -DMP_NO_MP_WORD
     DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
--- a/security/nss/lib/freebl/blapi.h
+++ b/security/nss/lib/freebl/blapi.h
@@ -1,10 +1,10 @@
 /*
- * blapi.h - public prototypes for the crypto library
+ * blapi.h - public prototypes for the freebl library
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _BLAPI_H_
 #define _BLAPI_H_
 
--- a/security/nss/lib/freebl/blapii.h
+++ b/security/nss/lib/freebl/blapii.h
@@ -1,10 +1,10 @@
 /*
- * blapii.h - private data structures and prototypes for the crypto library
+ * blapii.h - private data structures and prototypes for the freebl library
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _BLAPII_H_
 #define _BLAPII_H_
 
--- a/security/nss/lib/freebl/blapit.h
+++ b/security/nss/lib/freebl/blapit.h
@@ -1,10 +1,10 @@
 /*
- * blapit.h - public data structures for the crypto library
+ * blapit.h - public data structures for the freebl library
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _BLAPIT_H_
 #define _BLAPIT_H_
 
--- a/security/nss/lib/freebl/rijndael.c
+++ b/security/nss/lib/freebl/rijndael.c
@@ -967,23 +967,34 @@ AESContext * AES_AllocateContext(void)
     return PORT_ZNew(AESContext);
 }
 
 
 #ifdef INTEL_GCM
 /*
  * Adapted from the example code in "How to detect New Instruction support in
  * the 4th generation Intel Core processor family" by Max Locktyukhin.
+ *
+ * XGETBV:
+ *   Reads an extended control register (XCR) specified by ECX into EDX:EAX.
  */
 static PRBool
 check_xcr0_ymm()
 {
     PRUint32 xcr0;
 #if defined(_MSC_VER)
+#if defined(_M_IX86)
+    __asm {
+        mov ecx, 0
+        xgetbv
+        mov xcr0, eax
+    }
+#else
     xcr0 = (PRUint32)_xgetbv(0);  /* Requires VS2010 SP1 or later. */
+#endif
 #else
     __asm__ ("xgetbv" : "=a" (xcr0) : "c" (0) : "%edx");
 #endif
     /* Check if xmm and ymm state are enabled in XCR0. */
     return (xcr0 & 6) == 6;
 }
 #endif
 
--- a/security/nss/lib/util/secdig.h
+++ b/security/nss/lib/util/secdig.h
@@ -1,10 +1,10 @@
 /*
- * secdig.h - public prototypes for digestinfos from the util lib
+ * secdig.h - public prototypes for digest-info functions
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _SECDIG_H_
 #define _SECDIG_H_
 
--- a/security/nss/lib/util/secdigt.h
+++ b/security/nss/lib/util/secdigt.h
@@ -1,10 +1,10 @@
 /*
- * secdigt.h - public data structures for digestinfos from the util lib.
+ * secdigt.h - public data structures for digest-info objects
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef _SECDIGT_H_
 #define _SECDIGT_H_
 
@@ -18,11 +18,9 @@
 */
 struct SGNDigestInfoStr {
     PLArenaPool *  arena;
     SECAlgorithmID digestAlgorithm;
     SECItem        digest;
 };
 typedef struct SGNDigestInfoStr SGNDigestInfo;
 
-
-
 #endif /* _SECDIGT_H_ */