changeset 51999:7d036fb69443

8211168: Solaris-X64 build failure with error nreg hides the same name in an outer scope Summary: Corrected nreg definition Reviewed-by: dcubed, kvn, shade
author rraghavan
date Wed, 03 Oct 2018 08:03:13 -0700
parents 27b48d82272c
children dac71e2465ca 0b36afd411ec
files src/hotspot/cpu/x86/vm_version_x86.hpp
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/x86/vm_version_x86.hpp	Wed Oct 03 15:05:46 2018 +0200
+++ b/src/hotspot/cpu/x86/vm_version_x86.hpp	Wed Oct 03 08:03:13 2018 -0700
@@ -608,10 +608,10 @@
 
   static bool os_supports_avx_vectors() {
     bool retVal = false;
+    int nreg = 2 LP64_ONLY(+2);
     if (supports_evex()) {
       // Verify that OS save/restore all bits of EVEX registers
       // during signal processing.
-      int nreg = 2 LP64_ONLY(+2);
       retVal = true;
       for (int i = 0; i < 16 * nreg; i++) { // 64 bytes per zmm register
         if (_cpuid_info.zmm_save[i] != ymm_test_value()) {
@@ -622,7 +622,6 @@
     } else if (supports_avx()) {
       // Verify that OS save/restore all bits of AVX registers
       // during signal processing.
-      int nreg = 2 LP64_ONLY(+2);
       retVal = true;
       for (int i = 0; i < 8 * nreg; i++) { // 32 bytes per ymm register
         if (_cpuid_info.ymm_save[i] != ymm_test_value()) {
@@ -634,7 +633,6 @@
       if (retVal == false) {
         // Verify that OS save/restore all bits of EVEX registers
         // during signal processing.
-        int nreg = 2 LP64_ONLY(+2);
         retVal = true;
         for (int i = 0; i < 16 * nreg; i++) { // 64 bytes per zmm register
           if (_cpuid_info.zmm_save[i] != ymm_test_value()) {